rubocop-rails 2.12.4 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/config/default.yml +34 -6
  3. data/lib/rubocop/cop/mixin/active_record_migrations_helper.rb +34 -0
  4. data/lib/rubocop/cop/rails/active_record_aliases.rb +4 -0
  5. data/lib/rubocop/cop/rails/application_controller.rb +5 -1
  6. data/lib/rubocop/cop/rails/application_job.rb +5 -1
  7. data/lib/rubocop/cop/rails/application_mailer.rb +5 -1
  8. data/lib/rubocop/cop/rails/application_record.rb +6 -1
  9. data/lib/rubocop/cop/rails/arel_star.rb +6 -0
  10. data/lib/rubocop/cop/rails/blank.rb +5 -4
  11. data/lib/rubocop/cop/rails/compact_blank.rb +98 -0
  12. data/lib/rubocop/cop/rails/content_tag.rb +2 -2
  13. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +2 -7
  14. data/lib/rubocop/cop/rails/duration_arithmetic.rb +97 -0
  15. data/lib/rubocop/cop/rails/dynamic_find_by.rb +4 -0
  16. data/lib/rubocop/cop/rails/http_positional_arguments.rb +1 -1
  17. data/lib/rubocop/cop/rails/lexically_scoped_action_filter.rb +8 -7
  18. data/lib/rubocop/cop/rails/mailer_name.rb +4 -0
  19. data/lib/rubocop/cop/rails/negate_include.rb +3 -2
  20. data/lib/rubocop/cop/rails/output.rb +4 -0
  21. data/lib/rubocop/cop/rails/pick.rb +7 -0
  22. data/lib/rubocop/cop/rails/pluck_id.rb +3 -0
  23. data/lib/rubocop/cop/rails/pluck_in_where.rb +7 -6
  24. data/lib/rubocop/cop/rails/rake_environment.rb +5 -0
  25. data/lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb +192 -0
  26. data/lib/rubocop/cop/rails/reflection_class_name.rb +4 -2
  27. data/lib/rubocop/cop/rails/relative_date_constant.rb +3 -0
  28. data/lib/rubocop/cop/rails/reversible_migration.rb +1 -1
  29. data/lib/rubocop/cop/rails/root_join_chain.rb +72 -0
  30. data/lib/rubocop/cop/rails/safe_navigation_with_blank.rb +12 -3
  31. data/lib/rubocop/cop/rails/save_bang.rb +19 -0
  32. data/lib/rubocop/cop/rails/schema_comment.rb +104 -0
  33. data/lib/rubocop/cop/rails/squished_sql_heredocs.rb +4 -2
  34. data/lib/rubocop/cop/rails/time_zone.rb +3 -0
  35. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +29 -35
  36. data/lib/rubocop/cop/rails/where_equals.rb +4 -0
  37. data/lib/rubocop/cop/rails/where_exists.rb +9 -8
  38. data/lib/rubocop/cop/rails_cops.rb +6 -0
  39. data/lib/rubocop/rails/version.rb +1 -1
  40. metadata +11 -4
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Rails
5
5
  # This module holds the RuboCop Rails version information.
6
6
  module Version
7
- STRING = '2.12.4'
7
+ STRING = '2.13.0'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
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.12.4
4
+ version: 2.13.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: 2021-10-15 00:00:00.000000000 Z
13
+ date: 2021-12-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -78,6 +78,7 @@ files:
78
78
  - config/obsoletion.yml
79
79
  - lib/rubocop-rails.rb
80
80
  - lib/rubocop/cop/mixin/active_record_helper.rb
81
+ - lib/rubocop/cop/mixin/active_record_migrations_helper.rb
81
82
  - lib/rubocop/cop/mixin/enforce_superclass.rb
82
83
  - lib/rubocop/cop/mixin/index_method.rb
83
84
  - lib/rubocop/cop/mixin/target_rails_version.rb
@@ -98,12 +99,14 @@ files:
98
99
  - lib/rubocop/cop/rails/belongs_to.rb
99
100
  - lib/rubocop/cop/rails/blank.rb
100
101
  - lib/rubocop/cop/rails/bulk_change_table.rb
102
+ - lib/rubocop/cop/rails/compact_blank.rb
101
103
  - lib/rubocop/cop/rails/content_tag.rb
102
104
  - lib/rubocop/cop/rails/create_table_with_timestamps.rb
103
105
  - lib/rubocop/cop/rails/date.rb
104
106
  - lib/rubocop/cop/rails/default_scope.rb
105
107
  - lib/rubocop/cop/rails/delegate.rb
106
108
  - lib/rubocop/cop/rails/delegate_allow_blank.rb
109
+ - lib/rubocop/cop/rails/duration_arithmetic.rb
107
110
  - lib/rubocop/cop/rails/dynamic_find_by.rb
108
111
  - lib/rubocop/cop/rails/eager_evaluation_log_message.rb
109
112
  - lib/rubocop/cop/rails/enum_hash.rb
@@ -147,6 +150,7 @@ files:
147
150
  - lib/rubocop/cop/rails/read_write_attribute.rb
148
151
  - lib/rubocop/cop/rails/redundant_allow_nil.rb
149
152
  - lib/rubocop/cop/rails/redundant_foreign_key.rb
153
+ - lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb
150
154
  - lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
151
155
  - lib/rubocop/cop/rails/redundant_travel_back.rb
152
156
  - lib/rubocop/cop/rails/reflection_class_name.rb
@@ -158,9 +162,11 @@ files:
158
162
  - lib/rubocop/cop/rails/require_dependency.rb
159
163
  - lib/rubocop/cop/rails/reversible_migration.rb
160
164
  - lib/rubocop/cop/rails/reversible_migration_method_definition.rb
165
+ - lib/rubocop/cop/rails/root_join_chain.rb
161
166
  - lib/rubocop/cop/rails/safe_navigation.rb
162
167
  - lib/rubocop/cop/rails/safe_navigation_with_blank.rb
163
168
  - lib/rubocop/cop/rails/save_bang.rb
169
+ - lib/rubocop/cop/rails/schema_comment.rb
164
170
  - lib/rubocop/cop/rails/scope_args.rb
165
171
  - lib/rubocop/cop/rails/short_i18n.rb
166
172
  - lib/rubocop/cop/rails/skips_model_validations.rb
@@ -188,8 +194,9 @@ metadata:
188
194
  homepage_uri: https://docs.rubocop.org/rubocop-rails/
189
195
  changelog_uri: https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md
190
196
  source_code_uri: https://github.com/rubocop/rubocop-rails/
191
- documentation_uri: https://docs.rubocop.org/rubocop-rails/2.12/
197
+ documentation_uri: https://docs.rubocop.org/rubocop-rails/2.13/
192
198
  bug_tracker_uri: https://github.com/rubocop/rubocop-rails/issues
199
+ rubygems_mfa_required: 'true'
193
200
  post_install_message:
194
201
  rdoc_options: []
195
202
  require_paths:
@@ -205,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
212
  - !ruby/object:Gem::Version
206
213
  version: '0'
207
214
  requirements: []
208
- rubygems_version: 3.2.22
215
+ rubygems_version: 3.2.32
209
216
  signing_key:
210
217
  specification_version: 4
211
218
  summary: Automatic Rails code style checking tool.