rubocop-rails 2.4.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +6 -2
  4. data/config/default.yml +71 -6
  5. data/lib/rubocop-rails.rb +3 -0
  6. data/lib/rubocop/cop/mixin/active_record_helper.rb +77 -0
  7. data/lib/rubocop/cop/mixin/index_method.rb +161 -0
  8. data/lib/rubocop/cop/rails/content_tag.rb +82 -0
  9. data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +1 -3
  10. data/lib/rubocop/cop/rails/delegate.rb +1 -3
  11. data/lib/rubocop/cop/rails/dynamic_find_by.rb +40 -15
  12. data/lib/rubocop/cop/rails/environment_comparison.rb +60 -14
  13. data/lib/rubocop/cop/rails/exit.rb +2 -2
  14. data/lib/rubocop/cop/rails/file_path.rb +1 -0
  15. data/lib/rubocop/cop/rails/http_positional_arguments.rb +2 -2
  16. data/lib/rubocop/cop/rails/http_status.rb +2 -0
  17. data/lib/rubocop/cop/rails/index_by.rb +56 -0
  18. data/lib/rubocop/cop/rails/index_with.rb +59 -0
  19. data/lib/rubocop/cop/rails/inverse_of.rb +0 -4
  20. data/lib/rubocop/cop/rails/link_to_blank.rb +1 -3
  21. data/lib/rubocop/cop/rails/pick.rb +51 -0
  22. data/lib/rubocop/cop/rails/presence.rb +2 -6
  23. data/lib/rubocop/cop/rails/rake_environment.rb +24 -6
  24. data/lib/rubocop/cop/rails/redundant_foreign_key.rb +80 -0
  25. data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +0 -3
  26. data/lib/rubocop/cop/rails/refute_methods.rb +52 -26
  27. data/lib/rubocop/cop/rails/reversible_migration.rb +6 -1
  28. data/lib/rubocop/cop/rails/save_bang.rb +16 -9
  29. data/lib/rubocop/cop/rails/skips_model_validations.rb +4 -1
  30. data/lib/rubocop/cop/rails/time_zone.rb +1 -3
  31. data/lib/rubocop/cop/rails/uniq_before_pluck.rb +16 -16
  32. data/lib/rubocop/cop/rails/unique_validation_without_index.rb +155 -0
  33. data/lib/rubocop/cop/rails/unknown_env.rb +7 -6
  34. data/lib/rubocop/cop/rails_cops.rb +8 -0
  35. data/lib/rubocop/rails/inject.rb +1 -1
  36. data/lib/rubocop/rails/schema_loader.rb +61 -0
  37. data/lib/rubocop/rails/schema_loader/schema.rb +190 -0
  38. data/lib/rubocop/rails/version.rb +1 -1
  39. metadata +32 -8
@@ -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.4.1'
7
+ STRING = '2.6.0'
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.4.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,8 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-12-25 00:00:00.000000000 Z
13
+ date: 2020-06-08 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 4.2.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 4.2.0
15
29
  - !ruby/object:Gem::Dependency
16
30
  name: rack
17
31
  requirement: !ruby/object:Gem::Requirement
@@ -32,14 +46,14 @@ dependencies:
32
46
  requirements:
33
47
  - - ">="
34
48
  - !ruby/object:Gem::Version
35
- version: 0.72.0
49
+ version: 0.82.0
36
50
  type: :runtime
37
51
  prerelease: false
38
52
  version_requirements: !ruby/object:Gem::Requirement
39
53
  requirements:
40
54
  - - ">="
41
55
  - !ruby/object:Gem::Version
42
- version: 0.72.0
56
+ version: 0.82.0
43
57
  description: |
44
58
  Automatic Rails code style checking tool.
45
59
  A RuboCop extension focused on enforcing Rails best practices and coding conventions.
@@ -55,6 +69,8 @@ files:
55
69
  - bin/setup
56
70
  - config/default.yml
57
71
  - lib/rubocop-rails.rb
72
+ - lib/rubocop/cop/mixin/active_record_helper.rb
73
+ - lib/rubocop/cop/mixin/index_method.rb
58
74
  - lib/rubocop/cop/mixin/target_rails_version.rb
59
75
  - lib/rubocop/cop/rails/action_filter.rb
60
76
  - lib/rubocop/cop/rails/active_record_aliases.rb
