boxt_ruby_style_guide 7.0.0 → 7.1.0
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/VERSION +1 -1
- data/default.yml +10 -3
- data/rails-pending.yml +32 -0
- data/rails.yml +41 -0
- data/rspec.yml +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e20314b9f30c0aa6877f32a744b11ae3a3634090272908e2f58af499a78eb676
|
4
|
+
data.tar.gz: e3f6a71a7de4827d49d5bbccc4af225e6a6f94e54481691a47ea611da0ca808f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05a7fd43a1c272f9f46936e19fd8f7bd2a526b1ec47ab6401f513add62c2cb2b92a27ea78373f6a29d2f7622ec39082f383b61f050e66f4c49eaa9d930daddbb
|
7
|
+
data.tar.gz: c8a2a3d2e380b75ecba1fa74ee10e83ed736772c7d6b537e1a458323905b3a5bac55fd2f5466107b8e12af75cab037868fff8404b8f7118c50dbcaa3614c9f80
|
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
7.
|
1
|
+
7.1.0
|
data/default.yml
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
inherit_mode:
|
2
|
+
merge:
|
3
|
+
- AllowedNames
|
4
|
+
|
1
5
|
AllCops:
|
2
6
|
TargetRubyVersion: 2.7.1
|
3
7
|
Exclude:
|
@@ -15,16 +19,19 @@ Metrics/BlockLength:
|
|
15
19
|
- "*.gemspec"
|
16
20
|
- "Gemfile"
|
17
21
|
- "config/routes.rb"
|
18
|
-
- "
|
22
|
+
- "spec/**/*"
|
19
23
|
- "test/**/*"
|
20
24
|
Metrics/ClassLength:
|
21
25
|
Exclude:
|
22
|
-
- "
|
26
|
+
- "spec/**/*"
|
23
27
|
- "test/**/*"
|
24
28
|
Metrics/MethodLength:
|
25
29
|
Exclude:
|
26
|
-
- "
|
30
|
+
- "spec/**/*"
|
27
31
|
- "test/**/*"
|
32
|
+
Naming/MethodParameterName:
|
33
|
+
AllowedNames:
|
34
|
+
- "..."
|
28
35
|
Style/DoubleNegation:
|
29
36
|
Enabled: false
|
30
37
|
Style/Documentation:
|
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
@@ -9,3 +9,44 @@ Rails/SkipsModelValidations:
|
|
9
9
|
- "lib/tasks/**/*"
|
10
10
|
- "spec/**/*"
|
11
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: 7.
|
4
|
+
version: 7.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boxt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -139,7 +139,9 @@ files:
|
|
139
139
|
- lib/boxt_ruby_style_guide/railtie.rb
|
140
140
|
- lib/boxt_ruby_style_guide/version.rb
|
141
141
|
- pending.yml
|
142
|
+
- rails-pending.yml
|
142
143
|
- rails.yml
|
144
|
+
- rspec.yml
|
143
145
|
homepage: https://github.com/boxt/ruby-style-guide
|
144
146
|
licenses:
|
145
147
|
- MIT
|