rubocop-bridgetown 0.1.0 → 0.2.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3a7dee5454525c643ca51d52cce8fa3f8e98ee110d2be908f62c6e9d8920498
4
- data.tar.gz: 4af89bab63caab938eba043e72838b231a52dbe5cb986df81c232e81b3c6e7c3
3
+ metadata.gz: 47a7b3f0ef1f2e3211f32ba505d5cf60310a94f9b881c11eaad81b8d17f5edfd
4
+ data.tar.gz: c2c83c60b7487e5c87d289a1e5de1627311435987c1946cf2a6ff3d0c3d6dabc
5
5
  SHA512:
6
- metadata.gz: fff6f1ed9f0b480b9b72009ac7db5f9f3053f148aa436ccd14bc440489284f31e58d74215a8f10f832702101c36fe099a49ac9d66e352a6e36de95e18c3f293e
7
- data.tar.gz: d62342a1704a935359ac128b3468c6353e6980ac6aeceff867665cd1f5ada7bf371070e533503c72b94d9c00729410a02a9181aa13b965821af5aedbc4052340
6
+ metadata.gz: e664f288e51eb4b1075a3e95d05f15151dc2c347b069933c5f5272a305d6bdbebd35f83800e9d2d2c5cb63135eda5e23551eb53243276a18484bfaec597c7e05
7
+ data.tar.gz: 23fe76f8cebf17e0a17f037f6817324c110bf9be907991eb1f1a5d24075599fa045e06adc4dca3301db813197821610cb2bc4b7cfafa72f9ec43eb11c581f753
data/.rubocop.yml CHANGED
@@ -7,6 +7,7 @@ AllCops:
7
7
  - bin/**/*
8
8
  - exe/**/*
9
9
  - benchmark/**/*
10
+ - node_modules/**/*
10
11
  - script/**/*
11
12
  - vendor/**/*
12
13
  - tmp/**/*
@@ -34,7 +35,7 @@ Lint/StructNewOverride:
34
35
  Lint/UnreachableCode:
35
36
  Severity: error
36
37
  Metrics/AbcSize:
37
- Max: 21
38
+ Max: 24
38
39
  Metrics/ClassLength:
39
40
  Max: 240
40
41
  Layout/LineLength:
@@ -89,19 +90,16 @@ Style/HashTransformKeys:
89
90
  Enabled: false
90
91
  Style/HashTransformValues:
91
92
  Enabled: true
93
+ Style/Lambda:
94
+ EnforcedStyle: literal
95
+ Style/LambdaCall:
96
+ Enabled: false
92
97
  Style/ModuleFunction:
93
98
  Enabled: false
94
99
  Style/MultilineTernaryOperator:
95
100
  Severity: error
96
101
  Style/PercentLiteralDelimiters:
97
- PreferredDelimiters:
98
- "%q": "{}"
99
- "%Q": "{}"
100
- "%r": "!!"
101
- "%s": "()"
102
- "%w": "()"
103
- "%W": "()"
104
- "%x": "()"
102
+ Enabled: false
105
103
  Style/RegexpLiteral:
106
104
  EnforcedStyle: percent_r
107
105
  Style/RescueModifier:
@@ -113,7 +111,7 @@ Style/StringLiterals:
113
111
  Style/StringLiteralsInInterpolation:
114
112
  EnforcedStyle: double_quotes
115
113
  Style/SymbolArray:
116
- EnforcedStyle: brackets
114
+ Enabled: false
117
115
  Style/TrailingCommaInArrayLiteral:
118
116
  EnforcedStyleForMultiline: consistent_comma
119
117
  Style/TrailingCommaInHashLiteral:
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  A RuboCop extension to enforce common code style in Bridgetown plugins.
4
4
 
