rubocop-rails 2.5.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -2
  4. data/config/default.yml +156 -9
  5. data/lib/rubocop/cop/mixin/active_record_helper.rb +22 -0
  6. data/lib/rubocop/cop/mixin/index_method.rb +8 -1
  7. data/lib/rubocop/cop/rails/active_record_callbacks_order.rb +145 -0
  8. data/lib/rubocop/cop/rails/content_tag.rb +69 -0
  9. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +1 -3
  10. data/lib/rubocop/cop/rails/default_scope.rb +54 -0
  11. data/lib/rubocop/cop/rails/delegate.rb +2 -4
  12. data/lib/rubocop/cop/rails/dynamic_find_by.rb +40 -15
  13. data/lib/rubocop/cop/rails/exit.rb +2 -2
  14. data/lib/rubocop/cop/rails/file_path.rb +2 -1
  15. data/lib/rubocop/cop/rails/find_by_id.rb +103 -0
  16. data/lib/rubocop/cop/rails/http_positional_arguments.rb +1 -1
  17. data/lib/rubocop/cop/rails/http_status.rb +2 -0
  18. data/lib/rubocop/cop/rails/inquiry.rb +34 -0
  19. data/lib/rubocop/cop/rails/inverse_of.rb +0 -4
  20. data/lib/rubocop/cop/rails/link_to_blank.rb +3 -3
  21. data/lib/rubocop/cop/rails/mailer_name.rb +80 -0
  22. data/lib/rubocop/cop/rails/match_route.rb +119 -0
  23. data/lib/rubocop/cop/rails/negate_include.rb +39 -0
  24. data/lib/rubocop/cop/rails/pick.rb +55 -0
  25. data/lib/rubocop/cop/rails/pluck.rb +59 -0
  26. data/lib/rubocop/cop/rails/pluck_id.rb +58 -0
  27. data/lib/rubocop/cop/rails/pluck_in_where.rb +36 -0
  28. data/lib/rubocop/cop/rails/presence.rb +2 -6
  29. data/lib/rubocop/cop/rails/rake_environment.rb +17 -0
  30. data/lib/rubocop/cop/rails/redundant_foreign_key.rb +80 -0
  31. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +0 -3
  32. data/lib/rubocop/cop/rails/render_inline.rb +40 -0
  33. data/lib/rubocop/cop/rails/render_plain_text.rb +76 -0
  34. data/lib/rubocop/cop/rails/safe_navigation.rb +1 -1
  35. data/lib/rubocop/cop/rails/save_bang.rb +6 -7
  36. data/lib/rubocop/cop/rails/short_i18n.rb +76 -0
  37. data/lib/rubocop/cop/rails/skips_model_validations.rb +46 -8
  38. data/lib/rubocop/cop/rails/time_zone.rb +1 -3
  39. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +12 -12
  40. data/lib/rubocop/cop/rails/unique_validation_without_index.rb +28 -6
  41. data/lib/rubocop/cop/rails/unknown_env.rb +18 -6
  42. data/lib/rubocop/cop/rails/where_exists.rb +68 -0
  43. data/lib/rubocop/cop/rails_cops.rb +17 -0
  44. data/lib/rubocop/rails/schema_loader.rb +10 -10
  45. data/lib/rubocop/rails/schema_loader/schema.rb +48 -14
  46. data/lib/rubocop/rails/version.rb +1 -1
  47. metadata +27 -10
@@ -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.5.0'
7
+ STRING = '2.7.1'
8
8
  end
9
9
  end
10
10
  end
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.5.0
4
+ version: 2.7.1
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-03-23 00:00:00.000000000 Z
13
+ date: 2020-07-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 4.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '0'
28
+ version: 4.2.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rack
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 0.72.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.72.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
@@ -84,8 +85,10 @@ files:
84
85
  - lib/rubocop/cop/rails/belongs_to.rb
85
86
  - lib/rubocop/cop/rails/blank.rb
86
87
  - lib/rubocop/cop/rails/bulk_change_table.rb
88
+ - lib/rubocop/cop/rails/content_tag.rb
87
89
  - lib/rubocop/cop/rails/create_table_with_timestamps.rb
88
90
  - lib/rubocop/cop/rails/date.rb
91
+ - lib/rubocop/cop/rails/default_scope.rb
89
92
  - lib/rubocop/cop/rails/delegate.rb
90
93
  - lib/rubocop/cop/rails/delegate_allow_blank.rb
91
94
  - lib/rubocop/cop/rails/dynamic_find_by.rb
