ws-style 7.2.0 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c84b601c32503cbb69f06b7f21f53b9883ffb80aa8bbcc4978a8460b1bd17c97
4
- data.tar.gz: aa6dd552115ae54bb9ea117244ded31810276f11ac9b7ef0c2313c1d8e46f00a
3
+ metadata.gz: 75e08cfc21dc4027c244e3947ffb935a0af52bc53a95dfa617fee347db2556fa
4
+ data.tar.gz: b01402bcae612cac8b9f8f34e147382697dd3a432efee4bef365cc47669de327
5
5
  SHA512:
6
- metadata.gz: 7570ad769e1cb67e09d016bfab139eff1782eb249c8b576def82128ddb5690b694fa55259413d0e7266b609c557a7692f5fb5d9414b61b34701e79ec80a413db
7
- data.tar.gz: 5b1ba4b6729c1c4308f81eaee07b156a3fa0d80a6c893b942db0cc6e81b219d56f8648af417667463ee28cc1bcedc262b42eb2321234c22b9654a86adf02e370
6
+ metadata.gz: af5b4e30bccef4dd38db6175832198beed501a11a3a570eb21236f28f6cda12f775b6af21c0359f914c64e649aadbb7b7469c0b2d2a6ff66c1ace0cdedd744e6
7
+ data.tar.gz: 147af5d0d4e9070db206ddabc16e0bab74feb8bb8701dac4b6c7c6395268092b872f2e4deb5bc4ca28aa9d60e7eb4fb785317471ceecd3e6a731f1601786f9b2
@@ -8,15 +8,23 @@ concurrency:
8
8
 
9
9
  jobs:
10
10
  build:
11
+ strategy:
12
+ matrix:
13
+ ruby_version:
14
+ - '3.0'
15
+ - '3.1'
16
+ - '3.2'
11
17
  name: Build
12
18
  runs-on: ubuntu-22.04
13
19
  steps:
14
20
  - uses: actions/checkout@v3
15
21
  with:
16
22
  ref: ${{ github.event.pull_request.head.sha }}
23
+ fetch-depth: 0
17
24
  - uses: ruby/setup-ruby@v1
18
25
  with:
19
26
  bundler-cache: true
27
+ ruby-version: ${{ matrix.ruby_version }}
20
28
  - name: Fetch main branch
21
29
  run: git fetch origin main
22
30
  - uses: r7kamura/rubocop-problem-matchers-action@v1
@@ -27,8 +35,19 @@ jobs:
27
35
  bundle exec bundle-audit check
28
36
  - name: Run rspec
29
37
  run: bundle exec rspec
38
+ - name: Check if version has changed
39
+ if: ${{ github.ref_name == 'main' }}
40
+ id: version-check
41
+ run: |
42
+ if [ "$(git diff --name-only HEAD^ HEAD | grep 'lib/ws/style/version.rb')" ]; then
43
+ echo "Version did change"
44
+ echo "version_changed=true" >> $GITHUB_OUTPUT
45
+ else
46
+ echo "Version did not change"
47
+ echo "version_changed=false" >> $GITHUB_OUTPUT
48
+ fi
30
49
  - name: Release the gem
31
- if: ${{ github.ref == 'refs/heads/main' }}
50
+ if: ${{ github.ref_name == 'main' && steps.version-check.outputs.version_changed == 'true' && matrix.ruby_version == '3.0' }}
32
51
  run: |
33
52
  mkdir -p ~/.gem
34
53
  cat << EOF > ~/.gem/credentials
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## 7.3.0 - 2023-01-11
10
+ ### Changed
11
+ - Disable some cops which don't add significant value
12
+
13
+ ## 7.2.1 - 2023-11-28
14
+ ### Changed
15
+ - Support older versions of Ruby
16
+
9
17
  ## 7.2.0 - 2023-07-14
10
18
  ### Changed
11
19
  - Fix issue where rubocop-rspec was disabled by default after the switch to standardrb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ws-style (7.2.0)
4
+ ws-style (7.3.0)
5
5
  rubocop-rspec (>= 2.2.0)
6
6
  rubocop-vendor (>= 0.11)
7
7
  standard (>= 1.30.1)
@@ -11,42 +11,53 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (7.0.6)
14
+ activesupport (7.1.2)
15
+ base64
16
+ bigdecimal
15
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ connection_pool (>= 2.2.5)
19
+ drb
16
20
  i18n (>= 1.6, < 2)
17
21
  minitest (>= 5.1)
22
+ mutex_m
18
23
  tzinfo (~> 2.0)
19
- addressable (2.8.4)
24
+ addressable (2.8.6)
20
25
  public_suffix (>= 2.0.2, < 6.0)
21
26
  ast (2.4.2)
27
+ base64 (0.2.0)
28
+ bigdecimal (3.1.5)
22
29
  bundler-audit (0.9.1)
23
30
  bundler (>= 1.2.0, < 3)
24
31
  thor (~> 1.0)
25
32
  concurrent-ruby (1.2.2)
33
+ connection_pool (2.4.1)
26
34
  diff-lcs (1.5.0)
