Dutchie-Style 1.0.2 → 1.0.7

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: 066526e708d8f2a893f5ea9cd80e3f604561ecceff470388428d28d1aa3ec840
4
- data.tar.gz: b9f4d64f67af501279d8e0256b89b42ce485ff6a117a46fc0e1fd9b76a2402c5
3
+ metadata.gz: c69dc43615ecb7c6ff2ed0227adf72aad4624335a4eac8bd05fbd26a77115e88
4
+ data.tar.gz: 3ccac1ce08f3b92cf1c6a849861a640e06571a9bda9ef75aae289e18547828ab
5
5
  SHA512:
6
- metadata.gz: feb63624398019cf3f98a2f098a1ec4f3a5b2a879c5bd479fcbfb437aa98ae25285a96ba5cf883a65606db9d634b7296085800fcd292af55b2d2eef672430489
7
- data.tar.gz: e48233617b83933614c6e5ce7d9a171a2c866ac9e21ea2db913f8aa13beba52514d42593b7197102a14c304c013d55f551cce7f2448baffb6a547bbbb8c7329c
6
+ metadata.gz: f8624992de693b1f7ac48151b31ea299b63d3655414c9e24e8a15549153d47dbbb6c07bb22ae5deab5e1521c60a49f6583af6ab9fae3750e53087ddd93ad57f1
7
+ data.tar.gz: 5b1ea31e288124fe8f7dd7b679a18c063c804d82c22f494bb9339bf45081cb0a37119d721aa3955e8519b6c9c1832fd8381da3c3b259b81b972cbd6fd3e39502
data/.gitignore CHANGED
@@ -19,12 +19,10 @@ yarn-error.log
19
19
 
20
20
  # Ignore master key for decrypting credentials and more.
21
21
  /config/master.key
22
-
23
22
  .env
24
23
 
25
24
  # Emacs droppings
26
25
  *~
27
-
28
26
  *.gem
29
27
 
30
28
  # Mac OS noise
@@ -26,5 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ["lib"]
28
28
 
29
- spec.add_dependency "rubocop", "~> 0.86.0"
29
+ spec.add_dependency "rubocop", "~> 0.93.1"
30
+ spec.add_dependency "rubocop-rspec"
31
+ spec.add_dependency "rubocop-rails"
30
32
  end
data/Gemfile CHANGED
@@ -5,4 +5,5 @@ gemspec
5
5
 
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.0"
8
- gem "rubocop", "~> 0.86"
8
+ gem "rubocop", "~> 0.93.1"
9
+ gem "rubocop-rails", "~> 2.6.0"
@@ -1,20 +1,33 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Dutchie-Style (1.0.1)
5
- rubocop (~> 0.86.0)
4
+ Dutchie-Style (1.0.4)
5
+ rubocop (~> 0.93.1)
6
+ rubocop-rails
7
+ rubocop-rspec
6
8
 
7
9
  GEM
8
10
  remote: https://rubygems.org/
9
11
  specs:
12
+ activesupport (6.0.3.2)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+ zeitwerk (~> 2.2, >= 2.2.2)
10
18
  ast (2.4.1)
19
+ concurrent-ruby (1.1.7)
11
20
  diff-lcs (1.4.2)
21
+ i18n (1.8.5)
22
+ concurrent-ruby (~> 1.0)
23
+ minitest (5.14.2)
12
24
  parallel (1.19.2)
13
- parser (2.7.1.4)
25
+ parser (2.7.2.0)
14
26
  ast (~> 2.4.1)
27
+ rack (2.2.3)
15
28
  rainbow (3.0.0)
16
29
  rake (12.3.3)
17
- regexp_parser (1.7.1)
30
+ regexp_parser (1.8.2)
18
31
  rexml (3.2.4)
19
32
  rspec (3.9.0)
20
33
  rspec-core (~> 3.9.0)
@@ -29,19 +42,30 @@ GEM
29
42
  diff-lcs (>= 1.2.0, < 2.0)
30
43
  rspec-support (~> 3.9.0)
31
44
  rspec-support (3.9.3)
32
- rubocop (0.86.0)
45
+ rubocop (0.93.1)
33
46
  parallel (~> 1.10)
34
- parser (>= 2.7.0.1)
47
+ parser (>= 2.7.1.5)
35
48
  rainbow (>= 2.2.2, < 4.0)
36
- regexp_parser (>= 1.7)
49
+ regexp_parser (>= 1.8)
37
50
  rexml
38
- rubocop-ast (>= 0.0.3, < 1.0)
51
+ rubocop-ast (>= 0.6.0)
39
52
  ruby-progressbar (~> 1.7)
40
53
  unicode-display_width (>= 1.4.0, < 2.0)
41
- rubocop-ast (0.0.3)
42
- parser (>= 2.7.0.1)
54
+ rubocop-ast (0.7.1)
55
+ parser (>= 2.7.1.5)
56
+ rubocop-rails (2.6.0)
57
+ activesupport (>= 4.2.0)
58
+ rack (>= 1.1)
59
+ rubocop (>= 0.82.0)
60
+ rubocop-rspec (1.44.0)
61
+ rubocop (~> 0.87)
62
+ rubocop-ast (~> 0.7.1)
43
63
  ruby-progressbar (1.10.1)
