rubocop-rails 2.15.2 → 2.20.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +23 -2
- data/config/default.yml +181 -13
- data/config/obsoletion.yml +10 -0
- data/lib/rubocop/cop/mixin/active_record_helper.rb +3 -6
- data/lib/rubocop/cop/mixin/active_record_migrations_helper.rb +1 -3
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +1 -1
- data/lib/rubocop/cop/mixin/index_method.rb +7 -17
- data/lib/rubocop/cop/mixin/migrations_helper.rb +1 -1
- data/lib/rubocop/cop/rails/action_controller_flash_before_render.rb +112 -0
- data/lib/rubocop/cop/rails/action_controller_test_case.rb +2 -2
- data/lib/rubocop/cop/rails/action_filter.rb +1 -1
- data/lib/rubocop/cop/rails/action_order.rb +116 -0
- data/lib/rubocop/cop/rails/active_record_aliases.rb +3 -4
- data/lib/rubocop/cop/rails/active_record_callbacks_order.rb +6 -3
- data/lib/rubocop/cop/rails/active_record_override.rb +2 -5
- data/lib/rubocop/cop/rails/active_support_on_load.rb +70 -0
- data/lib/rubocop/cop/rails/add_column_index.rb +2 -5
- data/lib/rubocop/cop/rails/application_controller.rb +1 -1
- data/lib/rubocop/cop/rails/application_job.rb +2 -2
- data/lib/rubocop/cop/rails/application_mailer.rb +1 -1
- data/lib/rubocop/cop/rails/application_record.rb +1 -1
- data/lib/rubocop/cop/rails/arel_star.rb +1 -1
- data/lib/rubocop/cop/rails/assert_not.rb +1 -2
- data/lib/rubocop/cop/rails/belongs_to.rb +1 -4
- data/lib/rubocop/cop/rails/blank.rb +6 -7
- data/lib/rubocop/cop/rails/bulk_change_table.rb +7 -24
- data/lib/rubocop/cop/rails/compact_blank.rb +5 -1
- data/lib/rubocop/cop/rails/content_tag.rb +5 -6
- data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +16 -3
- data/lib/rubocop/cop/rails/date.rb +15 -11
- data/lib/rubocop/cop/rails/delegate.rb +19 -8
- data/lib/rubocop/cop/rails/delegate_allow_blank.rb +1 -1
- data/lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb +18 -14
- data/lib/rubocop/cop/rails/dot_separated_keys.rb +2 -2
- data/lib/rubocop/cop/rails/duration_arithmetic.rb +3 -3
- data/lib/rubocop/cop/rails/dynamic_find_by.rb +25 -13
- data/lib/rubocop/cop/rails/eager_evaluation_log_message.rb +5 -1
- data/lib/rubocop/cop/rails/enum_hash.rb +1 -1
- data/lib/rubocop/cop/rails/enum_uniqueness.rb +2 -5
- data/lib/rubocop/cop/rails/environment_comparison.rb +2 -3
- data/lib/rubocop/cop/rails/file_path.rb +154 -27
- data/lib/rubocop/cop/rails/find_by_id.rb +2 -2
- data/lib/rubocop/cop/rails/find_each.rb +15 -5
- data/lib/rubocop/cop/rails/freeze_time.rb +79 -0
- data/lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb +4 -6
- data/lib/rubocop/cop/rails/helper_instance_variable.rb +1 -1
- data/lib/rubocop/cop/rails/http_positional_arguments.rb +22 -11
- data/lib/rubocop/cop/rails/http_status.rb +6 -11
- data/lib/rubocop/cop/rails/i18n_lazy_lookup.rb +2 -0
- data/lib/rubocop/cop/rails/i18n_locale_texts.rb +7 -3
- data/lib/rubocop/cop/rails/ignored_columns_assignment.rb +50 -0
- data/lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb +23 -12
- data/lib/rubocop/cop/rails/index_by.rb +1 -1
- data/lib/rubocop/cop/rails/index_with.rb +1 -1
- data/lib/rubocop/cop/rails/inverse_of.rb +3 -9
- data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +21 -15
- data/lib/rubocop/cop/rails/link_to_blank.rb +1 -4
- data/lib/rubocop/cop/rails/mailer_name.rb +4 -4
- data/lib/rubocop/cop/rails/migration_class_name.rb +1 -1
- data/lib/rubocop/cop/rails/negate_include.rb +1 -1
- data/lib/rubocop/cop/rails/not_null_column.rb +9 -6
- data/lib/rubocop/cop/rails/output.rb +6 -8
- data/lib/rubocop/cop/rails/output_safety.rb +5 -1
- data/lib/rubocop/cop/rails/pluck.rb +44 -12
- data/lib/rubocop/cop/rails/pluck_id.rb +1 -1
- data/lib/rubocop/cop/rails/pluralization_grammar.rb +1 -2
- data/lib/rubocop/cop/rails/presence.rb +21 -12
- data/lib/rubocop/cop/rails/present.rb +8 -11
- data/lib/rubocop/cop/rails/rake_environment.rb +2 -2
- data/lib/rubocop/cop/rails/read_write_attribute.rb +1 -1
- data/lib/rubocop/cop/rails/redundant_allow_nil.rb +5 -7
- data/lib/rubocop/cop/rails/redundant_foreign_key.rb +2 -2
- data/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb +3 -3
- data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +30 -26
- data/lib/rubocop/cop/rails/reflection_class_name.rb +34 -1
- data/lib/rubocop/cop/rails/refute_methods.rb +1 -6
- data/lib/rubocop/cop/rails/relative_date_constant.rb +4 -7
- data/lib/rubocop/cop/rails/request_referer.rb +1 -2
- data/lib/rubocop/cop/rails/require_dependency.rb +1 -1
- data/lib/rubocop/cop/rails/response_parsed_body.rb +57 -0
- data/lib/rubocop/cop/rails/reversible_migration.rb +14 -62
- data/lib/rubocop/cop/rails/reversible_migration_method_definition.rb +1 -2
- data/lib/rubocop/cop/rails/root_join_chain.rb +1 -1
- data/lib/rubocop/cop/rails/root_pathname_methods.rb +238 -0
- data/lib/rubocop/cop/rails/safe_navigation.rb +1 -1
- data/lib/rubocop/cop/rails/safe_navigation_with_blank.rb +1 -3
- data/lib/rubocop/cop/rails/save_bang.rb +10 -22
- data/lib/rubocop/cop/rails/short_i18n.rb +2 -5
- data/lib/rubocop/cop/rails/skips_model_validations.rb +2 -3
- data/lib/rubocop/cop/rails/squished_sql_heredocs.rb +9 -7
- data/lib/rubocop/cop/rails/three_state_boolean_column.rb +71 -0
- data/lib/rubocop/cop/rails/time_zone.rb +27 -25
- data/lib/rubocop/cop/rails/time_zone_assignment.rb +1 -1
- data/lib/rubocop/cop/rails/to_s_with_argument.rb +78 -0
- data/lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb +49 -0
- data/lib/rubocop/cop/rails/transaction_exit_statement.rb +8 -3
- data/lib/rubocop/cop/rails/uniq_before_pluck.rb +3 -6
- data/lib/rubocop/cop/rails/unique_validation_without_index.rb +22 -19
- data/lib/rubocop/cop/rails/unknown_env.rb +2 -4
- data/lib/rubocop/cop/rails/unused_ignored_columns.rb +6 -1
- data/lib/rubocop/cop/rails/validation.rb +4 -12
- data/lib/rubocop/cop/rails/where_equals.rb +1 -1
- data/lib/rubocop/cop/rails/where_exists.rb +1 -1
- data/lib/rubocop/cop/rails/where_missing.rb +118 -0
- data/lib/rubocop/cop/rails/where_not.rb +1 -1
- data/lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb +55 -0
- data/lib/rubocop/cop/rails_cops.rb +12 -0
- data/lib/rubocop/rails/schema_loader/schema.rb +4 -4
- data/lib/rubocop/rails/version.rb +1 -1
- data/lib/rubocop/rails.rb +1 -1
- data/lib/rubocop-rails.rb +11 -0
- metadata +19 -9
- data/bin/console +0 -11
- data/bin/setup +0 -7
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.20.2
|
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:
|
13
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 1.
|
49
|
+
version: 1.33.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '2.0'
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 1.
|
59
|
+
version: 1.33.0
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '2.0'
|
@@ -72,8 +72,6 @@ extra_rdoc_files:
|
|
72
72
|
files:
|
73
73
|
- LICENSE.txt
|
74
74
|
- README.md
|
75
|
-
- bin/console
|
76
|
-
- bin/setup
|
77
75
|
- config/default.yml
|
78
76
|
- config/obsoletion.yml
|
79
77
|
- lib/rubocop-rails.rb
|
@@ -84,12 +82,15 @@ files:
|
|
84
82
|
- lib/rubocop/cop/mixin/index_method.rb
|
85
83
|
- lib/rubocop/cop/mixin/migrations_helper.rb
|
86
84
|
- lib/rubocop/cop/mixin/target_rails_version.rb
|
85
|
+
- lib/rubocop/cop/rails/action_controller_flash_before_render.rb
|
87
86
|
- lib/rubocop/cop/rails/action_controller_test_case.rb
|
88
87
|
- lib/rubocop/cop/rails/action_filter.rb
|
88
|
+
- lib/rubocop/cop/rails/action_order.rb
|
89
89
|
- lib/rubocop/cop/rails/active_record_aliases.rb
|
90
90
|
- lib/rubocop/cop/rails/active_record_callbacks_order.rb
|
91
91
|
- lib/rubocop/cop/rails/active_record_override.rb
|
92
92
|
- lib/rubocop/cop/rails/active_support_aliases.rb
|
93
|
+
- lib/rubocop/cop/rails/active_support_on_load.rb
|
93
94
|
- lib/rubocop/cop/rails/add_column_index.rb
|
94
95
|
- lib/rubocop/cop/rails/after_commit_override.rb
|
95
96
|
- lib/rubocop/cop/rails/application_controller.rb
|
@@ -126,6 +127,7 @@ files:
|
|
126
127
|
- lib/rubocop/cop/rails/find_by.rb
|
127
128
|
- lib/rubocop/cop/rails/find_by_id.rb
|
128
129
|
- lib/rubocop/cop/rails/find_each.rb
|
130
|
+
- lib/rubocop/cop/rails/freeze_time.rb
|
129
131
|
- lib/rubocop/cop/rails/has_and_belongs_to_many.rb
|
130
132
|
- lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
|
131
133
|
- lib/rubocop/cop/rails/helper_instance_variable.rb
|
@@ -134,6 +136,7 @@ files:
|
|
134
136
|
- lib/rubocop/cop/rails/i18n_lazy_lookup.rb
|
135
137
|
- lib/rubocop/cop/rails/i18n_locale_assignment.rb
|
136
138
|
- lib/rubocop/cop/rails/i18n_locale_texts.rb
|
139
|
+
- lib/rubocop/cop/rails/ignored_columns_assignment.rb
|
137
140
|
- lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
|
138
141
|
- lib/rubocop/cop/rails/index_by.rb
|
139
142
|
- lib/rubocop/cop/rails/index_with.rb
|
@@ -170,9 +173,11 @@ files:
|
|
170
173
|
- lib/rubocop/cop/rails/render_plain_text.rb
|
171
174
|
- lib/rubocop/cop/rails/request_referer.rb
|
172
175
|
- lib/rubocop/cop/rails/require_dependency.rb
|
176
|
+
- lib/rubocop/cop/rails/response_parsed_body.rb
|
173
177
|
- lib/rubocop/cop/rails/reversible_migration.rb
|
174
178
|
- lib/rubocop/cop/rails/reversible_migration_method_definition.rb
|
175
179
|
- lib/rubocop/cop/rails/root_join_chain.rb
|
180
|
+
- lib/rubocop/cop/rails/root_pathname_methods.rb
|
176
181
|
- lib/rubocop/cop/rails/root_public_path.rb
|
177
182
|
- lib/rubocop/cop/rails/safe_navigation.rb
|
178
183
|
- lib/rubocop/cop/rails/safe_navigation_with_blank.rb
|
@@ -184,9 +189,12 @@ files:
|
|
184
189
|
- lib/rubocop/cop/rails/squished_sql_heredocs.rb
|
185
190
|
- lib/rubocop/cop/rails/strip_heredoc.rb
|
186
191
|
- lib/rubocop/cop/rails/table_name_assignment.rb
|
192
|
+
- lib/rubocop/cop/rails/three_state_boolean_column.rb
|
187
193
|
- lib/rubocop/cop/rails/time_zone.rb
|
188
194
|
- lib/rubocop/cop/rails/time_zone_assignment.rb
|
189
195
|
- lib/rubocop/cop/rails/to_formatted_s.rb
|
196
|
+
- lib/rubocop/cop/rails/to_s_with_argument.rb
|
197
|
+
- lib/rubocop/cop/rails/top_level_hash_with_indifferent_access.rb
|
190
198
|
- lib/rubocop/cop/rails/transaction_exit_statement.rb
|
191
199
|
- lib/rubocop/cop/rails/uniq_before_pluck.rb
|
192
200
|
- lib/rubocop/cop/rails/unique_validation_without_index.rb
|
@@ -195,7 +203,9 @@ files:
|
|
195
203
|
- lib/rubocop/cop/rails/validation.rb
|
196
204
|
- lib/rubocop/cop/rails/where_equals.rb
|
197
205
|
- lib/rubocop/cop/rails/where_exists.rb
|
206
|
+
- lib/rubocop/cop/rails/where_missing.rb
|
198
207
|
- lib/rubocop/cop/rails/where_not.rb
|
208
|
+
- lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb
|
199
209
|
- lib/rubocop/cop/rails_cops.rb
|
200
210
|
- lib/rubocop/rails.rb
|
201
211
|
- lib/rubocop/rails/inject.rb
|
@@ -209,7 +219,7 @@ metadata:
|
|
209
219
|
homepage_uri: https://docs.rubocop.org/rubocop-rails/
|
210
220
|
changelog_uri: https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md
|
211
221
|
source_code_uri: https://github.com/rubocop/rubocop-rails/
|
212
|
-
documentation_uri: https://docs.rubocop.org/rubocop-rails/2.
|
222
|
+
documentation_uri: https://docs.rubocop.org/rubocop-rails/2.20/
|
213
223
|
bug_tracker_uri: https://github.com/rubocop/rubocop-rails/issues
|
214
224
|
rubygems_mfa_required: 'true'
|
215
225
|
post_install_message:
|
@@ -220,14 +230,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
230
|
requirements:
|
221
231
|
- - ">="
|
222
232
|
- !ruby/object:Gem::Version
|
223
|
-
version: 2.
|
233
|
+
version: 2.7.0
|
224
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
225
235
|
requirements:
|
226
236
|
- - ">="
|
227
237
|
- !ruby/object:Gem::Version
|
228
238
|
version: '0'
|
229
239
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
240
|
+
rubygems_version: 3.5.0.dev
|
231
241
|
signing_key:
|
232
242
|
specification_version: 4
|
233
243
|
summary: Automatic Rails code style checking tool.
|
data/bin/console
DELETED