27
- git (1.18.0)
35
+ drb (2.2.0)
36
+ ruby2_keywords
37
+ git (1.19.0)
28
38
  addressable (~> 2.8)
29
39
  rchardet (~> 1.8)
30
40
  i18n (1.14.1)
31
41
  concurrent-ruby (~> 1.0)
32
- json (2.6.3)
42
+ json (2.7.1)
33
43
  language_server-protocol (3.17.0.3)
34
44
  lint_roller (1.1.0)
35
- minitest (5.19.0)
36
- parallel (1.23.0)
45
+ minitest (5.20.0)
46
+ mutex_m (0.2.0)
47
+ parallel (1.24.0)
37
48
  parse_a_changelog (1.3.0)
38
49
  treetop (~> 1.6)
39
- parser (3.2.2.3)
50
+ parser (3.3.0.2)
40
51
  ast (~> 2.4.1)
41
52
  racc
42
53
  polyglot (0.3.5)
43
- public_suffix (5.0.3)
44
- racc (1.7.1)
54
+ public_suffix (5.0.4)
55
+ racc (1.7.3)
45
56
  rack (3.0.8)
46
57
  rainbow (3.1.1)
47
- rake (13.0.6)
58
+ rake (13.1.0)
48
59
  rchardet (1.8.0)
49
- regexp_parser (2.8.1)
60
+ regexp_parser (2.9.0)
50
61
  rexml (3.2.6)
51
62
  rspec (3.12.0)
52
63
  rspec-core (~> 3.12.0)
@@ -61,57 +72,60 @@ GEM
61
72
  diff-lcs (>= 1.2.0, < 2.0)
62
73
  rspec-support (~> 3.12.0)
63
74
  rspec-support (3.12.1)
64
- rubocop (1.52.1)
75
+ rubocop (1.59.0)
65
76
  json (~> 2.3)
77
+ language_server-protocol (>= 3.17.0)
66
78
  parallel (~> 1.10)
67
- parser (>= 3.2.2.3)
79
+ parser (>= 3.2.2.4)
68
80
  rainbow (>= 2.2.2, < 4.0)
69
81
  regexp_parser (>= 1.8, < 3.0)
70
82
  rexml (>= 3.2.5, < 4.0)
71
- rubocop-ast (>= 1.28.0, < 2.0)
83
+ rubocop-ast (>= 1.30.0, < 2.0)
72
84
  ruby-progressbar (~> 1.7)
73
85
  unicode-display_width (>= 2.4.0, < 3.0)
74
- rubocop-ast (1.29.0)
86
+ rubocop-ast (1.30.0)
75
87
  parser (>= 3.2.1.0)
76
- rubocop-capybara (2.18.0)
88
+ rubocop-capybara (2.20.0)
77
89
  rubocop (~> 1.41)
78
- rubocop-factory_bot (2.23.1)
90
+ rubocop-factory_bot (2.25.0)
79
91
  rubocop (~> 1.33)
80
- rubocop-performance (1.18.0)
81
- rubocop (>= 1.7.0, < 2.0)
82
- rubocop-ast (>= 0.4.0)
83
- rubocop-rails (2.19.1)
92
+ rubocop-performance (1.20.1)
93
+ rubocop (>= 1.48.1, < 2.0)
94
+ rubocop-ast (>= 1.30.0, < 2.0)
95
+ rubocop-rails (2.23.1)
84
96
  activesupport (>= 4.2.0)
85
97
  rack (>= 1.1)
86
98
  rubocop (>= 1.33.0, < 2.0)
87
- rubocop-rspec (2.23.0)
88
- rubocop (~> 1.33)
99
+ rubocop-ast (>= 1.30.0, < 2.0)
100
+ rubocop-rspec (2.26.1)
101
+ rubocop (~> 1.40)
89
102
  rubocop-capybara (~> 2.17)
90
103
  rubocop-factory_bot (~> 2.22)
91
- rubocop-vendor (0.11.0)
92
- rubocop (>= 0.53.0)
104
+ rubocop-vendor (0.12.2)
105
+ rubocop
93
106
  ruby-progressbar (1.13.0)
94
- standard (1.30.1)
107
+ ruby2_keywords (0.0.5)
108
+ standard (1.33.0)
95
109
  language_server-protocol (~> 3.17.0.2)
96
110
  lint_roller (~> 1.0)
97
- rubocop (~> 1.52.0)
111
+ rubocop (~> 1.59.0)
98
112
  standard-custom (~> 1.0.0)
99
- standard-performance (~> 1.1.0)
113
+ standard-performance (~> 1.3)
100
114
  standard-custom (1.0.2)
101
115
  lint_roller (~> 1.0)
102
116
  rubocop (~> 1.50)
103
- standard-performance (1.1.2)
117
+ standard-performance (1.3.0)
104
118
  lint_roller (~> 1.1)
105
- rubocop-performance (~> 1.18.0)
106
- standard-rails (0.1.0)
119
+ rubocop-performance (~> 1.20.1)
120
+ standard-rails (1.0.0)
107
121
  lint_roller (~> 1.0)
