Skip to content

Commit de486ba

Browse files
committed
Ruby: rename ActiveRecord.rb test case file
1 parent 34065f9 commit de486ba

File tree

3 files changed

+88
-88
lines changed

3 files changed

+88
-88
lines changed

ruby/ql/test/library-tests/frameworks/ActionController.expected

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
actionControllerControllerClasses
2-
| ActiveRecordInjection.rb:27:1:58:3 | FooController |
3-
| ActiveRecordInjection.rb:60:1:90:3 | BarController |
4-
| ActiveRecordInjection.rb:92:1:96:3 | BazController |
2+
| ActiveRecord.rb:27:1:58:3 | FooController |
3+
| ActiveRecord.rb:60:1:90:3 | BarController |
4+
| ActiveRecord.rb:92:1:96:3 | BazController |
55
| app/controllers/comments_controller.rb:1:1:7:3 | CommentsController |
66
| app/controllers/foo/bars_controller.rb:3:1:31:3 | BarsController |
77
| app/controllers/photos_controller.rb:1:1:4:3 | PhotosController |
88
| app/controllers/posts_controller.rb:1:1:10:3 | PostsController |
99
| app/controllers/users/notifications_controller.rb:2:3:5:5 | NotificationsController |
1010
actionControllerActionMethods
11-
| ActiveRecordInjection.rb:32:3:57:5 | some_request_handler |
12-
| ActiveRecordInjection.rb:61:3:69:5 | some_other_request_handler |
13-
| ActiveRecordInjection.rb:71:3:89:5 | safe_paths |
14-
| ActiveRecordInjection.rb:93:3:95:5 | yet_another_handler |
11+
| ActiveRecord.rb:32:3:57:5 | some_request_handler |
12+
| ActiveRecord.rb:61:3:69:5 | some_other_request_handler |
13+
| ActiveRecord.rb:71:3:89:5 | safe_paths |
14+
| ActiveRecord.rb:93:3:95:5 | yet_another_handler |
1515
| app/controllers/comments_controller.rb:2:3:3:5 | index |
1616
| app/controllers/comments_controller.rb:5:3:6:5 | show |
1717
| app/controllers/foo/bars_controller.rb:5:3:7:5 | index |
@@ -23,38 +23,38 @@ actionControllerActionMethods
2323
| app/controllers/posts_controller.rb:8:3:9:5 | upvote |
2424
| app/controllers/users/notifications_controller.rb:3:5:4:7 | mark_as_read |
2525
paramsCalls
26-
| ActiveRecordInjection.rb:35:30:35:35 | call to params |
27-
| ActiveRecordInjection.rb:39:29:39:34 | call to params |
28-
| ActiveRecordInjection.rb:43:31:43:36 | call to params |
29-
| ActiveRecordInjection.rb:48:21:48:26 | call to params |
30-
| ActiveRecordInjection.rb:54:34:54:39 | call to params |
31-
| ActiveRecordInjection.rb:56:23:56:28 | call to params |
32-
| ActiveRecordInjection.rb:56:38:56:43 | call to params |
33-
| ActiveRecordInjection.rb:62:10:62:15 | call to params |
34-
| ActiveRecordInjection.rb:72:11:72:16 | call to params |
35-
| ActiveRecordInjection.rb:77:12:77:17 | call to params |
36-
| ActiveRecordInjection.rb:83:12:83:17 | call to params |
37-
| ActiveRecordInjection.rb:88:15:88:20 | call to params |
38-
| ActiveRecordInjection.rb:94:21:94:26 | call to params |
26+
| ActiveRecord.rb:35:30:35:35 | call to params |
27+
| ActiveRecord.rb:39:29:39:34 | call to params |
28+
| ActiveRecord.rb:43:31:43:36 | call to params |
29+
| ActiveRecord.rb:48:21:48:26 | call to params |
30+
| ActiveRecord.rb:54:34:54:39 | call to params |
31+
| ActiveRecord.rb:56:23:56:28 | call to params |
32+
| ActiveRecord.rb:56:38:56:43 | call to params |
33+
| ActiveRecord.rb:62:10:62:15 | call to params |
34+
| ActiveRecord.rb:72:11:72:16 | call to params |
35+
| ActiveRecord.rb:77:12:77:17 | call to params |
36+
| ActiveRecord.rb:83:12:83:17 | call to params |
37+
| ActiveRecord.rb:88:15:88:20 | call to params |
38+
| ActiveRecord.rb:94:21:94:26 | call to params |
3939
| app/controllers/foo/bars_controller.rb:13:21:13:26 | call to params |
4040
| app/controllers/foo/bars_controller.rb:14:10:14:15 | call to params |
4141
| app/controllers/foo/bars_controller.rb:21:21:21:26 | call to params |
4242
| app/controllers/foo/bars_controller.rb:22:10:22:15 | call to params |
4343
| app/views/foo/bars/show.html.erb:5:9:5:14 | call to params |
4444
paramsSources
45-
| ActiveRecordInjection.rb:35:30:35:35 | call to params |
46-
| ActiveRecordInjection.rb:39:29:39:34 | call to params |
47-
| ActiveRecordInjection.rb:43:31:43:36 | call to params |
48-
| ActiveRecordInjection.rb:48:21:48:26 | call to params |
49-
| ActiveRecordInjection.rb:54:34:54:39 | call to params |
50-
| ActiveRecordInjection.rb:56:23:56:28 | call to params |
51-
| ActiveRecordInjection.rb:56:38:56:43 | call to params |
52-
| ActiveRecordInjection.rb:62:10:62:15 | call to params |
53-
| ActiveRecordInjection.rb:72:11:72:16 | call to params |
54-
| ActiveRecordInjection.rb:77:12:77:17 | call to params |
55-
| ActiveRecordInjection.rb:83:12:83:17 | call to params |
56-
| ActiveRecordInjection.rb:88:15:88:20 | call to params |
57-
| ActiveRecordInjection.rb:94:21:94:26 | call to params |
45+
| ActiveRecord.rb:35:30:35:35 | call to params |
46+
| ActiveRecord.rb:39:29:39:34 | call to params |
47+
| ActiveRecord.rb:43:31:43:36 | call to params |
48+
| ActiveRecord.rb:48:21:48:26 | call to params |
49+
| ActiveRecord.rb:54:34:54:39 | call to params |
50+
| ActiveRecord.rb:56:23:56:28 | call to params |
51+
| ActiveRecord.rb:56:38:56:43 | call to params |
52+
| ActiveRecord.rb:62:10:62:15 | call to params |
53+
| ActiveRecord.rb:72:11:72:16 | call to params |
54+
| ActiveRecord.rb:77:12:77:17 | call to params |
55+
| ActiveRecord.rb:83:12:83:17 | call to params |
56+
| ActiveRecord.rb:88:15:88:20 | call to params |
57+
| ActiveRecord.rb:94:21:94:26 | call to params |
5858
| app/controllers/foo/bars_controller.rb:13:21:13:26 | call to params |
5959
| app/controllers/foo/bars_controller.rb:14:10:14:15 | call to params |
6060
| app/controllers/foo/bars_controller.rb:21:21:21:26 | call to params |
Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
activeRecordModelClasses
2-
| ActiveRecordInjection.rb:1:1:3:3 | UserGroup |
3-
| ActiveRecordInjection.rb:5:1:17:3 | User |
4-
| ActiveRecordInjection.rb:19:1:25:3 | Admin |
2+
| ActiveRecord.rb:1:1:3:3 | UserGroup |
3+
| ActiveRecord.rb:5:1:17:3 | User |
4+
| ActiveRecord.rb:19:1:25:3 | Admin |
55
activeRecordInstances
6-
| ActiveRecordInjection.rb:10:5:10:68 | call to find |
7-
| ActiveRecordInjection.rb:15:5:15:40 | call to find_by |
8-
| ActiveRecordInjection.rb:79:5:81:7 | if ... |
9-
| ActiveRecordInjection.rb:79:43:80:40 | then ... |
10-
| ActiveRecordInjection.rb:80:7:80:40 | call to find_by |
11-
| ActiveRecordInjection.rb:85:5:85:33 | call to find_by |
12-
| ActiveRecordInjection.rb:88:5:88:34 | call to find |
6+
| ActiveRecord.rb:10:5:10:68 | call to find |
7+
| ActiveRecord.rb:15:5:15:40 | call to find_by |
8+
| ActiveRecord.rb:79:5:81:7 | if ... |
9+
| ActiveRecord.rb:79:43:80:40 | then ... |
10+
| ActiveRecord.rb:80:7:80:40 | call to find_by |
11+
| ActiveRecord.rb:85:5:85:33 | call to find_by |
12+
| ActiveRecord.rb:88:5:88:34 | call to find |
1313
activeRecordSqlExecutionRanges
14-
| ActiveRecordInjection.rb:10:33:10:67 | "name='#{...}' and pass='#{...}'" |
15-
| ActiveRecordInjection.rb:23:16:23:24 | condition |
16-
| ActiveRecordInjection.rb:35:30:35:44 | ...[...] |
17-
| ActiveRecordInjection.rb:39:20:39:42 | "id = '#{...}'" |
18-
| ActiveRecordInjection.rb:43:22:43:44 | "id = '#{...}'" |
19-
| ActiveRecordInjection.rb:47:16:47:21 | <<-SQL |
20-
| ActiveRecordInjection.rb:54:20:54:47 | "user.id = '#{...}'" |
21-
| ActiveRecordInjection.rb:68:20:68:32 | ... + ... |
22-
| ActiveRecordInjection.rb:75:16:75:28 | "name #{...}" |
23-
| ActiveRecordInjection.rb:80:20:80:39 | "username = #{...}" |
14+
| ActiveRecord.rb:10:33:10:67 | "name='#{...}' and pass='#{...}'" |
15+
| ActiveRecord.rb:23:16:23:24 | condition |
16+
| ActiveRecord.rb:35:30:35:44 | ...[...] |
17+
| ActiveRecord.rb:39:20:39:42 | "id = '#{...}'" |
18+
| ActiveRecord.rb:43:22:43:44 | "id = '#{...}'" |
19+
| ActiveRecord.rb:47:16:47:21 | <<-SQL |
20+
| ActiveRecord.rb:54:20:54:47 | "user.id = '#{...}'" |
21+
| ActiveRecord.rb:68:20:68:32 | ... + ... |
22+
| ActiveRecord.rb:75:16:75:28 | "name #{...}" |
23+
| ActiveRecord.rb:80:20:80:39 | "username = #{...}" |
2424
activeRecordModelClassMethodCalls
25-
| ActiveRecordInjection.rb:2:3:2:17 | call to has_many |
26-
| ActiveRecordInjection.rb:6:3:6:24 | call to belongs_to |
27-
| ActiveRecordInjection.rb:10:5:10:68 | call to find |
28-
| ActiveRecordInjection.rb:15:5:15:40 | call to find_by |
29-
| ActiveRecordInjection.rb:15:5:15:46 | call to users |
30-
| ActiveRecordInjection.rb:23:5:23:25 | call to destroy_by |
31-
| ActiveRecordInjection.rb:35:5:35:45 | call to calculate |
32-
| ActiveRecordInjection.rb:39:5:39:43 | call to delete_by |
33-
| ActiveRecordInjection.rb:43:5:43:46 | call to destroy_by |
34-
| ActiveRecordInjection.rb:47:5:47:35 | call to where |
35-
| ActiveRecordInjection.rb:54:5:54:14 | call to where |
36-
| ActiveRecordInjection.rb:54:5:54:48 | call to not |
37-
| ActiveRecordInjection.rb:56:5:56:51 | call to authenticate |
38-
| ActiveRecordInjection.rb:68:5:68:33 | call to delete_by |
39-
| ActiveRecordInjection.rb:75:5:75:29 | call to order |
40-
| ActiveRecordInjection.rb:80:7:80:40 | call to find_by |
41-
| ActiveRecordInjection.rb:85:5:85:33 | call to find_by |
42-
| ActiveRecordInjection.rb:88:5:88:34 | call to find |
43-
| ActiveRecordInjection.rb:94:5:94:45 | call to delete_by |
25+
| ActiveRecord.rb:2:3:2:17 | call to has_many |
26+
| ActiveRecord.rb:6:3:6:24 | call to belongs_to |
27+
| ActiveRecord.rb:10:5:10:68 | call to find |
28+
| ActiveRecord.rb:15:5:15:40 | call to find_by |
29+
| ActiveRecord.rb:15:5:15:46 | call to users |
30+
| ActiveRecord.rb:23:5:23:25 | call to destroy_by |
31+
| ActiveRecord.rb:35:5:35:45 | call to calculate |
32+
| ActiveRecord.rb:39:5:39:43 | call to delete_by |
33+
| ActiveRecord.rb:43:5:43:46 | call to destroy_by |
34+
| ActiveRecord.rb:47:5:47:35 | call to where |
35+
| ActiveRecord.rb:54:5:54:14 | call to where |
36+
| ActiveRecord.rb:54:5:54:48 | call to not |
37+
| ActiveRecord.rb:56:5:56:51 | call to authenticate |
38+
| ActiveRecord.rb:68:5:68:33 | call to delete_by |
39+
| ActiveRecord.rb:75:5:75:29 | call to order |
40+
| ActiveRecord.rb:80:7:80:40 | call to find_by |
41+
| ActiveRecord.rb:85:5:85:33 | call to find_by |
42+
| ActiveRecord.rb:88:5:88:34 | call to find |
43+
| ActiveRecord.rb:94:5:94:45 | call to delete_by |
4444
potentiallyUnsafeSqlExecutingMethodCall
45-
| ActiveRecordInjection.rb:10:5:10:68 | call to find |
46-
| ActiveRecordInjection.rb:23:5:23:25 | call to destroy_by |
47-
| ActiveRecordInjection.rb:35:5:35:45 | call to calculate |
48-
| ActiveRecordInjection.rb:39:5:39:43 | call to delete_by |
49-
| ActiveRecordInjection.rb:43:5:43:46 | call to destroy_by |
50-
| ActiveRecordInjection.rb:47:5:47:35 | call to where |
51-
| ActiveRecordInjection.rb:54:5:54:48 | call to not |
52-
| ActiveRecordInjection.rb:68:5:68:33 | call to delete_by |
53-
| ActiveRecordInjection.rb:75:5:75:29 | call to order |
54-
| ActiveRecordInjection.rb:80:7:80:40 | call to find_by |
45+
| ActiveRecord.rb:10:5:10:68 | call to find |
46+
| ActiveRecord.rb:23:5:23:25 | call to destroy_by |
47+
| ActiveRecord.rb:35:5:35:45 | call to calculate |
48+
| ActiveRecord.rb:39:5:39:43 | call to delete_by |
49+
| ActiveRecord.rb:43:5:43:46 | call to destroy_by |
50+
| ActiveRecord.rb:47:5:47:35 | call to where |
51+
| ActiveRecord.rb:54:5:54:48 | call to not |
52+
| ActiveRecord.rb:68:5:68:33 | call to delete_by |
53+
| ActiveRecord.rb:75:5:75:29 | call to order |
54+
| ActiveRecord.rb:80:7:80:40 | call to find_by |
5555
activeRecordModelInstantiations
56-
| ActiveRecordInjection.rb:10:5:10:68 | call to find | ActiveRecordInjection.rb:5:1:17:3 | User |
57-
| ActiveRecordInjection.rb:15:5:15:40 | call to find_by | ActiveRecordInjection.rb:1:1:3:3 | UserGroup |
58-
| ActiveRecordInjection.rb:80:7:80:40 | call to find_by | ActiveRecordInjection.rb:5:1:17:3 | User |
59-
| ActiveRecordInjection.rb:85:5:85:33 | call to find_by | ActiveRecordInjection.rb:5:1:17:3 | User |
60-
| ActiveRecordInjection.rb:88:5:88:34 | call to find | ActiveRecordInjection.rb:5:1:17:3 | User |
56+
| ActiveRecord.rb:10:5:10:68 | call to find | ActiveRecord.rb:5:1:17:3 | User |
57+
| ActiveRecord.rb:15:5:15:40 | call to find_by | ActiveRecord.rb:1:1:3:3 | UserGroup |
58+
| ActiveRecord.rb:80:7:80:40 | call to find_by | ActiveRecord.rb:5:1:17:3 | User |
59+
| ActiveRecord.rb:85:5:85:33 | call to find_by | ActiveRecord.rb:5:1:17:3 | User |
60+
| ActiveRecord.rb:88:5:88:34 | call to find | ActiveRecord.rb:5:1:17:3 | User |

ruby/ql/test/library-tests/frameworks/ActiveRecordInjection.rb renamed to ruby/ql/test/library-tests/frameworks/ActiveRecord.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ class BazController < BarController
9393
def yet_another_handler
9494
Admin.delete_by(params[:admin_condition])
9595
end
96-
end
96+
end

0 commit comments

Comments
 (0)