5
- [![Gem Version](https://img.shields.io/gem/v/rubocop-bridgetown.svg?label=Latest%20Release)][rubygems]
6
- [![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.68.0%20--%200.80.x-green.svg)][rubocop-releases]
5
+ ![Gem Version](https://img.shields.io/gem/v/rubocop-bridgetown.svg?label=Latest%20Release)
6
+ ![RuboCop Support](https://img.shields.io/badge/Rubocop%20Support-0.81.0-green.svg)
7
7
 
8
8
 
9
9
  ## Installation
@@ -19,12 +19,12 @@ or if you prefer Bundler, add it to your `Gemfile` or `gemspec`
19
19
  ```ruby
20
20
  # Gemfile
21
21
 
22
- gem "rubocop-bridgetown", "~> 0.1.0"
22
+ gem "rubocop-bridgetown", "~> 0.2"
23
23
  ```
24
24
  ```ruby
25
25
  # <plugin>.gemspec
26
26
 
27
- spec.add_development_dependency "rubocop-bridgetown", "~> 0.1.0"
27
+ spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
28
28
  ```
29
29
  and run `bundle install`
30
30
 
@@ -32,7 +32,7 @@ and run `bundle install`
32
32
  ## Usage
33
33
 
34
34
  You need to tell RuboCop to load the extension and *inherit* the custom RuboCop configuration advocated by
35
- [Bridgetown](https://github.com/bridgetown).
35
+ [Bridgetown](https://github.com/bridgetownrb/bridgetown).
36
36
 
37
37
  Place the following at the top of your `.rubocop.yml`.
38
38
 
@@ -44,17 +44,22 @@ inherit_gem:
44
44
 
45
45
  Running `bundle exec rubocop` will now automatically load the `rubocop-bridgetown` cops together with the standard cops.
46
46
 
47
+ ## Exclude Folders List
47
48
 
48
- ## Customization
49
-
50
- You can override any settings inherited from the extension by subsequently redefining the concerned parameters.
51
-
49
+ Currently it seems Rubocop doesn't inherit the `Excludes` folder list from the gem configuration, so you may want to add it manually to your `.rubocop.yml` file:
52
50
 
53
- ## Release Cycle
51
+ ```yaml
52
+ AllCops:
53
+ Exclude:
54
+ - bin/**/*
55
+ - exe/**/*
56
+ - benchmark/**/*
57
+ - node_modules/**/*
58
+ - script/**/*
59
+ - vendor/**/*
60
+ - tmp/**/*
61
+ ```
54
62
 
55
- A new release of this gem is manually cut based on the adoption of the latest version of RuboCop by the [Bridgetown repository](https://github.com/bridgetownrb/bridgetown):
63
+ ## Customization
56
64
 
57
- 1. RuboCop releases a new version.
58
- 2. The `master` branch of Bridgetown repository is updated to the latest RuboCop version along with any updates to their `.rubocop.yml`.
59
- 3. The RuboCop version and `.rubocop.yml` at this gem's repository is updated **via a pull request**.
60
- 4. A new minor release is subsequently cut and shipped.
65
+ You can override any settings inherited from the extension by subsequently redefining the concerned parameters.
@@ -1,4 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rubocop"
4
+
3
5
  path_to_cops = File.join(File.expand_path("rubocop", __dir__), "cop", "**", "*.rb")
4
6
  Dir[path_to_cops].each { |cop| require cop }
metadata CHANGED
@@ -1,33 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-bridgetown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-10 00:00:00.000000000 Z
11
+ date: 2021-02-12 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
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 0.68.0
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
19
  version: 0.81.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 0.68.0
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
26
  version: 0.81.0
33
27
  - !ruby/object:Gem::Dependency
@@ -104,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
98
  - !ruby/object:Gem::Version
105
99
  version: '0'
106
100
  requirements: []
107
- rubygems_version: 3.0.8
101
+ rubygems_version: 3.1.4
108
102
  signing_key:
109
103
  specification_version: 4
110
104
  summary: Code style check for Bridgetown plugins