108
- rubocop-rails (~> 2.19.0)
109
- thor (1.2.2)
122
+ rubocop-rails (~> 2.23.1)
123
+ thor (1.3.0)
110
124
  treetop (1.6.12)
111
125
  polyglot (~> 0.3)
112
126
  tzinfo (2.0.6)
113
127
  concurrent-ruby (~> 1.0)
114
- unicode-display_width (2.4.2)
128
+ unicode-display_width (2.5.0)
115
129
 
116
130
  PLATFORMS
117
131
  arm64-darwin-22
@@ -127,4 +141,4 @@ DEPENDENCIES
127
141
  ws-style!
128
142
 
129
143
  BUNDLED WITH
130
- 2.4.12
144
+ 2.4.18
data/README.md CHANGED
@@ -1,19 +1,15 @@
1
1
  # ws-style
2
- [![Github Actions Badge](https://github.com/wealthsimple/ws-style/actions/workflows/pipeline.yml/badge.svg)](https://github.com/wealthsimple/ws-style/actions)
2
+ [![Default](https://github.com/wealthsimple/ws-style/actions/workflows/default.yml/badge.svg)](https://github.com/wealthsimple/ws-style/actions/workflows/default.yml)
3
3
 
4
4
  Shared [rubocop](https://github.com/bbatsov/rubocop) config to enforce Ruby style consistently across Wealthsimple libraries and services.
5
5
 
6
- # Upgrading to 3.x
7
-
8
- 1.x adds a number of Cops to our default.yml. See the relevant Quip for more information on how to upgrade.
9
-
10
6
  ## Installation
11
7
 
12
8
  Add this line to your application's Gemfile and execute `bundle`:
13
9
 
14
10
  ```ruby
15
11
  group :development, :test do
16
- gem 'ws-style'
12
+ gem 'ws-style', require: false
17
13
  end
18
14
  ```
19
15
 
@@ -23,8 +19,6 @@ Or, for a rubygem, add this to your `gemspec`:
23
19
  spec.add_development_dependency 'ws-style'
24
20
  ```
25
21
 
26
- To update an existing installation, just run `bundle update ws-style`.
27
-
28
22
  ## Usage
29
23
 
30
24
  Create a `.rubocop.yml` with the following directives:
@@ -34,9 +28,12 @@ inherit_gem:
34
28
  ws-style:
35
29
  - default.yml
36
30
 
37
- AllCops:
38
- # Specify your target Ruby version here (only major/minor versions):
39
- TargetRubyVersion: 2.3
31
+ # Add the following for rails projects with custom inflections
32
+ # This adds supports for filenames based on inflection rules
33
+ require:
34
+ - ws/style/inflector
35
+ - active_support/inflector
36
+ - ./config/initializers/inflections
40
37
  ```
41
38
 
42
39
  Check if it works by running `bundle exec rubocop`.
@@ -49,7 +46,7 @@ inherit_gem:
49
46
  - default.yml
50
47
 
51
48
  AllCops:
52
- TargetRubyVersion: 2.4
49
+ TargetRubyVersion: 3.2
53
50
  Include:
54
51
  - 'db/**/*'
55
52
 
@@ -1,5 +1,5 @@
1
1
  module Ws
2
2
  module Style
3
- VERSION = '7.2.0'.freeze
3
+ VERSION = '7.3.0'.freeze
4
4
  end
5
5
  end
data/rails.yml CHANGED
@@ -5,5 +5,11 @@ inherit_gem:
5
5
  standard-rails: config/base.yml
6
6
 
7
7
  # standard-rails overrides
8
+ Rails/DynamicFindBy:
9
+ Enabled: false
10
+
8
11
  Rails/EnvironmentVariableAccess:
9
12
  Enabled: false
13
+
14
+ Rails/PluckId:
15
+ Enabled: false
data/rspec.yml CHANGED
@@ -23,6 +23,9 @@ RSpec/LetSetup:
23
23
  RSpec/MessageChain:
24
24
  Enabled: false
25
25
 
26
+ RSpec/MessageSpies:
27
+ Enabled: false
28
+
26
29
  RSpec/MultipleExpectations:
27
30
  Enabled: false
28
31
 
@@ -34,3 +37,6 @@ RSpec/NamedSubject:
34
37
 
35
38
  RSpec/NestedGroups:
36
39
  Max: 6
40
+
41
+ RSpec/StubbedMock:
42
+ Enabled: false
data/ws-style.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.bindir = 'exe'
21
21
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  s.require_paths = ['lib']
23
- s.required_ruby_version = '>= 3.2.0'
23
+ s.required_ruby_version = '>= 3.0'
24
24
 
25
25
  s.add_dependency 'standard', '>= 1.30.1'
26
26
  s.add_dependency 'standard-custom', '>= 1.0.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ws-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0
4
+ version: 7.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Graham
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-01 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -213,14 +213,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - ">="
215
215
  - !ruby/object:Gem::Version
216
- version: 3.2.0
216
+ version: '3.0'
217
217
  required_rubygems_version: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - ">="
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubygems_version: 3.4.10
223
+ rubygems_version: 3.2.33
224
224
  signing_key:
225
225
  specification_version: 4
226
226
  summary: Shared rubocop config