simplycop 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 266e346cb15a66ac2a156e5aa7f9baa95db52601c74759ebf8de088e65d5555a
4
- data.tar.gz: 4c59e192a0733f3311c104868ab9b70a746310c58b1f58515334e9b366127d6a
3
+ metadata.gz: 7362f9d8422f344163d22b674dc3fdb8d9f4b2e2d585388b7f6b5a1881d82fd6
4
+ data.tar.gz: 6469456915a8038c072feddfabab005d6e16820b7a3e313e0d32500d3b919e38
5
5
  SHA512:
6
- metadata.gz: e5c2b709e412069b735d778df516789fce3253a6aa8fc6e691f412639d7b8cde5adaf36ca09a62bb82b326e44480d98358b4c4480d707bda8e4f12c2a1a3269b
7
- data.tar.gz: 8da07133883fda0eefcd34f750dacc2f0d43e3480ddb719a32d943de61ec089b91641c28935ccf3fc498ecc79cbe962c2f88fbc4210b3afc91d62f363e9ee539
6
+ metadata.gz: 8117e1a3def558122e55504c58d03ed82fa92d8998c3246db79c7d4ed4b60ac9b04c64496727f2470e4d32570f714a4b65e9b66942f4d27e0183c419ee39e4bf
7
+ data.tar.gz: 7be3e664e083ac3dcc1dc82c44e819f44536bb987926687937b8c4b4b7ece9ff506e0748ea4f22a68acdb9a9b58ad842c596f18d010eb842706693dce418c96f
@@ -18,6 +18,7 @@ AllCops:
18
18
  DisplayStyleGuide: true
19
19
  UseCache: true
20
20
  MaxFilesInCache: 5000
21
+ ExtraDetails: true
21
22
  # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
22
23
 
23
24
  Naming/VariableName:
@@ -216,6 +217,10 @@ Style/LambdaCall:
216
217
  Metrics/ModuleLength:
217
218
  Enabled: true
218
219
 
220
+ Metrics/BlockLength:
221
+ Exclude:
222
+ - spec/**/*.rb
223
+
219
224
  Style/For:
220
225
  Enabled: true
221
226
 
@@ -1,64 +1,20 @@
1
1
  require:
2
2
  - rubocop-rails
3
3
 
4
- AllCops:
5
- Exclude:
6
- - 'db/schema.rb'
7
- - 'vendor/**/*'
8
-
9
- # Cop names are not displayed in offense messages by default. Change behavior
10
- # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
11
- # option.
12
- DisplayCopNames: true
13
- # Style guide URLs are not displayed in offense messages by default. Change
14
- # behavior by overriding DisplayStyleGuide, or by giving the
15
- # -S/--display-style-guide option.
16
- DisplayStyleGuide: true
17
- UseCache: true
18
- MaxFilesInCache: 5000
19
- # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
20
-
21
- Rails:
22
- Enabled: true
23
-
24
- ## Rails Cops
25
- Rails/TimeZone:
26
- Enabled: true
27
- Severity: warning
28
-
29
- Rails/Date:
30
- Enabled: true
31
- Severity: warning
32
-
33
- Rails/Delegate:
34
- Enabled: false
35
-
36
- Rails/Output:
37
- Enabled: true
38
-
39
- Rails/Validation:
40
- Enabled: true
41
-
42
- Rails/FindBy:
43
- Enabled: true
44
-
45
- Rails/ActionFilter:
46
- Enabled: true
47
-
48
- Rails/ReadWriteAttribute:
4
+ Rails/ActiveRecordCallbacksOrder:
49
5
  Enabled: true
50
6
 
51
- Rails/PluralizationGrammar:
7
+ Rails/AfterCommitOverride:
52
8
  Enabled: true
53
9
 
54
- Rails/SkipsModelValidations:
10
+ Rails/AttributeDefaultBlockValue:
55
11
  Enabled: true
56
12
 
57
- Rails/ActiveRecordCallbacksOrder:
13
+ Rails/DefaultScope:
58
14
  Enabled: true
59
15
 
60
- Rails/AfterCommitOverride:
61
- Enabled: true
16
+ Rails/Delegate:
17
+ Enabled: false
62
18
 
63
19
  Rails/FindById:
64
20
  Enabled: true
@@ -75,9 +31,11 @@ Rails/MatchRoute:
75
31
  Rails/NegateInclude:
76
32
  Enabled: true
77
33
 
34
+ # Conflicts with Mongoid
78
35
  Rails/Pluck:
79
36
  Enabled: false
80
37
 
38
+ # Conflicts with Mongoid
81
39
  Rails/PluckInWhere:
82
40
  Enabled: false
83
41
 
@@ -93,17 +51,13 @@ Rails/ShortI18n:
93
51
  Rails/SquishedSQLHeredocs:
94
52
  Enabled: true
95
53
 