64
+ thread_safe (0.3.6)
65
+ tzinfo (1.2.7)
66
+ thread_safe (~> 0.1)
44
67
  unicode-display_width (1.7.0)
68
+ zeitwerk (2.4.0)
45
69
 
46
70
  PLATFORMS
47
71
  ruby
@@ -50,7 +74,8 @@ DEPENDENCIES
50
74
  Dutchie-Style!
51
75
  rake (~> 12.0)
52
76
  rspec (~> 3.0)
53
- rubocop (~> 0.86)
77
+ rubocop (~> 0.93.1)
78
+ rubocop-rails (~> 2.6.0)
54
79
 
55
80
  BUNDLED WITH
56
81
  2.1.4
data/README.md CHANGED
@@ -13,5 +13,6 @@ It is available as a rubygem as well as an NPM package.
13
13
  Includes:
14
14
 
15
15
  * RuboCop Config
16
+ * RuboCop Rspec Config
16
17
  * Eslint Config
17
18
  * Prettier Config
@@ -1,3 +1,7 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rails
4
+
1
5
  AllCops:
2
6
  TargetRubyVersion: 2.6
3
7
  EnabledByDefault: true
@@ -8,7 +12,6 @@ AllCops:
8
12
  - 'vendor/**/*'
9
13
  - 'config/**/*'
10
14
  - 'docs/**/*'
11
- - 'spec/**/*'
12
15
  - 'app/channels/**/*'
13
16
  - 'script/**/*'
14
17
  - 'lib/assets/**/*'
@@ -54,6 +57,10 @@ Layout/SpaceInsideBlockBraces:
54
57
  Layout/SpaceInsideHashLiteralBraces:
55
58
  EnforcedStyle: no_space
56
59
 
60
+ # Exclude RSpec
61
+ Metrics/BlockLength:
62
+ ExcludedMethods: ['describe', 'context']
63
+
57
64
  # Too short methods lead to extraction of single-use methods, which can make
58
65
  # the code easier to read (by naming things), but can also clutter the class
59
66
  Metrics/MethodLength:
@@ -100,12 +107,15 @@ Style/StringLiterals:
100
107
  Style/HashSyntax:
101
108
  EnforcedStyle: ruby19_no_mixed_keys
102
109
 
110
+ # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashEachMethods
103
111
  Style/HashEachMethods:
104
- Enabled: false
112
+ Enabled: true
105
113
 
114
+ # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashTransformKeys
106
115
  Style/HashTransformKeys:
107
116
  Enabled: false
108
117
 
118
+ # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashTransformValues
109
119
  Style/HashTransformValues:
110
120
  Enabled: false
111
121
 
@@ -172,11 +182,6 @@ Style/RaiseArgs:
172
182
  Style/SignalException:
173
183
  EnforcedStyle: only_raise
174
184
 
175
- # { ... } for multi-line blocks is okay, follow Weirichs rule instead:
176
- # https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc
177
- Style/BlockDelimiters:
178
- Enabled: false
179
-
180
185
  # do / end blocks should be used for side effects,
181
186
  # methods that run a block for side effects and have
182
187
  # a useful return value are rare, assign the return
@@ -200,10 +205,10 @@ Style/MethodDefParentheses:
200
205
  Lint/ShadowingOuterLocalVariable:
201
206
  Enabled: false
202
207
 
203
- # There are valid cases, for example debugging Cucumber steps,
204
- # also they'll fail CI anyway
208
+ # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint/Debugger
209
+ # Show linting errors on debugger/binding.pry even in development
205
210
  Lint/Debugger:
206
- Enabled: false
211
+ Enabled: true
207
212
 
208
213
  Lint/AssignmentInCondition:
209
214
  AllowSafeAssignment: false
@@ -216,4 +221,30 @@ Naming/BinaryOperatorParameterName:
216
221
  Enabled: false
217
222
 
218
223
  Lint/ConstantResolution:
219
- Enabled: false
224
+ Enabled: false
225
+
226
+
227
+ # Rails
228
+ Rails/SaveBang:
229
+ Enabled: false
230
+
231
+ # Temporarily removing until Mongoid is no more...
232
+ # Mongoid #find_by raises an exception if it can't be found, unlike AR #find_by, so .where().first is preferred
233
+ # Rubocop can't tell the difference between the two
234
+ Rails/FindBy:
235
+ Enabled: false
236
+ Include:
237
+ - app/**/*.rb
238
+
239
+ # RSpec
240
+ RSpec/AlignLeftLetBrace:
241
+ Enabled: true
242
+
243
+ RSpec/AlignRightLetBrace:
244
+ Enabled: false
245
+
246
+ RSpec/MultipleMemoizedHelpers:
247
+ Max: 10
248
+
249
+ RSpec/NestedGroups:
250
+ Max: 5
@@ -1,5 +1,5 @@
1
1
  module Dutchie
2
2
  module Style
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Dutchie-Style
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Ostrowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-29 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
15
+ prerelease: false
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: 0.86.0
20
+ version: 0.93.1
20
21
  type: :runtime
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.0
26
+ version: 0.93.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rspec
29
+ prerelease: false
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-rails
43
+ prerelease: false
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  description: Rubocop Settings for all dutchie Ruby Apps
28
56
  email:
29
57
  - chris@dutchie.com