aroundhome_cops 2.0.0 → 4.1.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: 8b9bd51596d52489367945aaa124fd6553037b18c02532108d7257ce32cdc730
4
- data.tar.gz: be240ec3e67e0f2d0b6c5df03ec67ec4fbb6430dd0a169e436bf78eab4284b54
3
+ metadata.gz: 0aa989da6d5148c3fec013805e7cf05eb35e9cc5474e1c8e0b1b9586ff49ad83
4
+ data.tar.gz: 2599d7b62ac3bb217689b1f5e72bc9ee21e53617a7b0318b551a53e5d60471b5
5
5
  SHA512:
6
- metadata.gz: 55bf0c984dec9a4618ca6666a3f55eb0bad1fa6e9853c65bcec2f5bf51cd99f883cf558e5f2a37dcd35c3fbdc9e19f03b39170ed63014f5219124cdbedcdae4c
7
- data.tar.gz: fbe4d180f3285f76b38dd1371004d265d22c9efbd212b8073541d3efa6e128a5dfcf126687931f0fc6d55b5a5b7ccd1973cdd5f3fb367ebe677c39e2a2f0b47b
6
+ metadata.gz: 77d867c3da27835acc6533928c487f2f7825ed8552ecf7cd167a05b97030345c5cac11abd8e1d3d35cc7f52f8363aa9977b9206251759f9ec66d44e16601b413
7
+ data.tar.gz: 304234f4fd850d263bfcfb8ccd72fdf77aab3a60fb94ff476b8be7d4bed18e8a3b4829ac0dcf49370372dc4df6ec208eaa42f69a2fc7c7c1f32ea379815f0c47
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.5.8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## Version 4.1.0
2
+ * Specify more precise defaults for rspec
3
+ * upgrade rubocop and rubocop-rspec and enable new offenses
4
+
5
+ ## Version 4.0.0
6
+ * Opt into all Rubocop offenses up until 1.18
7
+ * Add rubocop-rspec as a dependency, to enforce better specs
8
+
9
+ ## Version 3.0.0
10
+
11
+ * Support Rubocop 1.0 and opt into all offenses up until 1.13
12
+
13
+ ## Version 2.1.0
14
+
15
+ * Allow ambiguous blocks in specs
16
+
1
17
  ## Version 2.0.0
2
18
 
3
19
  * Rename to `aroundhome_cops` (our company name changed a while ago)
@@ -18,5 +18,8 @@ Gem::Specification.new do |spec|
18
18
  .reject { |f| f.match(%r{^spec/}) }
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'rubocop', '~> 0.86'
21
+ spec.required_ruby_version = '>= 2.5.0'
22
+
23
+ spec.add_dependency 'rubocop', '~> 1.22'
24
+ spec.add_dependency 'rubocop-rspec', '~> 2.5'
22
25
  end
data/default.yml CHANGED
@@ -1,3 +1,6 @@
1
+ require:
2
+ - rubocop-rspec
3
+
1
4
  AllCops:
2
5
  Exclude:
3
6
  - 'bin/**/*'
@@ -19,6 +22,17 @@ AllCops:
19
22
  - 'db/migrate/2015*.rb'
20
23
  - 'db/migrate/2016*.rb'
21
24
  - 'db/migrate/2017*.rb'
25
+ SuggestExtensions:
26
+ rubocop-rails: false
27
+
28
+ # While we like to write blocks like the following
29
+ # expect { add_special_project }.not_to change { SpecialProject.count }
30
+ # Rubocop doesn't like that and prefers either of the following options for clarity
31
+ # expect { add_special_project }.not_to change(SpecialProject, :count)
32
+ # expect { add_special_project }.not_to(change { SpecialProject.count })
33
+ Lint/AmbiguousBlockAssociation:
34
+ Exclude:
35
+ - 'spec/**/*'
22
36
 
23
37
  # Models can have a bunch of attributes which lead to long methods and high
24
38
  # complexity values. However, these methods are still very readable because they
@@ -38,7 +52,7 @@ Layout/LineLength:
38
52
  # long, since they are less comparable to methods and more comparable to
39
53
  # modules/classes.
40
54
  Metrics/BlockLength:
41
- ExcludedMethods:
55
+ IgnoredMethods:
42
56
  - context
43
57
  - describe