54
+ Rails/WhereEquals:
55
+ Enabled: true
56
+
57
+ # Conflicts with Mongoid
96
58
  Rails/WhereExists:
97
59
  Enabled: false
98
60
 
61
+ # Conflicts with Mongoid
99
62
  Rails/WhereNot:
100
63
  Enabled: false
101
-
102
- Rails/WhereEquals:
103
- Enabled: true
104
-
105
- Rails/AttributeDefaultBlockValue:
106
- Enabled: true
107
-
108
- Rails/ArelStar:
109
- Enabled: true
@@ -1,234 +1,48 @@
1
1
  require:
2
2
  - rubocop-rspec
3
3
 
4
- RSpec/ContextMethod:
5
- Enabled: false
6
-
7
- RSpec/LeakyConstantDeclaration:
8
- Enabled: false
9
-
10
- RSpec/EmptyLineAfterExample:
11
- Enabled: false
12
-
13
- RSpec/AnyInstance:
14
- Description: Check that instances are not being stubbed globally.
15
- Enabled: true
16
-
17
- RSpec/AroundBlock:
18
- Description: Checks that around blocks actually run the test.
19
- Enabled: true
20
-
21
- RSpec/BeEql:
22
- Description: Check for expectations where `be(...)` can replace `eql(...)`.
23
- Enabled: true
24
-
25
4
  RSpec/BeforeAfterAll:
26
- Description: Check that before/after(:all) isn't being used.
27
5
  Enabled: false
28
6
 
29
7
  RSpec/DescribeClass:
30
- Description: Check that the first argument to the top level describe is a constant.
31
- Enabled: false
32
-
33
- RSpec/DescribedClass:
34
- Description: Checks that tests use `described_class`.
35
- SkipBlocks: false
36
8
  Enabled: false
37
- EnforcedStyle: described_class
38
- SupportedStyles:
39
- - described_class
40
- - explicit
41
9
 
42
10
  RSpec/DescribeMethod:
43
- Description: Checks that the second argument to `describe` specifies a method.
44
- Enabled: false
45
-
46
- RSpec/DescribeSymbol:
47
- Description: Avoid describing symbols.
48
11
  Enabled: false
49
12
 
50
- RSpec/IteratedExpectation:
51
- Description: Check that `all` matcher is used instead of iterating over an array.
52
- Enabled: true
53
-
54
- RSpec/EmptyExampleGroup:
55
- Description: Checks if an example group does not include any tests.
56
- Enabled: true
57
-
58
- RSpec/EmptyLineAfterFinalLet:
59
- Description: Checks if there is an empty line after the last let block.
60
- Enabled: false
61
-
62
- RSpec/EmptyLineAfterSubject:
63
- Description: Checks if there is an empty line after subject block.
13
+ RSpec/DescribedClass:
64
14
  Enabled: false
65
15
 
66
16
  RSpec/ExampleLength:
67
- Description: Checks for long examples.
68
17
  Enabled: false
69
- Max: 5
70
-
71
- RSpec/ExampleWording:
72
- Description: Checks for common mistakes in example descriptions.
73
- Enabled: true
74
- CustomTransform:
75
- be: is
76
- BE: IS
77
- have: has
78
- HAVE: HAS
79
- IgnoredWords: []
80
-
81
- RSpec/ExpectActual:
82
- Description: Checks for `expect(...)` calls containing literal values.
83
- Enabled: true
84
18
 
85
19
  RSpec/ExpectOutput:
86
- Description: Checks for opportunities to use `expect { ... }.to output`.
87
20
  Enabled: false
88
21
 
89
22
  RSpec/FilePath:
90
- Description: Checks that spec file paths are consistent with the test subject.
91
- Enabled: false
92
- CustomTransform:
93
- RuboCop: rubocop
94
- RSpec: rspec
95
- IgnoreMethods: false
96
-
97
- RSpec/Focus:
98
- Description: Checks if examples are focused.
99
- Enabled: false
100
-
101
- RSpec/HookArgument:
102
- Description: Checks the arguments passed to `before`, `around`, and `after`.
103
- Enabled: true
104
- EnforcedStyle: implicit
105
- SupportedStyles:
106
- - implicit
107
- - each
108
- - example
109
-
110
- RSpec/ImplicitExpect:
111
- Description: Check that a consistent implicit expectation style is used.
112
- Enabled: true
113
- EnforcedStyle: is_expected
114
- SupportedStyles:
115
- - is_expected
116
- - should
117
-
118
- RSpec/InstanceSpy:
119
- Description: Checks for `instance_double` used with `have_received`.
120
23
  Enabled: false
121
24
 
122
25
  RSpec/InstanceVariable:
123
- Description: Checks for instance variable usage in specs.
124
- AssignmentOnly: false
125
26
  Enabled: false
126
27
 
