boxt_ruby_style_guide 4.4.2 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
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 +7 -23
  5. data/pending.yml +30 -0
  6. data/rails.yml +9 -0
  7. metadata +26 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c671ecd597787c1ea952283575ed3a9ce2705a7b800e7ffc4b4a946456356f35
4
- data.tar.gz: 49f6e15e7fa07e3859d7807b51f90c53c699e8f289d9a5a64d2978e0b4e1d6fe
3
+ metadata.gz: 8797108104ef257761910ad3146849508abc290b978efc25b26fa24033a5546f
4
+ data.tar.gz: f247c42dd4fb4d515c8f91848509977abedb467bf10d3017f29903b3f462c485
5
5
  SHA512:
6
- metadata.gz: 0b84fac5f7e196274fa5d00c7963456cc2a43b0cedbb4781f3dfcb66c89e57331205ae42a472be8c2727d298a715499c179767e49ea4615c24383d94c9d537b4
7
- data.tar.gz: 34d7cccc2995b0f89cec34d17da5f180bd80072c73d2b7acc9a4c3f2856136ee885e469ba891915a556c71830911e3f87ec43d35ac5d3fe63375eba9af72b955
6
+ metadata.gz: b3d25beabdc2dde7e40ecf50f356bb20214ebfe182eb1eebc838df67a9d683943523eb39c3b1610362e93e68539654ba9860e6bc0a44c4da813e50f18c570f7b
7
+ data.tar.gz: 5294d6ba55484a24faa576b8341635f146da2d86eb3511511394154b139870d69033259b0b6260226b10eea4d078a2dc6f7b1bc3dd7852bd9d0463dc68c0ea89
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
- 4.4.2
1
+ 6.1.0
@@ -1,5 +1,11 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.7.0
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,25 +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
- Layout/EmptyLinesAroundAttributeAccessor:
30
- Enabled: true
31
- Layout/SpaceAroundMethodCallOperator:
32
- Enabled: true
33
- Lint/RaiseException:
34
- Enabled: true
35
- Lint/StructNewOverride:
36
- Enabled: true
37
- Style/ExponentialNotation:
38
- Enabled: true
39
- Style/HashEachMethods:
40
- Enabled: true
41
- Style/HashTransformKeys:
42
- Enabled: true
43
- Style/HashTransformValues:
44
- Enabled: true
45
- Style/SlicingWithRange:
46
- 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: 4.4.2
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boxt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-30 00:00:00.000000000 Z
11
+ date: 2020-06-22 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,11 +166,13 @@ 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
158
174
  metadata: {}
159
- post_install_message:
175
+ post_install_message:
160
176
  rdoc_options: []
161
177
  require_paths:
162
178
  - lib
@@ -171,8 +187,8 @@ 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
175
- signing_key:
190
+ rubygems_version: 3.1.4
191
+ signing_key:
176
192
  specification_version: 4
177
193
  summary: Ruby styleguide info for the BOXT Ruby projects
178
194
  test_files: []