boxt_ruby_style_guide 5.0.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) 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. metadata +20 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 990c11d38d6f55aa69736086dd46cd6e3219bf1eca081ee49e53f91dfaef14f8
4
- data.tar.gz: 56a3e58543c52e2a80151e2205a90e765e4d61e48d323a6b2aa0cda824e3278e
3
+ metadata.gz: b5af98397560f9b7434c4763b4a044cb8179095c6f90206b14c751e17b2e8441
4
+ data.tar.gz: 0bf7dc0feb83e5792011468aa73fa312042adb8b38d0cb13a904805a07e38721
5
5
  SHA512:
6
- metadata.gz: 379f9970696c4a40c5a832914e5a3fef1d6ee7507ba786d5b8231ad256e9433d352e6d5bec241adb18ce2fd58a2c27136f7883748fca5c66208e382ac5084fdc
7
- data.tar.gz: 37198a5649dcfb1b0a2630403f3194ce7f902ed45c3f600b42f3b2504b22347ce40edd717be5a11a795d19156c32b812df85ab1b2fef86f9b0fa8233dc35baf9
6
+ metadata.gz: fb6f7671f4fcd771e6e5ac9f7fa2e5c351828491e9677934c6404d1c71e0101dbbd939e44e258dca9cae736ca880312019612dd07540bc4e0a24b07f995df0f5
7
+ data.tar.gz: e9743bb831787917dd06c83bf8f0531074b5eff206161a6f3583bd3d8c4ef6ff2b4ea9d1a6371a6e281d8c684d2609d824e01eb6d632816f8e2b3397a60a418d
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.0.0
@@ -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
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.0.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-06-11 00:00:00.000000000 Z
11
+ date: 2020-06-16 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.85.1
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.85.1
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