rubocop-rails 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/default.yml +112 -3
- data/lib/rubocop/cop/mixin/active_record_helper.rb +7 -0
- data/lib/rubocop/cop/rails/active_record_callbacks_order.rb +145 -0
- data/lib/rubocop/cop/rails/content_tag.rb +8 -21
- data/lib/rubocop/cop/rails/default_scope.rb +54 -0
- data/lib/rubocop/cop/rails/delegate.rb +1 -1
- data/lib/rubocop/cop/rails/file_path.rb +1 -1
- data/lib/rubocop/cop/rails/find_by_id.rb +103 -0
- data/lib/rubocop/cop/rails/inquiry.rb +34 -0
- data/lib/rubocop/cop/rails/link_to_blank.rb +2 -0
- data/lib/rubocop/cop/rails/mailer_name.rb +80 -0
- data/lib/rubocop/cop/rails/match_route.rb +117 -0
- data/lib/rubocop/cop/rails/negate_include.rb +39 -0
- data/lib/rubocop/cop/rails/pick.rb +7 -3
- data/lib/rubocop/cop/rails/pluck.rb +59 -0
- data/lib/rubocop/cop/rails/pluck_id.rb +58 -0
- data/lib/rubocop/cop/rails/pluck_in_where.rb +36 -0
- data/lib/rubocop/cop/rails/render_inline.rb +48 -0
- data/lib/rubocop/cop/rails/render_plain_text.rb +76 -0
- data/lib/rubocop/cop/rails/safe_navigation.rb +1 -1
- data/lib/rubocop/cop/rails/short_i18n.rb +76 -0
- data/lib/rubocop/cop/rails/skips_model_validations.rb +42 -7
- data/lib/rubocop/cop/rails/uniq_before_pluck.rb +4 -4
- data/lib/rubocop/cop/rails/where_exists.rb +68 -0
- data/lib/rubocop/cop/rails_cops.rb +14 -0
- data/lib/rubocop/rails/version.rb +1 -1
- metadata +19 -5
@@ -6,6 +6,7 @@ require_relative 'mixin/target_rails_version'
|
|
6
6
|
|
7
7
|
require_relative 'rails/action_filter'
|
8
8
|
require_relative 'rails/active_record_aliases'
|
9
|
+
require_relative 'rails/active_record_callbacks_order'
|
9
10
|
require_relative 'rails/active_record_override'
|
10
11
|
require_relative 'rails/active_support_aliases'
|
11
12
|
require_relative 'rails/application_controller'
|
@@ -19,6 +20,7 @@ require_relative 'rails/bulk_change_table'
|
|
19
20
|
require_relative 'rails/content_tag'
|
20
21
|
require_relative 'rails/create_table_with_timestamps'
|
21
22
|
require_relative 'rails/date'
|
23
|
+
require_relative 'rails/default_scope'
|
22
24
|
require_relative 'rails/delegate'
|
23
25
|
require_relative 'rails/delegate_allow_blank'
|
24
26
|
require_relative 'rails/dynamic_find_by'
|
@@ -28,6 +30,7 @@ require_relative 'rails/environment_comparison'
|
|
28
30
|
require_relative 'rails/exit'
|
29
31
|
require_relative 'rails/file_path'
|
30
32
|
require_relative 'rails/find_by'
|
33
|
+
require_relative 'rails/find_by_id'
|
31
34
|
require_relative 'rails/find_each'
|
32
35
|
require_relative 'rails/has_and_belongs_to_many'
|
33
36
|
require_relative 'rails/has_many_or_has_one_dependent'
|
@@ -37,13 +40,20 @@ require_relative 'rails/http_status'
|
|
37
40
|
require_relative 'rails/ignored_skip_action_filter_option'
|
38
41
|
require_relative 'rails/index_by'
|
39
42
|
require_relative 'rails/index_with'
|
43
|
+
require_relative 'rails/inquiry'
|
40
44
|
require_relative 'rails/inverse_of'
|
41
45
|
require_relative 'rails/lexically_scoped_action_filter'
|
42
46
|
require_relative 'rails/link_to_blank'
|
47
|
+
require_relative 'rails/mailer_name'
|
48
|
+
require_relative 'rails/match_route'
|
49
|
+
require_relative 'rails/negate_include'
|
43
50
|
require_relative 'rails/not_null_column'
|
44
51
|
require_relative 'rails/output'
|
45
52
|
require_relative 'rails/output_safety'
|
46
53
|
require_relative 'rails/pick'
|
54
|
+
require_relative 'rails/pluck'
|
55
|
+
require_relative 'rails/pluck_id'
|
56
|
+
require_relative 'rails/pluck_in_where'
|
47
57
|
require_relative 'rails/pluralization_grammar'
|
48
58
|
require_relative 'rails/presence'
|
49
59
|
require_relative 'rails/present'
|
@@ -55,15 +65,19 @@ require_relative 'rails/redundant_receiver_in_with_options'
|
|
55
65
|
require_relative 'rails/reflection_class_name'
|
56
66
|
require_relative 'rails/refute_methods'
|
57
67
|
require_relative 'rails/relative_date_constant'
|
68
|
+
require_relative 'rails/render_inline'
|
69
|
+
require_relative 'rails/render_plain_text'
|
58
70
|
require_relative 'rails/request_referer'
|
59
71
|
require_relative 'rails/reversible_migration'
|
60
72
|
require_relative 'rails/safe_navigation'
|
61
73
|
require_relative 'rails/safe_navigation_with_blank'
|
62
74
|
require_relative 'rails/save_bang'
|
63
75
|
require_relative 'rails/scope_args'
|
76
|
+
require_relative 'rails/short_i18n'
|
64
77
|
require_relative 'rails/skips_model_validations'
|
65
78
|
require_relative 'rails/time_zone'
|
66
79
|
require_relative 'rails/uniq_before_pluck'
|
67
80
|
require_relative 'rails/unique_validation_without_index'
|
68
81
|
require_relative 'rails/unknown_env'
|
69
82
|
require_relative 'rails/validation'
|
83
|
+
require_relative 'rails/where_exists'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -46,14 +46,14 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.87.0
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.
|
56
|
+
version: 0.87.0
|
57
57
|
description: |
|
58
58
|
Automatic Rails code style checking tool.
|
59
59
|
A RuboCop extension focused on enforcing Rails best practices and coding conventions.
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/rubocop/cop/mixin/target_rails_version.rb
|
75
75
|
- lib/rubocop/cop/rails/action_filter.rb
|
76
76
|
- lib/rubocop/cop/rails/active_record_aliases.rb
|
77
|
+
- lib/rubocop/cop/rails/active_record_callbacks_order.rb
|
77
78
|
- lib/rubocop/cop/rails/active_record_override.rb
|
78
79
|
- lib/rubocop/cop/rails/active_support_aliases.rb
|
79
80
|
- lib/rubocop/cop/rails/application_controller.rb
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- lib/rubocop/cop/rails/content_tag.rb
|
88
89
|
- lib/rubocop/cop/rails/create_table_with_timestamps.rb
|
89
90
|
- lib/rubocop/cop/rails/date.rb
|
91
|
+
- lib/rubocop/cop/rails/default_scope.rb
|
90
92
|
- lib/rubocop/cop/rails/delegate.rb
|
91
93
|
- lib/rubocop/cop/rails/delegate_allow_blank.rb
|
92
94
|
- lib/rubocop/cop/rails/dynamic_find_by.rb
|
@@ -96,6 +98,7 @@ files:
|
|
96
98
|
- lib/rubocop/cop/rails/exit.rb
|
97
99
|
- lib/rubocop/cop/rails/file_path.rb
|
98
100
|
- lib/rubocop/cop/rails/find_by.rb
|
101
|
+
- lib/rubocop/cop/rails/find_by_id.rb
|
99
102
|
- lib/rubocop/cop/rails/find_each.rb
|
100
103
|
- lib/rubocop/cop/rails/has_and_belongs_to_many.rb
|
101
104
|
- lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
|
@@ -105,13 +108,20 @@ files:
|
|
105
108
|
- lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
|
106
109
|
- lib/rubocop/cop/rails/index_by.rb
|
107
110
|
- lib/rubocop/cop/rails/index_with.rb
|
111
|
+
- lib/rubocop/cop/rails/inquiry.rb
|
108
112
|
- lib/rubocop/cop/rails/inverse_of.rb
|
109
113
|
- lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
|
110
114
|
- lib/rubocop/cop/rails/link_to_blank.rb
|
115
|
+
- lib/rubocop/cop/rails/mailer_name.rb
|
116
|
+
- lib/rubocop/cop/rails/match_route.rb
|
117
|
+
- lib/rubocop/cop/rails/negate_include.rb
|
111
118
|
- lib/rubocop/cop/rails/not_null_column.rb
|
112
119
|
- lib/rubocop/cop/rails/output.rb
|
113
120
|
- lib/rubocop/cop/rails/output_safety.rb
|
114
121
|
- lib/rubocop/cop/rails/pick.rb
|
122
|
+
- lib/rubocop/cop/rails/pluck.rb
|
123
|
+
- lib/rubocop/cop/rails/pluck_id.rb
|
124
|
+
- lib/rubocop/cop/rails/pluck_in_where.rb
|
115
125
|
- lib/rubocop/cop/rails/pluralization_grammar.rb
|
116
126
|
- lib/rubocop/cop/rails/presence.rb
|
117
127
|
- lib/rubocop/cop/rails/present.rb
|
@@ -123,18 +133,22 @@ files:
|
|
123
133
|
- lib/rubocop/cop/rails/reflection_class_name.rb
|
124
134
|
- lib/rubocop/cop/rails/refute_methods.rb
|
125
135
|
- lib/rubocop/cop/rails/relative_date_constant.rb
|
136
|
+
- lib/rubocop/cop/rails/render_inline.rb
|
137
|
+
- lib/rubocop/cop/rails/render_plain_text.rb
|
126
138
|
- lib/rubocop/cop/rails/request_referer.rb
|
127
139
|
- lib/rubocop/cop/rails/reversible_migration.rb
|
128
140
|
- lib/rubocop/cop/rails/safe_navigation.rb
|
129
141
|
- lib/rubocop/cop/rails/safe_navigation_with_blank.rb
|
130
142
|
- lib/rubocop/cop/rails/save_bang.rb
|
131
143
|
- lib/rubocop/cop/rails/scope_args.rb
|
144
|
+
- lib/rubocop/cop/rails/short_i18n.rb
|
132
145
|
- lib/rubocop/cop/rails/skips_model_validations.rb
|
133
146
|
- lib/rubocop/cop/rails/time_zone.rb
|
134
147
|
- lib/rubocop/cop/rails/uniq_before_pluck.rb
|
135
148
|
- lib/rubocop/cop/rails/unique_validation_without_index.rb
|
136
149
|
- lib/rubocop/cop/rails/unknown_env.rb
|
137
150
|
- lib/rubocop/cop/rails/validation.rb
|
151
|
+
- lib/rubocop/cop/rails/where_exists.rb
|
138
152
|
- lib/rubocop/cop/rails_cops.rb
|
139
153
|
- lib/rubocop/rails.rb
|
140
154
|
- lib/rubocop/rails/inject.rb
|
@@ -165,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
requirements: []
|
168
|
-
rubygems_version: 3.1.
|
182
|
+
rubygems_version: 3.1.4
|
169
183
|
signing_key:
|
170
184
|
specification_version: 4
|
171
185
|
summary: Automatic Rails code style checking tool.
|