@@ -95,6 +98,7 @@ files:
95
98
  - lib/rubocop/cop/rails/exit.rb
96
99
  - lib/rubocop/cop/rails/file_path.rb
97
100
  - lib/rubocop/cop/rails/find_by.rb
101
+ - lib/rubocop/cop/rails/find_by_id.rb
98
102
  - lib/rubocop/cop/rails/find_each.rb
99
103
  - lib/rubocop/cop/rails/has_and_belongs_to_many.rb
100
104
  - lib/rubocop/cop/rails/has_many_or_has_one_dependent.rb
@@ -104,34 +108,47 @@ files:
104
108
  - lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
105
109
  - lib/rubocop/cop/rails/index_by.rb
106
110
  - lib/rubocop/cop/rails/index_with.rb
111
+ - lib/rubocop/cop/rails/inquiry.rb
107
112
  - lib/rubocop/cop/rails/inverse_of.rb
108
113
  - lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
109
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
110
118
  - lib/rubocop/cop/rails/not_null_column.rb
111
119
  - lib/rubocop/cop/rails/output.rb
112
120
  - lib/rubocop/cop/rails/output_safety.rb
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
113
125
  - lib/rubocop/cop/rails/pluralization_grammar.rb
114
126
  - lib/rubocop/cop/rails/presence.rb
115
127
  - lib/rubocop/cop/rails/present.rb
116
128
  - lib/rubocop/cop/rails/rake_environment.rb
117
129
  - lib/rubocop/cop/rails/read_write_attribute.rb
118
130
  - lib/rubocop/cop/rails/redundant_allow_nil.rb
131
+ - lib/rubocop/cop/rails/redundant_foreign_key.rb
119
132
  - lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
120
133
  - lib/rubocop/cop/rails/reflection_class_name.rb
121
134
  - lib/rubocop/cop/rails/refute_methods.rb
122
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
123
138
  - lib/rubocop/cop/rails/request_referer.rb
124
139
  - lib/rubocop/cop/rails/reversible_migration.rb
125
140
  - lib/rubocop/cop/rails/safe_navigation.rb
126
141
  - lib/rubocop/cop/rails/safe_navigation_with_blank.rb
127
142
  - lib/rubocop/cop/rails/save_bang.rb
128
143
  - lib/rubocop/cop/rails/scope_args.rb
144
+ - lib/rubocop/cop/rails/short_i18n.rb
129
145
  - lib/rubocop/cop/rails/skips_model_validations.rb
130
146
  - lib/rubocop/cop/rails/time_zone.rb
131
147
  - lib/rubocop/cop/rails/uniq_before_pluck.rb
132
148
  - lib/rubocop/cop/rails/unique_validation_without_index.rb
133
149
  - lib/rubocop/cop/rails/unknown_env.rb
134
150
  - lib/rubocop/cop/rails/validation.rb
151
+ - lib/rubocop/cop/rails/where_exists.rb
135
152
  - lib/rubocop/cop/rails_cops.rb
136
153
  - lib/rubocop/rails.rb
137
154
  - lib/rubocop/rails/inject.rb
@@ -142,10 +159,10 @@ homepage: https://github.com/rubocop-hq/rubocop-rails
142
159
  licenses:
143
160
  - MIT
144
161
  metadata:
145
- homepage_uri: https://docs.rubocop.org/projects/rails/
162
+ homepage_uri: https://docs.rubocop.org/rubocop-rails/
146
163
  changelog_uri: https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md
147
164
  source_code_uri: https://github.com/rubocop-hq/rubocop-rails/
148
- documentation_uri: https://docs.rubocop.org/projects/rails/
165
+ documentation_uri: https://docs.rubocop.org/rubocop-rails/
149
166
  bug_tracker_uri: https://github.com/rubocop-hq/rubocop-rails/issues
150
167
  post_install_message:
151
168
  rdoc_options: []
@@ -155,14 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
172
  requirements:
156
173
  - - ">="
157
174
  - !ruby/object:Gem::Version
158
- version: 2.3.0
175
+ version: 2.4.0
159
176
  required_rubygems_version: !ruby/object:Gem::Requirement
160
177
  requirements:
161
178
  - - ">="
162
179
  - !ruby/object:Gem::Version
163
180
  version: '0'
164
181
  requirements: []
165
- rubygems_version: 3.1.2
182
+ rubygems_version: 3.1.4
166
183
  signing_key:
167
184
  specification_version: 4
168
185
  summary: Automatic Rails code style checking tool.