rubocop-config-captive 1.13.0 → 1.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/__private__/rubocop-rspec.yml +2 -2
- data/config/rubocop-rails.yml +15 -0
- data/lib/rubocop/captive/version.rb +1 -1
- data/lib/rubocop/cop/captive/active_admin/active_admin_addons_presence.rb +1 -1
- data/lib/rubocop/cop/captive/no_app_env.rb +1 -1
- data/lib/rubocop/cop/captive/rails/no_find_by_in_scope.rb +3 -1
- data/lib/rubocop/cop/captive/string_where_in_scope.rb +1 -1
- data/lib/rubocop/cop/captive/translation/devise_i18n_presence.rb +1 -1
- data/lib/rubocop/cop/captive/translation/kaminari_i18n_presence.rb +1 -1
- data/lib/rubocop/cop/captive/translation/rails_i18n_presence.rb +1 -1
- data/rubocop-config-captive.gemspec +7 -7
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 974aa4249ecaee7812fa74c5566c3578ee969c94dee2643710bc5b4b1071cf61
|
4
|
+
data.tar.gz: 50f1ac44286b70c25f09337c6abed36d958cdd85bf289f03249a25867515b074
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed2937e7d5a6c021244c73f42cf0645cc0339abc1dd789c96185761f97a13f4f2c6da844c8f5d42167f3367283b2ad1a36c179ee44ab145567bddff0e97a56a0
|
7
|
+
data.tar.gz: 7a5c331bf8187182a88899c8a363de07f5ffbed30907ed9ead34b207c0b730880d2445f4c22af6639d8956cd82e3c9457c8c4b464c5685373f9439841eb09883
|
@@ -87,10 +87,10 @@ RSpec/ExpectInHook:
|
|
87
87
|
RSpec/ExpectOutput:
|
88
88
|
Description: Checks for opportunities to use `expect { ... }.to output`.
|
89
89
|
Enabled: false
|
90
|
-
|
90
|
+
Rails/FilePath:
|
91
91
|
Description: 'Checks the file and folder naming of the spec file.'
|
92
92
|
Enabled: false
|
93
|
-
|
93
|
+
SupportedStyles:
|
94
94
|
RuboCop: rubocop
|
95
95
|
RSpec: rspec
|
96
96
|
RSpec/Focus:
|
data/config/rubocop-rails.yml
CHANGED
@@ -154,3 +154,18 @@ Rails/WhereNot:
|
|
154
154
|
|
155
155
|
Rails/WhereNotWithMultipleConditions:
|
156
156
|
Enabled: true
|
157
|
+
|
158
|
+
Rails/DangerousColumnNames: # new in 2.21
|
159
|
+
Enabled: true
|
160
|
+
Rails/EnumSyntax: # new in 2.26
|
161
|
+
Enabled: true
|
162
|
+
Rails/EnvLocal: # new in 2.22
|
163
|
+
Enabled: true
|
164
|
+
Rails/RedundantActiveRecordAllMethod: # new in 2.21
|
165
|
+
Enabled: true
|
166
|
+
Rails/ThreeStateBooleanColumn: # new in 2.19
|
167
|
+
Enabled: true
|
168
|
+
Rails/UnusedRenderContent: # new in 2.21
|
169
|
+
Enabled: true
|
170
|
+
Rails/WhereRange: # new in 2.25
|
171
|
+
Enabled: true
|
@@ -13,7 +13,7 @@ module RuboCop
|
|
13
13
|
# # good
|
14
14
|
# gem 'activeadmin'
|
15
15
|
# gem 'activeadmin_addons'
|
16
|
-
class ActiveAdminAddonsPresence < RuboCop::Cop::
|
16
|
+
class ActiveAdminAddonsPresence < RuboCop::Cop::Base
|
17
17
|
MSG = "The gem `activeadmin_addons` should be added to the Gemfile "\
|
18
18
|
"if `activeadmin` is present in Gemfile"
|
19
19
|
|
@@ -6,7 +6,7 @@ module RuboCop
|
|
6
6
|
# This cop checks for usages of the `APP_ENV` environment variable.
|
7
7
|
# Usage of `APP_ENV` is prohibited as it conflicts with standard Rails/Rack
|
8
8
|
# environment variable `RAILS_ENV` and may lead to unexpected results.
|
9
|
-
class NoAppEnv < RuboCop::Cop::
|
9
|
+
class NoAppEnv < RuboCop::Cop::Base
|
10
10
|
MSG = "Do not use `APP_ENV` environment variable as it conflicts with "\
|
11
11
|
"standard Rails/Rack environment variable `RAILS_ENV`."
|
12
12
|
|
@@ -5,7 +5,9 @@ module RuboCop
|
|
5
5
|
module Captive
|
6
6
|
module Rails
|
7
7
|
# Avoid using `find_by` in a scope. Use `where` to return a collection or define a class method if you need a single record.
|
8
|
-
|
8
|
+
#
|
9
|
+
# @see https://stackoverflow.com/questions/31329554/find-by-inside-a-scope-is-firing-2-queries
|
10
|
+
class NoFindByInScope < RuboCop::Cop::Base
|
9
11
|
MSG = "Avoid using `find_by` in a scope. Use `where` to return \
|
10
12
|
a collection or define a class method if you need a single record."
|
11
13
|
|
@@ -17,7 +17,7 @@ module RuboCop
|
|
17
17
|
# date_after(Date.current)
|
18
18
|
#
|
19
19
|
# scope :date_after, ->(date) { where('date > ?', date) }
|
20
|
-
class StringWhereInScope < RuboCop::Cop::
|
20
|
+
class StringWhereInScope < RuboCop::Cop::Base
|
21
21
|
MSG = "The `where` method should be used in a scope in a model."
|
22
22
|
|
23
23
|
def_node_matcher :where_with_string?, <<~PATTERN
|
@@ -13,7 +13,7 @@ module RuboCop
|
|
13
13
|
# # good
|
14
14
|
# gem 'devise'
|
15
15
|
# gem 'devise-i18n'
|
16
|
-
class DeviseI18nPresence < RuboCop::Cop::
|
16
|
+
class DeviseI18nPresence < RuboCop::Cop::Base
|
17
17
|
MSG = "The gem `devise-i18n` should be added to the Gemfile "\
|
18
18
|
"if `devise` is present in Gemfile"
|
19
19
|
|
@@ -15,7 +15,7 @@ module RuboCop
|
|
15
15
|
# # good
|
16
16
|
# gem 'kaminari'
|
17
17
|
# gem 'kaminari-i18n'
|
18
|
-
class KaminariI18nPresence < RuboCop::Cop::
|
18
|
+
class KaminariI18nPresence < RuboCop::Cop::Base
|
19
19
|
MSG = "The gem `kaminari-i18n` should be added to the Gemfile "\
|
20
20
|
"if `kaminari` is present in Gemfile"
|
21
21
|
|
@@ -15,7 +15,7 @@ module RuboCop
|
|
15
15
|
# # good
|
16
16
|
# gem 'rails'
|
17
17
|
# gem 'rails-i18n'
|
18
|
-
class RailsI18nPresence < RuboCop::Cop::
|
18
|
+
class RailsI18nPresence < RuboCop::Cop::Base
|
19
19
|
MSG = "The gem `rails-i18n` should be added to the Gemfile "\
|
20
20
|
"if `rails` is present in Gemfile"
|
21
21
|
|
@@ -25,14 +25,14 @@ Gem::Specification.new do |gem|
|
|
25
25
|
# ⚠️ Instead of depending on rubocop-airbnb we copy sources
|
26
26
|
#
|
27
27
|
# gem.add_dependency('rubocop-airbnb', '~> 4.0.0')
|
28
|
-
gem.add_dependency("rubocop", "~> 1.
|
29
|
-
gem.add_dependency("rubocop-performance", "~> 1.
|
28
|
+
gem.add_dependency("rubocop", "~> 1.69.2")
|
29
|
+
gem.add_dependency("rubocop-performance", "~> 1.23.0 ")
|
30
30
|
gem.add_dependency("rubocop-rake", "~> 0.6.0")
|
31
|
-
gem.add_dependency("rubocop-rails", "~> 2.
|
32
|
-
gem.add_dependency("rubocop-rspec", "~>
|
33
|
-
gem.add_dependency("rubocop-capybara", "~> 2.
|
34
|
-
gem.add_dependency("rubocop-factory_bot", "~> 2.
|
35
|
-
gem.add_dependency("rubocop-magic_numbers", "~> 0.
|
31
|
+
gem.add_dependency("rubocop-rails", "~> 2.27.0")
|
32
|
+
gem.add_dependency("rubocop-rspec", "~> 3.3.0")
|
33
|
+
gem.add_dependency("rubocop-capybara", "~> 2.21.0")
|
34
|
+
gem.add_dependency("rubocop-factory_bot", "~> 2.26.1")
|
35
|
+
gem.add_dependency("rubocop-magic_numbers", "~> 0.5.0")
|
36
36
|
gem.add_development_dependency("rspec", "~> 3.12")
|
37
37
|
# gem.metadata['rubygems_mfa_required'] = 'true'
|
38
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-config-captive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Captive
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-12-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.69.2
|
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: 1.
|
28
|
+
version: 1.69.2
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rubocop-performance
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.
|
35
|
+
version: 1.23.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
42
|
+
version: 1.23.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rubocop-rake
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,70 +60,70 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 2.
|
63
|
+
version: 2.27.0
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 2.
|
70
|
+
version: 2.27.0
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: rubocop-rspec
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 3.3.0
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
84
|
+
version: 3.3.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: rubocop-capybara
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 2.
|
91
|
+
version: 2.21.0
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 2.
|
98
|
+
version: 2.21.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: rubocop-factory_bot
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - "~>"
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 2.
|
105
|
+
version: 2.26.1
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 2.
|
112
|
+
version: 2.26.1
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rubocop-magic_numbers
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.
|
119
|
+
version: 0.5.0
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - "~>"
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.
|
126
|
+
version: 0.5.0
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: rspec
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|