@@ -68,6 +84,7 @@ files:
68
84
  - lib/rubocop/cop/rails/belongs_to.rb
69
85
  - lib/rubocop/cop/rails/blank.rb
70
86
  - lib/rubocop/cop/rails/bulk_change_table.rb
87
+ - lib/rubocop/cop/rails/content_tag.rb
71
88
  - lib/rubocop/cop/rails/create_table_with_timestamps.rb
72
89
  - lib/rubocop/cop/rails/date.rb
73
90
  - lib/rubocop/cop/rails/delegate.rb
@@ -86,18 +103,22 @@ files:
86
103
  - lib/rubocop/cop/rails/http_positional_arguments.rb
87
104
  - lib/rubocop/cop/rails/http_status.rb
88
105
  - lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb
106
+ - lib/rubocop/cop/rails/index_by.rb
107
+ - lib/rubocop/cop/rails/index_with.rb
89
108
  - lib/rubocop/cop/rails/inverse_of.rb
90
109
  - lib/rubocop/cop/rails/lexically_scoped_action_filter.rb
91
110
  - lib/rubocop/cop/rails/link_to_blank.rb
92
111
  - lib/rubocop/cop/rails/not_null_column.rb
93
112
  - lib/rubocop/cop/rails/output.rb
94
113
  - lib/rubocop/cop/rails/output_safety.rb
114
+ - lib/rubocop/cop/rails/pick.rb
95
115
  - lib/rubocop/cop/rails/pluralization_grammar.rb
96
116
  - lib/rubocop/cop/rails/presence.rb
97
117
  - lib/rubocop/cop/rails/present.rb
98
118
  - lib/rubocop/cop/rails/rake_environment.rb
99
119
  - lib/rubocop/cop/rails/read_write_attribute.rb
100
120
  - lib/rubocop/cop/rails/redundant_allow_nil.rb
121
+ - lib/rubocop/cop/rails/redundant_foreign_key.rb
101
122
  - lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb
102
123
  - lib/rubocop/cop/rails/reflection_class_name.rb
103
124
  - lib/rubocop/cop/rails/refute_methods.rb
@@ -111,20 +132,23 @@ files:
111
132
  - lib/rubocop/cop/rails/skips_model_validations.rb
112
133
  - lib/rubocop/cop/rails/time_zone.rb
113
134
  - lib/rubocop/cop/rails/uniq_before_pluck.rb
135
+ - lib/rubocop/cop/rails/unique_validation_without_index.rb
114
136
  - lib/rubocop/cop/rails/unknown_env.rb
115
137
  - lib/rubocop/cop/rails/validation.rb
116
138
  - lib/rubocop/cop/rails_cops.rb
117
139
  - lib/rubocop/rails.rb
118
140
  - lib/rubocop/rails/inject.rb
141
+ - lib/rubocop/rails/schema_loader.rb
142
+ - lib/rubocop/rails/schema_loader/schema.rb
119
143
  - lib/rubocop/rails/version.rb
120
144
  homepage: https://github.com/rubocop-hq/rubocop-rails
121
145
  licenses:
122
146
  - MIT
123
147
  metadata:
124
- homepage_uri: https://docs.rubocop.org/projects/rails
148
+ homepage_uri: https://docs.rubocop.org/rubocop-rails/
125
149
  changelog_uri: https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md
126
150
  source_code_uri: https://github.com/rubocop-hq/rubocop-rails/
127
- documentation_uri: https://docs.rubocop.org/projects/rails
151
+ documentation_uri: https://docs.rubocop.org/rubocop-rails/
128
152
  bug_tracker_uri: https://github.com/rubocop-hq/rubocop-rails/issues
129
153
  post_install_message:
130
154
  rdoc_options: []
@@ -134,14 +158,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
158
  requirements:
135
159
  - - ">="
136
160
  - !ruby/object:Gem::Version
137
- version: 2.3.0
161
+ version: 2.4.0
138
162
  required_rubygems_version: !ruby/object:Gem::Requirement
139
163
  requirements:
140
164
  - - ">="
141
165
  - !ruby/object:Gem::Version
142
166
  version: '0'
143
167
  requirements: []
144
- rubygems_version: 3.1.2
168
+ rubygems_version: 3.1.3
145
169
  signing_key:
146
170
  specification_version: 4
147
171
  summary: Automatic Rails code style checking tool.