boxt_ruby_style_guide 6.1.0 → 7.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/Rakefile +4 -5
- data/VERSION +1 -1
- data/default.yml +3 -0
- data/pending.yml +66 -4
- data/rails-pending.yml +32 -0
- data/rails.yml +43 -0
- data/rspec.yml +1 -0
- metadata +18 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8d245e5aad7c71c1aa998f9e8272b81d7037cbfe0d953e84df7105704c7f188
|
4
|
+
data.tar.gz: 38eae0cb20956bd72d4b0c6da69f12a9f552807ebd8ef818aac1b968377f8b39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9095ec5eb47c695654ffa6544e1c119423e0ea0753e669c0cc324d7f6f34dbc5ecab4167ea65f90a2e84521907742633c0029b01c52e3dbc5f568b4dc1a7f91e
|
7
|
+
data.tar.gz: b8f8a9962911bb754ee613a92423f25f84f3573ce20db4cb0ac0ec28ec45484e2f30ce14fc0185258230cc9620a7752c695e64087c6ccc06eef9a3075b1bc280
|
data/README.md
CHANGED
@@ -43,6 +43,8 @@ inherit_gem:
|
|
43
43
|
- default.yml # use default cops
|
44
44
|
- pending.yml # use pending cops
|
45
45
|
- rails.yml # use Rails cops - see Additional Extensions/Cops
|
46
|
+
- rails-pending.yml # use pending rails cops
|
47
|
+
- rspec.yml # use rspec cops
|
46
48
|
```
|
47
49
|
|
48
50
|
### Additional Extensions/Cops
|
@@ -51,6 +53,7 @@ The following Rubocop gems are also installed with this gem:
|
|
51
53
|
|
52
54
|
* [rubocop-faker](https://github.com/koic/rubocop-faker)
|
53
55
|
* [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails)
|
56
|
+
* [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec)
|
54
57
|
|
55
58
|
To enable add the following to your `.rubocop.yml` file.
|
56
59
|
|
@@ -62,6 +65,7 @@ inherit_gem:
|
|
62
65
|
require:
|
63
66
|
- rubocop-faker # if your project is using the Faker gem then add this
|
64
67
|
- rubocop-rails # if your project is a Rails app/engine then add this, plus the - rails.yml setting above
|
68
|
+
- rubocop-rspec # if your project is using rspec then add this, plus the - rspec.yml setting above
|
65
69
|
```
|
66
70
|
|
67
71
|
## Lint Tasks
|
data/Rakefile
CHANGED
@@ -2,13 +2,12 @@
|
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rake/testtask"
|
5
|
+
require "rspec/core/rake_task"
|
5
6
|
|
6
7
|
import "./tasks/lint.rake"
|
7
8
|
|
8
|
-
|
9
|
-
t.
|
10
|
-
t.libs << "lib"
|
11
|
-
t.test_files = FileList["test/**/*_test.rb"]
|
9
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
10
|
+
t.pattern = Dir.glob("spec/**/*_spec.rb")
|
12
11
|
end
|
13
12
|
|
14
|
-
task
|
13
|
+
task test: :spec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
7.0.4
|
data/default.yml
CHANGED
@@ -15,12 +15,15 @@ Metrics/BlockLength:
|
|
15
15
|
- "*.gemspec"
|
16
16
|
- "Gemfile"
|
17
17
|
- "config/routes.rb"
|
18
|
+
- "spec/**/*"
|
18
19
|
- "test/**/*"
|
19
20
|
Metrics/ClassLength:
|
20
21
|
Exclude:
|
22
|
+
- "spec/**/*"
|
21
23
|
- "test/**/*"
|
22
24
|
Metrics/MethodLength:
|
23
25
|
Exclude:
|
26
|
+
- "spec/**/*"
|
24
27
|
- "test/**/*"
|
25
28
|
Style/DoubleNegation:
|
26
29
|
Enabled: false
|
data/pending.yml
CHANGED
@@ -1,30 +1,92 @@
|
|
1
1
|
# These cops are currently pending and will be enabled by default at some point, but adding for now to stop Rubocop
|
2
|
-
# complaining...
|
2
|
+
# or VSCode complaining...
|
3
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
4
|
+
Enabled: true
|
5
|
+
Layout/SpaceAroundMethodCallOperator:
|
6
|
+
Enabled: true
|
7
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
8
|
+
Enabled: true
|
3
9
|
Lint/DeprecatedOpenSSLConstant:
|
4
10
|
Enabled: true
|
5
|
-
Lint/
|
11
|
+
Lint/DuplicateElsifCondition:
|
6
12
|
Enabled: true
|
7
|
-
|
13
|
+
Lint/DuplicateRequire:
|
8
14
|
Enabled: true
|
9
|
-
|
15
|
+
Lint/DuplicateRescueException:
|
16
|
+
Enabled: true
|
17
|
+
Lint/EmptyConditionalBody:
|
18
|
+
Enabled: true
|
19
|
+
Lint/EmptyFile:
|
20
|
+
Enabled: true
|
21
|
+
Lint/FloatComparison:
|
22
|
+
Enabled: true
|
23
|
+
Lint/MissingSuper:
|
24
|
+
Enabled: true
|
25
|
+
Lint/MixedRegexpCaptureTypes:
|
26
|
+
Enabled: true
|
27
|
+
Lint/OutOfRangeRegexpRef:
|
10
28
|
Enabled: true
|
11
29
|
Lint/RaiseException:
|
12
30
|
Enabled: true
|
31
|
+
Lint/SelfAssignment:
|
32
|
+
Enabled: true
|
13
33
|
Lint/StructNewOverride:
|
14
34
|
Enabled: true
|
35
|
+
Lint/TopLevelReturnWithArgument:
|
36
|
+
Enabled: true
|
37
|
+
Lint/TrailingCommaInAttributeDeclaration:
|
38
|
+
Enabled: true
|
39
|
+
Lint/UnreachableLoop:
|
40
|
+
Enabled: true
|
41
|
+
Lint/UselessMethodDefinition:
|
42
|
+
Enabled: true
|
43
|
+
Style/AccessorGrouping:
|
44
|
+
Enabled: true
|
45
|
+
Style/ArrayCoercion:
|
46
|
+
Enabled: true
|
47
|
+
Style/BisectedAttrAccessor:
|
48
|
+
Enabled: true
|
49
|
+
Style/CaseLikeIf:
|
50
|
+
Enabled: true
|
51
|
+
Style/CombinableLoops:
|
52
|
+
Enabled: true
|
53
|
+
Style/ExplicitBlockArgument:
|
54
|
+
Enabled: true
|
15
55
|
Style/ExponentialNotation:
|
16
56
|
Enabled: true
|
57
|
+
Style/GlobalStdStream:
|
58
|
+
Enabled: true
|
59
|
+
Style/HashAsLastArrayItem:
|
60
|
+
Enabled: true
|
17
61
|
Style/HashEachMethods:
|
18
62
|
Enabled: true
|
63
|
+
Style/HashLikeCase:
|
64
|
+
Enabled: true
|
19
65
|
Style/HashTransformKeys:
|
20
66
|
Enabled: true
|
21
67
|
Style/HashTransformValues:
|
22
68
|
Enabled: true
|
69
|
+
Style/KeywordParametersOrder:
|
70
|
+
Enabled: true
|
71
|
+
Style/OptionalBooleanParameter:
|
72
|
+
Enabled: true
|
73
|
+
Style/RedundantAssignment:
|
74
|
+
Enabled: true
|
23
75
|
Style/RedundantFetchBlock:
|
24
76
|
Enabled: true
|
77
|
+
Style/RedundantFileExtensionInRequire:
|
78
|
+
Enabled: true
|
25
79
|
Style/RedundantRegexpCharacterClass:
|
26
80
|
Enabled: true
|
27
81
|
Style/RedundantRegexpEscape:
|
28
82
|
Enabled: true
|
83
|
+
Style/RedundantSelfAssignment:
|
84
|
+
Enabled: true
|
85
|
+
Style/SingleArgumentDig:
|
86
|
+
Enabled: true
|
29
87
|
Style/SlicingWithRange:
|
30
88
|
Enabled: true
|
89
|
+
Style/SoleNestedConditional:
|
90
|
+
Enabled: true
|
91
|
+
Style/StringConcatenation:
|
92
|
+
Enabled: true
|
data/rails-pending.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# These cops are currently pending and will be enabled by default at some point, but adding for now to stop Rubocop
|
2
|
+
# or VSCode complaining...
|
3
|
+
Rails/ActiveRecordCallbacksOrder:
|
4
|
+
Enabled: true
|
5
|
+
Rails/AfterCommitOverride:
|
6
|
+
Enabled: true
|
7
|
+
Rails/FindById:
|
8
|
+
Enabled: true
|
9
|
+
Rails/Inquiry:
|
10
|
+
Enabled: true
|
11
|
+
Rails/MailerName:
|
12
|
+
Enabled: true
|
13
|
+
Rails/MatchRoute:
|
14
|
+
Enabled: true
|
15
|
+
Rails/NegateInclude:
|
16
|
+
Enabled: true
|
17
|
+
Rails/Pluck:
|
18
|
+
Enabled: true
|
19
|
+
Rails/PluckInWhere:
|
20
|
+
Enabled: true
|
21
|
+
Rails/RenderInline:
|
22
|
+
Enabled: true
|
23
|
+
Rails/RenderPlainText:
|
24
|
+
Enabled: true
|
25
|
+
Rails/ShortI18n:
|
26
|
+
Enabled: true
|
27
|
+
Rails/SquishedSQLHeredocs:
|
28
|
+
Enabled: true
|
29
|
+
Rails/WhereExists:
|
30
|
+
Enabled: true
|
31
|
+
Rails/WhereNot:
|
32
|
+
Enabled: true
|
data/rails.yml
CHANGED
@@ -1,9 +1,52 @@
|
|
1
1
|
# Rails specific cops
|
2
2
|
Rails/ApplicationController:
|
3
3
|
Exclude:
|
4
|
+
- "spec/**/*"
|
4
5
|
- "test/**/*"
|
5
6
|
Rails/SkipsModelValidations:
|
6
7
|
Exclude:
|
7
8
|
- "db/migrate/**/*"
|
8
9
|
- "lib/tasks/**/*"
|
10
|
+
- "spec/**/*"
|
9
11
|
- "test/**/*"
|
12
|
+
Rails/UnknownEnv:
|
13
|
+
Environments:
|
14
|
+
- cucumber
|
15
|
+
- development
|
16
|
+
- production
|
17
|
+
- qa
|
18
|
+
- test
|
19
|
+
- uat
|
20
|
+
|
21
|
+
# These rails cops are currently pending and will be enabled by default at some point, but adding for now to stop
|
22
|
+
# Rubocop or VSCode complaining...
|
23
|
+
Rails/ActiveRecordCallbacksOrder:
|
24
|
+
Enabled: true
|
25
|
+
Rails/AfterCommitOverride:
|
26
|
+
Enabled: true
|
27
|
+
Rails/FindById:
|
28
|
+
Enabled: true
|
29
|
+
Rails/Inquiry:
|
30
|
+
Enabled: true
|
31
|
+
Rails/MailerName:
|
32
|
+
Enabled: true
|
33
|
+
Rails/MatchRoute:
|
34
|
+
Enabled: true
|
35
|
+
Rails/NegateInclude:
|
36
|
+
Enabled: true
|
37
|
+
Rails/Pluck:
|
38
|
+
Enabled: true
|
39
|
+
Rails/PluckInWhere:
|
40
|
+
Enabled: true
|
41
|
+
Rails/RenderInline:
|
42
|
+
Enabled: true
|
43
|
+
Rails/RenderPlainText:
|
44
|
+
Enabled: true
|
45
|
+
Rails/ShortI18n:
|
46
|
+
Enabled: true
|
47
|
+
Rails/SquishedSQLHeredocs:
|
48
|
+
Enabled: true
|
49
|
+
Rails/WhereExists:
|
50
|
+
Enabled: true
|
51
|
+
Rails/WhereNot:
|
52
|
+
Enabled: true
|
data/rspec.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Rspec specific cops
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxt_ruby_style_guide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boxt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.90.0
|
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.
|
26
|
+
version: 0.90.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-faker
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,49 +53,49 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
type: :
|
61
|
+
version: '1.43'
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.43'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
89
|
+
version: '13.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0
|
96
|
+
version: '13.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec-nc
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
@@ -108,34 +108,6 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.3'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: minitest-reporters
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '1.4'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1.4'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rake
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '13.0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '13.0'
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
112
|
name: simplecov
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,7 +139,9 @@ files:
|
|
167
139
|
- lib/boxt_ruby_style_guide/railtie.rb
|
168
140
|
- lib/boxt_ruby_style_guide/version.rb
|
169
141
|
- pending.yml
|
142
|
+
- rails-pending.yml
|
170
143
|
- rails.yml
|
144
|
+
- rspec.yml
|
171
145
|
homepage: https://github.com/boxt/ruby-style-guide
|
172
146
|
licenses:
|
173
147
|
- MIT
|
@@ -180,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
180
154
|
requirements:
|
181
155
|
- - ">="
|
182
156
|
- !ruby/object:Gem::Version
|
183
|
-
version: '
|
157
|
+
version: '2.7'
|
184
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
159
|
requirements:
|
186
160
|
- - ">="
|