44
58
  - namespace
@@ -116,6 +130,35 @@ Style/FormatStringToken:
116
130
  Metrics/ParameterLists:
117
131
  CountKeywordArgs: false
118
132
 
133
+ # Adding "and" prefix to list of allowed prefixes to allow for nested contexts
134
+ # that start with "and" as a connector word "when foo is true and bar is false"
135
+ RSpec/ContextWording:
136
+ Prefixes:
137
+ - when
138
+ - with
139
+ - without
140
+ - and
141
+
142
+ # Complex tests require more flexibility in their length than allowed by default (5).
143
+ RSpec/ExampleLength:
144
+ Max: 10
145
+
146
+ # Complex tests often rely on more objects than allowed by default (5).
147
+ RSpec/MultipleMemoizedHelpers:
148
+ Max: 10
149
+
150
+ # We rarely use named subjects in our own projects.
151
+ # While it is a good practice in some cases, we do not want to enforce it
152
+ # through Rubocop.
153
+ # https://www.rubydoc.info/gems/rubocop-rspec/1.6.0/RuboCop/Cop/RSpec/NamedSubject
154
+ RSpec/NamedSubject:
155
+ Enabled: false
156
+
157
+ # Complex tests often generate more readable output with deeper nesting. The
158
+ # default (3) doesn't provide enough flexibility.
159
+ RSpec/NestedGroups:
160
+ Max: 7
161
+
119
162
  # ----------------- Rubocop-forced enablements --------------
120
163
 
121
164
  # Since version 0.80 rubocop wants to cause fewer breaking changes by new cops.
@@ -124,44 +167,103 @@ Metrics/ParameterLists:
124
167
  # them below.
125
168
  # Disabled cops will appear above with a comment explaining disablement.
126
169
 
127
- Layout/SpaceAroundMethodCallOperator:
170
+ Gemspec/DateAssignment: # (new in 1.10)
128
171
  Enabled: true
129
-
130
- Lint/RaiseException:
172
+ Layout/SpaceBeforeBrackets: # (new in 1.7)
131
173
  Enabled: true
132
-
133
- Lint/StructNewOverride:
174
+ Lint/AmbiguousAssignment: # (new in 1.7)
134
175
  Enabled: true
135
-
136
- Style/ExponentialNotation:
176
+ Lint/AmbiguousOperatorPrecedence: # (new in 1.21)
137
177
  Enabled: true
138
-
139
- Style/HashEachMethods:
178
+ Lint/AmbiguousRange: # (new in 1.19)
140
179
  Enabled: true
141
-
142
- Style/HashTransformKeys:
180
+ Lint/DeprecatedConstants: # (new in 1.8)
143
181
  Enabled: true
144
-
145
- Style/HashTransformValues:
182
+ Lint/DuplicateBranch: # (new in 1.3)
146
183
  Enabled: true
147
-
148
- Layout/EmptyLinesAroundAttributeAccessor:
184
+ Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
149
185
  Enabled: true
150
-
151
- Lint/DeprecatedOpenSSLConstant:
186
+ Lint/EmptyBlock: # (new in 1.1)
152
187
  Enabled: true
153
-
154
- Lint/MixedRegexpCaptureTypes:
188
+ Lint/EmptyClass: # (new in 1.3)
155
189
  Enabled: true
156
-
157
- Style/RedundantFetchBlock:
190
+ Lint/IncompatibleIoSelectWithFiberScheduler: # (new in 1.21)
158
191
  Enabled: true
159
-
160
- Style/RedundantRegexpCharacterClass:
192
+ Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
161
193
  Enabled: true