127
- RSpec/ItBehavesLike:
128
- Description: Checks that only one `it_behaves_like` style is used.
129
- Enabled: true
130
- EnforcedStyle: it_behaves_like
131
- SupportedStyles:
132
- - it_behaves_like
133
- - it_should_behave_like
134
-
135
- RSpec/LeadingSubject:
136
- Description: Checks for `subject` definitions that come after `let` definitions.
137
- Enabled: true
138
-
139
- RSpec/LetSetup:
140
- Description: Checks unreferenced `let!` calls being used for test setup.
141
- Enabled: true
142
-
143
- RSpec/MessageChain:
144
- Description: Check that chains of messages are not being stubbed.
145
- Enabled: true
146
-
147
- RSpec/MessageExpectation:
148
- Description: Checks for consistent message expectation style.
149
- Enabled: false
150
- EnforcedStyle: allow
151
- SupportedStyles:
152
- - allow
153
- - expect
154
-
155
28
  RSpec/MessageSpies:
156
- Description: Checks that message expectations are set using spies.
157
29
  Enabled: false
158
- EnforcedStyle: have_received
159
- SupportedStyles:
160
- - have_received
161
- - receive
162
-
163
- RSpec/MultipleDescribes:
164
- Description: Checks for multiple top level describes.
165
- Enabled: true
166
30
 
167
31
  RSpec/MultipleExpectations:
168
- Description: Checks if examples contain too many `expect` calls.
169
32
  Enabled: false
170
- Max: 1
171
33
 
172
34
  RSpec/MultipleMemoizedHelpers:
173
35
  Enabled: false
174
36
 
175
- RSpec/NamedSubject:
176
- Description: Checks for explicitly referenced test subjects.
177
- Enabled: true
178
-
179
37
  RSpec/NestedGroups:
180
- Description: Checks for nested example groups.
181
38
  Enabled: true
182
39
  Max: 4
183
40
 
184
41
  RSpec/NotToNot:
185
- Description: Checks for consistent method usage for negating expectations.
186
- EnforcedStyle: not_to
187
- SupportedStyles:
188
- - not_to
189
- - to_not
190
42
  Enabled: false
191
43
 
192
- RSpec/OverwritingSetup:
193
- Enabled: true
194
- Description: Checks if there is a let/subject that overwrites an existing one.
195
-
196
- RSpec/RepeatedDescription:
197
- Enabled: true
198
- Description: Check for repeated description strings in example groups.
199
-
200
- RSpec/RepeatedExample:
201
- Enabled: true
202
- Description: Check for repeated examples within example groups.
203
-
204
- RSpec/SharedContext:
205
- Description: Checks for proper shared_context and shared_examples usage.
206
- Enabled: true
207
-
208
- RSpec/SingleArgumentMessageChain:
209
- Description: Checks that chains of messages contain more than one element.
210
- Enabled: true
211
-
212
- RSpec/ScatteredLet:
213
- Description: Checks for let scattered across the example group.
214
- Enabled: true
215
-
216
44
  RSpec/ScatteredSetup:
217
- Description: Checks for setup scattered across multiple hooks in an example group.
218
- Enabled: false
219
-
220
- RSpec/SubjectStub:
221
- Description: Checks for stubbed test subjects.
222
- Enabled: true
223
-
224
- RSpec/VerifiedDoubles:
225
- Description: Prefer using verifying doubles over normal doubles.
226
45
  Enabled: false
227
- IgnoreSymbolicNames: true
228
-
229
- Metrics/BlockLength:
230
- Exclude:
231
- - 'spec/**/*.rb'
232
46
 
233
47
  RSpec/StubbedMock:
234
48
  Enabled: false
@@ -3,9 +3,6 @@ require:
3
3
  - './lib/simplycop/security/reject_all_requests_local.rb'
4
4
  - './lib/simplycop/security/check_for_vulnerable_code.rb'
5
5
 
6
- AllCops:
7
- ExtraDetails: true
8
-
9
6
  Security/CSRFTokenValidation:
10
7
  Enabled: true
11
8
  Details: >-
@@ -7,5 +7,5 @@
7
7
  #
8
8
 
9
9
  module Simplycop
10
- VERSION = '1.3.0'
10
+ VERSION = '1.4.0'
11
11
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_dependency 'rubocop', '~> 1.6.1'
21
21
  spec.add_dependency 'rubocop-rails', '~> 2.9.0'
22
- spec.add_dependency 'rubocop-rspec', '~> 2.0.1'
22
+ spec.add_dependency 'rubocop-rspec', '~> 2.1.0'
23
23
  spec.add_development_dependency 'bundler'
24
24
  spec.add_development_dependency 'rake', '>= 12.3.3'
25
25
  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: 1.3.0
4
+ version: 1.4.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: 2020-12-17 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.0.1
47
+ version: 2.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 2.0.1
54
+ version: 2.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement