rubocop-rails 2.4.1 → 2.6.0
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.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +6 -2
- data/config/default.yml +71 -6
- data/lib/rubocop-rails.rb +3 -0
- data/lib/rubocop/cop/mixin/active_record_helper.rb +77 -0
- data/lib/rubocop/cop/mixin/index_method.rb +161 -0
- data/lib/rubocop/cop/rails/content_tag.rb +82 -0
- data/lib/rubocop/cop/rails/create_table_with_timestamps.rb +1 -3
- data/lib/rubocop/cop/rails/delegate.rb +1 -3
- data/lib/rubocop/cop/rails/dynamic_find_by.rb +40 -15
- data/lib/rubocop/cop/rails/environment_comparison.rb +60 -14
- data/lib/rubocop/cop/rails/exit.rb +2 -2
- data/lib/rubocop/cop/rails/file_path.rb +1 -0
- data/lib/rubocop/cop/rails/http_positional_arguments.rb +2 -2
- data/lib/rubocop/cop/rails/http_status.rb +2 -0
- data/lib/rubocop/cop/rails/index_by.rb +56 -0
- data/lib/rubocop/cop/rails/index_with.rb +59 -0
- data/lib/rubocop/cop/rails/inverse_of.rb +0 -4
- data/lib/rubocop/cop/rails/link_to_blank.rb +1 -3
- data/lib/rubocop/cop/rails/pick.rb +51 -0
- data/lib/rubocop/cop/rails/presence.rb +2 -6
- data/lib/rubocop/cop/rails/rake_environment.rb +24 -6
- data/lib/rubocop/cop/rails/redundant_foreign_key.rb +80 -0
- data/lib/rubocop/cop/rails/redundant_receiver_in_with_options.rb +0 -3
- data/lib/rubocop/cop/rails/refute_methods.rb +52 -26
- data/lib/rubocop/cop/rails/reversible_migration.rb +6 -1
- data/lib/rubocop/cop/rails/save_bang.rb +16 -9
- data/lib/rubocop/cop/rails/skips_model_validations.rb +4 -1
- data/lib/rubocop/cop/rails/time_zone.rb +1 -3
- data/lib/rubocop/cop/rails/uniq_before_pluck.rb +16 -16
- data/lib/rubocop/cop/rails/unique_validation_without_index.rb +155 -0
- data/lib/rubocop/cop/rails/unknown_env.rb +7 -6
- data/lib/rubocop/cop/rails_cops.rb +8 -0
- data/lib/rubocop/rails/inject.rb +1 -1
- data/lib/rubocop/rails/schema_loader.rb +61 -0
- data/lib/rubocop/rails/schema_loader/schema.rb +190 -0
- data/lib/rubocop/rails/version.rb +1 -1
- metadata +32 -8
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.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:
|
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.
|
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.
|
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/
|
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/
|
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.
|
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.
|
168
|
+
rubygems_version: 3.1.3
|
145
169
|
signing_key:
|
146
170
|
specification_version: 4
|
147
171
|
summary: Automatic Rails code style checking tool.
|