boxt_ruby_style_guide 5.0.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (7) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -9
  3. data/VERSION +1 -1
  4. data/default.yml +6 -28
  5. data/pending.yml +30 -0
  6. data/rails.yml +9 -0
  7. metadata +23 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 990c11d38d6f55aa69736086dd46cd6e3219bf1eca081ee49e53f91dfaef14f8
4
- data.tar.gz: 56a3e58543c52e2a80151e2205a90e765e4d61e48d323a6b2aa0cda824e3278e
3
+ metadata.gz: e38a216286c1ea2e89d922e12bd0491bc560ae662087d0ed0dee1d7728c241cc
4
+ data.tar.gz: cd6b92a57e7ce7235c7ef3972091fb853749d2e4df04fa5e002e541568637498
5
5
  SHA512:
6
- metadata.gz: 379f9970696c4a40c5a832914e5a3fef1d6ee7507ba786d5b8231ad256e9433d352e6d5bec241adb18ce2fd58a2c27136f7883748fca5c66208e382ac5084fdc
7
- data.tar.gz: 37198a5649dcfb1b0a2630403f3194ce7f902ed45c3f600b42f3b2504b22347ce40edd717be5a11a795d19156c32b812df85ab1b2fef86f9b0fa8233dc35baf9
6
+ metadata.gz: 644278ffb34a74bf5de1c18e407e81b1a0ad208f61ea098b1882f209627c9a75301d4f762db95dd4453bbc68839f8046d0cd93b16b385ee1a5efb035cc77751f
7
+ data.tar.gz: 6c98e33702aa22967f99d4fcd0469fae523db497f88b38e557bac076dfef8de7b9943b677458da64a360889cfa536f662175fba8462c814d6329fb05dada500a
data/README.md CHANGED
@@ -35,17 +35,36 @@ Rails apps should have access to the lint tasks by default.
35
35
 
36
36
  ## Usage
37
37
 
38
- ### Rubocop Config
39
-
40
38
  Add a `.rubocop.yml` file to the root of your project with the following settings:
41
39
 
