Skip to content

Commit 75ccbe5

Browse files
committed
Ruby: rack - use Mimetype rather than MimeType in predicate names for consistency with concepts
1 parent 977ceb8 commit 75ccbe5

File tree

2 files changed

+3
-3
lines changed
  • ruby/ql
    • lib/codeql/ruby/frameworks/rack/internal
    • test/library-tests/frameworks/rack

2 files changed

+3
-3
lines changed

ruby/ql/lib/codeql/ruby/frameworks/rack/internal/Mime.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
private import codeql.ruby.ApiGraphs
66
private import codeql.ruby.DataFlow
77

8-
private predicate mimeTypeMatches(string ext, string mimeType) {
8+
private predicate mimetypeMatches(string ext, string mimeType) {
99
ext = ".123" and mimeType = "application/vnd.lotus-1-2-3"
1010
or
1111
ext = ".3dml" and mimeType = "text/vnd.in3d.3dml"
@@ -1306,6 +1306,6 @@ module Mime {
13061306
}
13071307

13081308
/** Gets the canonical MIME type string returned by this call. */
1309-
string getMimeType() { mimeTypeMatches(this.getExtension(), result) }
1309+
string getMimetype() { mimetypeMatches(this.getExtension(), result) }
13101310
}
13111311
}

ruby/ql/test/library-tests/frameworks/rack/Rack.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ query predicate rackResponseContentTypes(
1313
}
1414

1515
query predicate mimetypeCalls(Rack::Mime::MimetypeCall c, string mimetype) {
16-
mimetype = c.getMimeType()
16+
mimetype = c.getMimetype()
1717
}
1818

1919
query predicate redirectResponses(Rack::Response::RedirectResponse resp, DataFlow::Node location) {

0 commit comments

Comments
 (0)