simplycop 1.19.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -1
- data/.simplycop_capybara.yml +35 -0
- data/.simplycop_factory_bot.yml +36 -0
- data/.simplycop_rails.yml +3 -0
- data/.simplycop_rspec.yml +14 -120
- data/.simplycop_rspec_rails.yml +23 -0
- data/catalog-info.yaml +1 -0
- data/docs/index.md +10 -0
- data/lib/simplycop/security/reject_all_requests_local.rb +1 -1
- data/lib/simplycop/version.rb +1 -1
- data/simplycop.gemspec +6 -3
- metadata +53 -9
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16b93b73b29f5f2761bfe622cf8a34dc1186c7f89605119f46eea9a8e1b3eb4f
|
4
|
+
data.tar.gz: 821f8d934644b1a0c88fcbcdf9e177af15bb884b8e01a9fe07a2bcdf85d1c6f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34b98203ee0fdfe46c1c6df161135a99f8972b5b6b647b9fbcd54bfcbd1cdbabf875546032897ee27ef0b2113f150ea8b8e7fedb8b948595d377d54064c0025
|
7
|
+
data.tar.gz: df80073336238ec58f6f1e5cbc1301114120d529c31a3ba75fd1e63f4bad88ecbb06924e456fd5573dbe57ff1e279f7f48c7b12e467f7f4c5d6eb5a758174118
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
inherit_from:
|
2
2
|
- .simplycop.yml
|
3
|
+
- .simplycop_capybara.yml
|
4
|
+
- .simplycop_factory_bot.yml
|
5
|
+
- .simplycop_performance.yml
|
6
|
+
- .simplycop_rails.yml
|
3
7
|
- .simplycop_rspec.yml
|
8
|
+
- .simplycop_rspec_rails.yml
|
4
9
|
|
5
10
|
AllCops:
|
6
|
-
TargetRubyVersion: 3.1
|
11
|
+
TargetRubyVersion: 3.1
|
12
|
+
Exclude:
|
13
|
+
- simplycop.gemspec
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-capybara
|
3
|
+
|
4
|
+
Capybara/ClickLinkOrButtonStyle:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Capybara/CurrentPathExpectation:
|
8
|
+
Enabled: true
|
9
|
+
|
10
|
+
Capybara/MatchStyle:
|
11
|
+
Enabled: true
|
12
|
+
|
13
|
+
Capybara/NegationMatcher:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
Capybara/RedundantWithinFind:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Capybara/SpecificActions:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
Capybara/SpecificFinders:
|
23
|
+
Enabled: true
|
24
|
+
|
25
|
+
Capybara/SpecificMatcher:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
Capybara/VisibilityMatcher:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
Capybara/RSpec/HaveSelector:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
Capybara/RSpec/PredicateMatcher:
|
35
|
+
Enabled: true
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-factory_bot
|
3
|
+
|
4
|
+
FactoryBot/AssociationStyle:
|
5
|
+
Enabled: true
|
6
|
+
|
7
|
+
FactoryBot/AttributeDefinedStatically:
|
8
|
+
Enabled: true
|
9
|
+
|
10
|
+
FactoryBot/ConsistentParenthesesStyle:
|
11
|
+
Enabled: true
|
12
|
+
|
13
|
+
FactoryBot/CreateList:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
FactoryBot/ExcessiveCreateList:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
FactoryBot/FactoryAssociationWithStrategy:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
FactoryBot/FactoryClassName:
|
23
|
+
Enabled: true
|
24
|
+
|
25
|
+
FactoryBot/FactoryNameStyle:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
FactoryBot/IdSequence:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
FactoryBot/RedundantFactoryOption:
|
32
|
+
Enabled: true
|
33
|
+
|
34
|
+
# Prefer explicit factorybot call
|
35
|
+
FactoryBot/SyntaxMethods:
|
36
|
+
Enabled: false
|
data/.simplycop_rails.yml
CHANGED
data/.simplycop_rspec.yml
CHANGED
@@ -70,7 +70,14 @@ RSpec/DescribedClassModuleWrapping:
|
|
70
70
|
Enabled: false
|
71
71
|
|
72
72
|
RSpec/Dialect:
|
73
|
-
Enabled:
|
73
|
+
Enabled: true
|
74
|
+
PreferredMethods:
|
75
|
+
background: :before
|
76
|
+
scenario: :it
|
77
|
+
xscenario: :xit
|
78
|
+
given: :let
|
79
|
+
given!: :let!
|
80
|
+
feature: :describe
|
74
81
|
|
75
82
|
RSpec/DuplicatedMetadata:
|
76
83
|
Enabled: true
|
@@ -126,10 +133,10 @@ RSpec/ExpectChange:
|
|
126
133
|
RSpec/ExpectInHook:
|
127
134
|
Enabled: true
|
128
135
|
|
129
|
-
RSpec/
|
130
|
-
Enabled:
|
136
|
+
RSpec/ExpectInLet:
|
137
|
+
Enabled: true
|
131
138
|
|
132
|
-
RSpec/
|
139
|
+
RSpec/ExpectOutput:
|
133
140
|
Enabled: false
|
134
141
|
|
135
142
|
RSpec/Focus:
|
@@ -200,6 +207,9 @@ RSpec/MetadataStyle:
|
|
200
207
|
RSpec/MissingExampleGroupArgument:
|
201
208
|
Enabled: true
|
202
209
|
|
210
|
+
RSpec/MissingExpectationTargetMethod:
|
211
|
+
Enabled: true
|
212
|
+
|
203
213
|
RSpec/MultipleDescribes:
|
204
214
|
Enabled: true
|
205
215
|
|
@@ -333,119 +343,3 @@ RSpec/VoidExpect:
|
|
333
343
|
|
334
344
|
RSpec/Yield:
|
335
345
|
Enabled: true
|
336
|
-
|
337
|
-
# Rspec/Capybara
|
338
|
-
|
339
|
-
# Similar to FactoryBot (see below) there is an RSpec/Capybara department and a separate Capybara
|
340
|
-
# package which is not installed in simplycop. This configuration is just for the RSpec department.
|
341
|
-
# The namespacing has been changed to avoid warnings.
|
342
|
-
|
343
|
-
RSpec/Capybara:
|
344
|
-
Enabled: true
|
345
|
-
Include:
|
346
|
-
- spec/integration/*.rb
|
347
|
-
|
348
|
-
Capybara/CurrentPathExpectation:
|
349
|
-
Enabled: true
|
350
|
-
|
351
|
-
RSpec/Capybara/FeatureMethods:
|
352
|
-
Enabled: true
|
353
|
-
|
354
|
-
Capybara/MatchStyle:
|
355
|
-
Enabled: true
|
356
|
-
|
357
|
-
Capybara/NegationMatcher:
|
358
|
-
Enabled: true
|
359
|
-
|
360
|
-
Capybara/SpecificActions:
|
361
|
-
Enabled: true
|
362
|
-
|
363
|
-
Capybara/SpecificFinders:
|
364
|
-
Enabled: true
|
365
|
-
|
366
|
-
Capybara/SpecificMatcher:
|
367
|
-
Enabled: true
|
368
|
-
|
369
|
-
Capybara/VisibilityMatcher:
|
370
|
-
Enabled: true
|
371
|
-
|
372
|
-
# RSpec/FactoryBot
|
373
|
-
# NB: There is an RSpec/FactoryBot department and a separate FactoryBot package. The FactoryBot package is
|
374
|
-
# not installed on simplycop. The configuration is just for the RSpec department, namespaced to avoid warnings.
|
375
|
-
|
376
|
-
FactoryBot/AttributeDefinedStatically:
|
377
|
-
Enabled: true
|
378
|
-
|
379
|
-
FactoryBot/ConsistentParenthesesStyle:
|
380
|
-
Enabled: true
|
381
|
-
|
382
|
-
FactoryBot/CreateList:
|
383
|
-
Enabled: false
|
384
|
-
|
385
|
-
FactoryBot/FactoryClassName:
|
386
|
-
Enabled: true
|
387
|
-
|
388
|
-
FactoryBot/FactoryNameStyle:
|
389
|
-
Enabled: true
|
390
|
-
|
391
|
-
# Prefer explicit factorybot call
|
392
|
-
FactoryBot/SyntaxMethods:
|
393
|
-
Enabled: false
|
394
|
-
|
395
|
-
# Previously some FactoryBot package cops were configured due to the above confusion. There is less crossover between
|
396
|
-
# RSpec/FactoryBot and FactoryBot than Capybara, so it generated a number of errors when they weren't found.
|
397
|
-
# This is how they were configured:
|
398
|
-
|
399
|
-
# FactoryBot/AssociationStyle:
|
400
|
-
# Enabled: true
|
401
|
-
|
402
|
-
# FactoryBot/AttributeDefinedStatically:
|
403
|
-
# Enabled: true
|
404
|
-
|
405
|
-
# FactoryBot/ConsistentParenthesesStyle:
|
406
|
-
# Enabled: true
|
407
|
-
|
408
|
-
# FactoryBot/CreateList:
|
409
|
-
# Enabled: false
|
410
|
-
|
411
|
-
# FactoryBot/FactoryAssociationWithStrategy:
|
412
|
-
# Enabled: true
|
413
|
-
|
414
|
-
# FactoryBot/FactoryClassName:
|
415
|
-
# Enabled: true
|
416
|
-
|
417
|
-
# FactoryBot/FactoryNameStyle:
|
418
|
-
# Enabled: true
|
419
|
-
|
420
|
-
# FactoryBot/IdSequence:
|
421
|
-
# Enabled: true
|
422
|
-
|
423
|
-
# FactoryBot/RedundantFactoryOption:
|
424
|
-
# Enabled: true
|
425
|
-
|
426
|
-
# # Prefer explicit factorybot call
|
427
|
-
# FactoryBot/SyntaxMethods:
|
428
|
-
# Enabled: false
|
429
|
-
|
430
|
-
# Rspec/Rails
|
431
|
-
|
432
|
-
RSpecRails/AvoidSetupHook: # new in 2.4
|
433
|
-
Enabled: true
|
434
|
-
|
435
|
-
RSpecRails/HaveHttpStatus:
|
436
|
-
Enabled: true
|
437
|
-
|
438
|
-
RSpecRails/HttpStatus:
|
439
|
-
Enabled: true
|
440
|
-
|
441
|
-
RSpecRails/InferredSpecType:
|
442
|
-
Enabled: true
|
443
|
-
|
444
|
-
RSpecRails/MinitestAssertions:
|
445
|
-
Enabled: true
|
446
|
-
|
447
|
-
RSpecRails/NegationBeValid:
|
448
|
-
Enabled: true
|
449
|
-
|
450
|
-
RSpecRails/TravelAround:
|
451
|
-
Enabled: true
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec_rails
|
3
|
+
|
4
|
+
RSpecRails/AvoidSetupHook:
|
5
|
+
Enabled: true
|
6
|
+
|
7
|
+
RSpecRails/HaveHttpStatus:
|
8
|
+
Enabled: true
|
9
|
+
|
10
|
+
RSpecRails/HttpStatus:
|
11
|
+
Enabled: true
|
12
|
+
|
13
|
+
RSpecRails/InferredSpecType:
|
14
|
+
Enabled: true
|
15
|
+
|
16
|
+
RSpecRails/MinitestAssertions:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
RSpecRails/NegationBeValid:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
RSpecRails/TravelAround:
|
23
|
+
Enabled: true
|
data/catalog-info.yaml
CHANGED
@@ -7,6 +7,7 @@ metadata:
|
|
7
7
|
annotations:
|
8
8
|
github.com/project-slug: "simplybusiness/simplycop"
|
9
9
|
backstage.io/source-location: url:https://github.com/simplybusiness/simplycop/
|
10
|
+
simplybusiness.com/bnw-app-name: simplycop
|
10
11
|
simplybusiness.com/sast-scanning: enabled
|
11
12
|
spec:
|
12
13
|
type: library
|
data/docs/index.md
CHANGED
@@ -56,6 +56,16 @@ inherit_gem:
|
|
56
56
|
- .simplycop_rspec.yml
|
57
57
|
```
|
58
58
|
|
59
|
+
You may also want the following packages:
|
60
|
+
```yaml
|
61
|
+
|
62
|
+
- .simplycop_capybara.yml
|
63
|
+
- .simplycop_factory_bot.yml
|
64
|
+
- .simplycop_rspec_rails.yml
|
65
|
+
```
|
66
|
+
|
67
|
+
NB: Capybara, FactoryBot and RSpecRails cops were previously available either via departments within `rubocop_rspec` or as packages in their own right. As of `rubocop_rspec` v3, they no longer exist as departments within `rubocop_rspec` and the packages need installing independently. If you use simplycop v1, you will still have access to some of these cops by inheriting `.simplycop_rspec`. As of simplycop v2 (which uses `rubocop_rspec` v3) you would need to inherit the packages individually.
|
68
|
+
|
59
69
|
## Usage
|
60
70
|
|
61
71
|
Run Rubocop as you would usually do, i.e.
|
data/lib/simplycop/version.rb
CHANGED
data/simplycop.gemspec
CHANGED
@@ -17,10 +17,13 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_dependency 'rubocop', '1.64.
|
21
|
-
spec.add_dependency 'rubocop-
|
20
|
+
spec.add_dependency 'rubocop', '1.64.1'
|
21
|
+
spec.add_dependency 'rubocop-capybara', '2.21.0'
|
22
|
+
spec.add_dependency 'rubocop-factory_bot', '2.26.1'
|
23
|
+
spec.add_dependency 'rubocop-performance', '1.21.1'
|
22
24
|
spec.add_dependency 'rubocop-rails', '2.25.0'
|
23
|
-
spec.add_dependency 'rubocop-rspec', '
|
25
|
+
spec.add_dependency 'rubocop-rspec', '3.0.1'
|
26
|
+
spec.add_dependency 'rubocop-rspec_rails', '2.30.0'
|
24
27
|
spec.add_development_dependency 'bundler', '>= 2.2.15'
|
25
28
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
26
29
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplycop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simply Business
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,28 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.64.
|
19
|
+
version: 1.64.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.64.
|
26
|
+
version: 1.64.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-capybara
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.21.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.21.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop-factory_bot
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.26.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.26.1
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: rubocop-performance
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - '='
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.21.
|
61
|
+
version: 1.21.1
|
34
62
|
type: :runtime
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - '='
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.21.
|
68
|
+
version: 1.21.1
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: rubocop-rails
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +86,28 @@ dependencies:
|
|
58
86
|
requirements:
|
59
87
|
- - '='
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
89
|
+
version: 3.0.1
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.0.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-rspec_rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.30.0
|
62
104
|
type: :runtime
|
63
105
|
prerelease: false
|
64
106
|
version_requirements: !ruby/object:Gem::Requirement
|
65
107
|
requirements:
|
66
108
|
- - '='
|
67
109
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
110
|
+
version: 2.30.0
|
69
111
|
- !ruby/object:Gem::Dependency
|
70
112
|
name: bundler
|
71
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,6 +174,8 @@ files:
|
|
132
174
|
- ".ruby-version"
|
133
175
|
- ".simplycop.yml"
|
134
176
|
- ".simplycop_bundler.yml"
|
177
|
+
- ".simplycop_capybara.yml"
|
178
|
+
- ".simplycop_factory_bot.yml"
|
135
179
|
- ".simplycop_gemspec.yml"
|
136
180
|
- ".simplycop_layout.yml"
|
137
181
|
- ".simplycop_lint.yml"
|
@@ -142,6 +186,7 @@ files:
|
|
142
186
|
- ".simplycop_performance.yml"
|
143
187
|
- ".simplycop_rails.yml"
|
144
188
|
- ".simplycop_rspec.yml"
|
189
|
+
- ".simplycop_rspec_rails.yml"
|
145
190
|
- ".simplycop_security.yml"
|
146
191
|
- ".simplycop_style.yml"
|
147
192
|
- CODEOWNERS
|
@@ -152,7 +197,6 @@ files:
|
|
152
197
|
- _pipeline/stage_publishdocs.yml
|
153
198
|
- _pipeline/stage_sast_tools.yml
|
154
199
|
- bin/console
|
155
|
-
- bin/setup
|
156
200
|
- catalog-info.yaml
|
157
201
|
- docs/index.md
|
158
202
|
- lib/simplycop.rb
|