42
40
  ```yml
43
41
  inherit_gem:
44
- boxt-ruby-style-guide:
45
- - default.yml
42
+ boxt_ruby_style_guide:
43
+ - default.yml # use default cops
44
+ - pending.yml # use pending cops
45
+ - rails.yml # use Rails cops - see Additional Extensions/Cops
46
+ ```
47
+
48
+ ### Additional Extensions/Cops
49
+
50
+ The following Rubocop gems are also installed with this gem:
51
+
52
+ * [rubocop-faker](https://github.com/koic/rubocop-faker)
53
+ * [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails)
54
+
55
+ To enable add the following to your `.rubocop.yml` file.
56
+
57
+ ```yml
58
+ inherit_gem:
59
+ boxt_ruby_style_guide:
60
+ # .... add cops
61
+
62
+ require:
63
+ - rubocop-faker # if your project is using the Faker gem then add this
64
+ - rubocop-rails # if your project is a Rails app/engine then add this, plus the - rails.yml setting above
46
65
  ```
47
66
 
48
- ### Lint Tasks
67
+ ## Lint Tasks
49
68
 
50
69
  Lint tasks to run against files listed as changed by Git.
51
70
 
@@ -57,20 +76,20 @@ rake lint:rubocop
57
76
 
58
77
  If there are no changed files the commands will run against all files.
59
78
 
60
- ### Editor Plugins
79
+ ## Editor Plugins
61
80
 
62
81
  There are also some useful Rubocop editor plugins to help with in-editor linting.
63
82
 
64
- #### Atom
83
+ ### Atom
65
84
 
66
85
  - [linter-rubocop](https://atom.io/packages/linter-rubocop)
67
86
  - [rubocop-auto-correct](https://atom.io/packages/rubocop-auto-correct)
68
87
 
69
- #### RubyMine
88
+ ### RubyMine
70
89
 
71
90
  - [rubocop](https://www.jetbrains.com/help/ruby/rubocop.html)
72
91
 
73
- #### VSCode
92
+ ### VSCode
74
93
 
75
94
  - [ruby-rubocop](https://marketplace.visualstudio.com/items?itemName=misogi.ruby-rubocop)
76
95
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0
1
+ 6.2.1
@@ -1,5 +1,11 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.7.1
3
+ Exclude:
4
+ - "**/*/schema.rb"
5
+ - "Gemfile.lock"
6
+ - "node_modules/**/*"
7
+ - "tmp/**/*"
8
+ - "vendor/**/*"
3
9
  Layout/LineLength:
4
10
  Max: 120 # Increase line length to 120
5
11
  Exclude:
@@ -22,31 +28,3 @@ Style/Documentation:
22
28
  Enabled: false # Disable Style/Documentation because...
23
29
  Style/StringLiterals:
24
30
  EnforcedStyle: double_quotes # Use double quotes ALL THE TIME!!!
25
- # These cops are currently pending and will be enabled by default at some point, but adding for now to stop Rubocop
26
- # complaining...
27
- Lint/DeprecatedOpenSSLConstant:
28
- Enabled: true
29
- Lint/MixedRegexpCaptureTypes:
30
- Enabled: true
31
- Layout/EmptyLinesAroundAttributeAccessor:
32
- Enabled: true
33
- Layout/SpaceAroundMethodCallOperator:
34
- Enabled: true
35
- Lint/RaiseException:
36
- Enabled: true
37
- Lint/StructNewOverride:
38
- Enabled: true
39
- Style/ExponentialNotation:
40
- Enabled: true
41
- Style/HashEachMethods:
42
- Enabled: true
43
- Style/HashTransformKeys:
44
- Enabled: true
45
- Style/HashTransformValues:
46
- Enabled: true
47
- Style/RedundantRegexpCharacterClass:
48
- Enabled: true
49
- Style/RedundantRegexpEscape:
50
- Enabled: true
51
- Style/SlicingWithRange:
52
- Enabled: true
@@ -0,0 +1,30 @@
1
+ # These cops are currently pending and will be enabled by default at some point, but adding for now to stop Rubocop
2
+ # complaining...
3
+ Lint/DeprecatedOpenSSLConstant:
4
+ Enabled: true
5
+ Lint/MixedRegexpCaptureTypes:
6
+ Enabled: true
7
+ Layout/EmptyLinesAroundAttributeAccessor:
8
+ Enabled: true
9
+ Layout/SpaceAroundMethodCallOperator:
10
+ Enabled: true
11
+ Lint/RaiseException:
12
+ Enabled: true
13
+ Lint/StructNewOverride:
14
+ Enabled: true
15
+ Style/ExponentialNotation:
16
+ Enabled: true
17
+ Style/HashEachMethods:
18
+ Enabled: true
19
+ Style/HashTransformKeys:
20
+ Enabled: true
21
+ Style/HashTransformValues:
22
+ Enabled: true
23
+ Style/RedundantFetchBlock:
24
+ Enabled: true
25
+ Style/RedundantRegexpCharacterClass:
26
+ Enabled: true
27
+ Style/RedundantRegexpEscape:
28
+ Enabled: true
29
+ Style/SlicingWithRange:
30
+ Enabled: true
@@ -0,0 +1,9 @@
1
+ # Rails specific cops
2
+ Rails/ApplicationController:
3
+ Exclude:
4
+ - "test/**/*"
5
+ Rails/SkipsModelValidations:
6
+ Exclude:
7
+ - "db/migrate/**/*"
8
+ - "lib/tasks/**/*"
9
+ - "test/**/*"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxt_ruby_style_guide
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boxt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-11 00:00:00.000000000 Z
11
+ date: 2020-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0.83'
19
+ version: 0.86.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.83'
26
+ version: 0.86.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-faker
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.6'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.6'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -152,6 +166,8 @@ files:
152
166
  - lib/boxt_ruby_style_guide.rb
153
167
  - lib/boxt_ruby_style_guide/railtie.rb
154
168
  - lib/boxt_ruby_style_guide/version.rb
169
+ - pending.yml
170
+ - rails.yml
155
171
  homepage: https://github.com/boxt/ruby-style-guide
156
172
  licenses:
157
173
  - MIT
@@ -171,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
187
  - !ruby/object:Gem::Version
172
188
  version: '0'
173
189
  requirements: []
174
- rubygems_version: 3.1.2
190
+ rubygems_version: 3.1.4
175
191
  signing_key:
176
192
  specification_version: 4
177
193
  summary: Ruby styleguide info for the BOXT Ruby projects