162
-
163
- Style/RedundantRegexpEscape:
194
+ Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
195
+ Enabled: true
196
+ Lint/NumberedParameterAssignment: # (new in 1.9)
197
+ Enabled: true
198
+ Lint/OrAssignmentToConstant: # (new in 1.9)
199
+ Enabled: true
200
+ Lint/RedundantDirGlobSort: # (new in 1.8)
201
+ Enabled: true
202
+ Lint/RequireRelativeSelfPath: # (new in 1.22)
203
+ Enabled: true
204
+ Lint/SymbolConversion: # (new in 1.9)
205
+ Enabled: true
206
+ Lint/ToEnumArguments: # (new in 1.1)
207
+ Enabled: true
208
+ Lint/TripleQuotes: # (new in 1.9)
209
+ Enabled: true
210
+ Lint/UnexpectedBlockArity: # (new in 1.5)
211
+ Enabled: true
212
+ Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
213
+ Enabled: true
214
+ Security/IoMethods: # (new in 1.22)
215
+ Enabled: true
216
+ Style/ArgumentsForwarding: # (new in 1.1)
217
+ Enabled: true
218
+ Style/CollectionCompact: # (new in 1.2)
219
+ Enabled: true
220
+ Style/DocumentDynamicEvalDefinition: # (new in 1.1)
221
+ Enabled: true
222
+ Style/EndlessMethod: # (new in 1.8)
223
+ Enabled: true
224
+ Style/HashConversion: # (new in 1.10)
225
+ Enabled: true
226
+ Style/HashExcept: # (new in 1.7)
227
+ Enabled: true
228
+ Style/IfWithBooleanLiteralBranches: # (new in 1.9)
229
+ Enabled: true
230
+ Style/NegatedIfElseCondition: # (new in 1.2)
231
+ Enabled: true
232
+ Style/NilLambda: # (new in 1.3)
233
+ Enabled: true
234
+ Style/NumberedParameters: # (new in 1.22)
235
+ Enabled: true
236
+ Style/NumberedParametersLimit: # (new in 1.22)
237
+ Enabled: true
238
+ Style/RedundantArgument: # (new in 1.4)
239
+ Enabled: true
240
+ Style/RedundantSelfAssignmentBranch: # (new in 1.19)
241
+ Enabled: true
242
+ Style/SelectByRegexp: # (new in 1.22)
243
+ Enabled: true
244
+ Style/StringChars: # (new in 1.12)
245
+ Enabled: true
246
+ Style/SwapValues: # (new in 1.1)
247
+ Enabled: true
248
+ Layout/LineEndStringConcatenationIndentation: # (new in 1.18)
249
+ Enabled: true
250
+ Lint/EmptyInPattern: # (new in 1.16)
251
+ Enabled: true
252
+ Naming/InclusiveLanguage: # (new in 1.18)
253
+ Enabled: true
254
+ Style/InPatternThen: # (new in 1.16)
255
+ Enabled: true
256
+ Style/MultilineInPatternThen: # (new in 1.16)
257
+ Enabled: true
258
+ Style/QuotedSymbols: # (new in 1.16)
164
259
  Enabled: true
165
260
 
166
- Style/SlicingWithRange:
261
+ # ----------------- Rubocop-Rspec forced enablements --------------
262
+ RSpec/ExcessiveDocstringSpacing: # (new in 2.5)
263
+ Enabled: true
264
+ RSpec/IdenticalEqualityAssertion: # (new in 2.4)
265
+ Enabled: true
266
+ RSpec/Rails/AvoidSetupHook: # (new in 2.4)
267
+ Enabled: true
268
+ RSpec/SubjectDeclaration: # (new in 2.5)
167
269
  Enabled: true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AroundhomeCops
4
- VERSION = '2.0.0'
4
+ VERSION = '4.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aroundhome_cops
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Sandbrink
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2021-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.86'
19
+ version: '1.22'
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: '0.86'
26
+ version: '1.22'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.5'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.5'
27
41
  description:
28
42
  email:
29
43
  - jan.sandbrink@aroundhome.de
@@ -34,6 +48,7 @@ files:
34
48
  - ".gitignore"
35
49
  - ".gitlab-ci.yml"
36
50
  - ".rubocop.yml"
51
+ - ".ruby-version"
37
52
  - CHANGELOG.md
38
53
  - Gemfile
39
54
  - README.md
@@ -51,14 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
66
  requirements:
52
67
  - - ">="
53
68
  - !ruby/object:Gem::Version
54
- version: '0'
69
+ version: 2.5.0
55
70
  required_rubygems_version: !ruby/object:Gem::Requirement
56
71
  requirements:
57
72
  - - ">="
58
73
  - !ruby/object:Gem::Version
59
74
  version: '0'
60
75
  requirements: []
61
- rubygems_version: 3.1.2
76
+ rubygems_version: 3.2.22
62
77
  signing_key:
63
78
  specification_version: 4
64
79
  summary: Dependency and configuration for rubocop.