ws-style 6.5.0 → 6.6.1

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: c2c80e18e9cafebd36956f127091b925cc33246ce4294515643283cdf76c90ea
4
- data.tar.gz: ca2d889d8b8254fa537fe3eb893511033f6873cd20f84483510fef1503aae96c
3
+ metadata.gz: abe84e96213f192d2391e16ebed078c926b389d9805b307e3c32c54cb8737abe
4
+ data.tar.gz: '018e79383b41b5160578f3990dfeada90281707c938188760c027aed6fd0febb'
5
5
  SHA512:
6
- metadata.gz: a3fb2387578095dfe4b4db4dd78cb2327b1f5a3be125e2720b06fe2c9d21b54855d39240fd0910258b2bed23ac54082bb5bf82de191b58b284e2bf23237895b5
7
- data.tar.gz: 3e973a4d4bdf5d28a2ddbefa1d110fe40b6c1201d1fabd709476b9ca3dce86cb29b8095df17e17c70278b18a5d5e1f4f7a1d18308a5a277f99821e47ddeff64a
6
+ metadata.gz: f2899c5225396cc1e720fc596d620afa78594d7f6572f2f24eccf5e71ff9a67a0a5b16e660db5454380bdde19b17b08fed23b891868a07651f0140d02c35e480
7
+ data.tar.gz: 9dad673788f66cea027aef97e33abde49052f1e21f54d4ee5c598114e49d7be8e331ab4c93e8f442a6104d0b82ee176bcf1f1b565cd25bd0795507e6771235e5
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Pipeline
3
+ on:
4
+ - push
5
+ jobs:
6
+ build:
7
+ name: Build
8
+ runs-on: ubuntu-20.04
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ with:
12
+ ref: ${{ github.event.pull_request.head.sha }}
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.5.8
16
+ bundler-cache: true
17
+ - uses: r7kamura/rubocop-problem-matchers-action@v1
18
+ - name: Rubocop
19
+ run: bundle exec rubocop
20
+ - name: Run rspec
21
+ run: bundle exec rspec
22
+ - name: Release the gem
23
+ if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
24
+ run: |
25
+ git config user.name "Wolfbot"
26
+ git config user.email "noreply@wealthsimple.com"
27
+ bundle exec rake release
28
+ env:
29
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
data/.rubocop.yml CHANGED
@@ -1,2 +1,2 @@
1
1
  inherit_from:
2
- - default.yml
2
+ - core.yml
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.7
1
+ 2.5.8
data/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 6.6.1 - 2021-03-01
8
+ - Mostly just trying to get the version number bumped
9
+
10
+ ## 6.6.0 - 2021-01-16
11
+ - Rubocop FilePath should respect ActiveSupport::Inflector config if included
12
+
13
+ ## 6.5.3 - 2020-12-17
14
+ - Disable extension suggestions
15
+
16
+ ## 6.5.2 - 2020-12-17
17
+ - Add backstage catalog file + sonarqube project settings
18
+
19
+ ## 6.5.1 - 2020-11-30
20
+ - Disable EmptyLineBetweenClassDefs added in rubocop 1.4
21
+
7
22
  ## 6.5.0 - 2020-10-26
8
23
  - Upgrade RuboCop and RuboCop RSpec
9
24
 
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ RSpec::Core::RakeTask.new(:spec)
10
10
  task default: :spec
11
11
 
12
12
  desc 'Print out comments that can be used for a GitHub cop election'
13
- task :election do # rubocop:disable Rails/RakeEnvironment
13
+ task :election do
14
14
  configuration_path = File.expand_path('default.yml', File.dirname(__FILE__))
15
15
  RuboCop::ConfigLoader.load_file(configuration_path).pending_cops.each do |pending_cop|
16
16
  base_urls = {
data/catalog-info.yaml ADDED
@@ -0,0 +1,12 @@
1
+ ---
2
+ apiVersion: backstage.io/v1alpha1
3
+ kind: Component
4
+ metadata:
5
+ name: ws-style
6
+ description: Ruby style for services & libraries (using Rubocop)
7
+ tags:
8
+ - ruby
9
+ - open-source
10
+ spec:
11
+ type: library
12
+ lifecycle: production
data/core.yml CHANGED
@@ -25,6 +25,7 @@ AllCops:
25
25
  - "public/**/*"
26
26
  - "tmp/**/*"
27
27
  - "vendor/**/*"
28
+ SuggestExtensions: false
28
29
 
29
30
  Layout/HashAlignment:
30
31
  EnforcedLastArgumentHashStyle: ignore_implicit
@@ -48,6 +49,9 @@ Layout/CaseIndentation:
48
49
  Layout/ElseAlignment:
49
50
  Enabled: false
50
51
 
52
+ Layout/EmptyLineBetweenDefs:
53
+ AllowAdjacentOneLineDefs: true
54
+
51
55
  Layout/EndAlignment:
52
56
  Enabled: false
53
57
 
@@ -81,7 +85,7 @@ Metrics/CyclomaticComplexity:
81
85
  Max: 7
82
86
 
83
87
  Metrics/MethodLength:
84
- ExcludedMethods: ["extended"]
88
+ IgnoredMethods: ["extended"]
85
89
  Max: 15
86
90
 
87
91
  Metrics/ModuleLength:
data/lib/ws/style.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "ws/style/version"
2
+ require "ws/style/inflector"
2
3
 
3
4
  module Ws
4
5
  module Style
@@ -0,0 +1,17 @@
1
+ require 'rubocop-rspec'
2
+
3
+ module Ws
4
+ module Style
5
+ module Inflector
6
+ def camel_to_snake_case(string)
7
+ if defined?(ActiveSupport::Inflector)
8
+ ActiveSupport::Inflector.underscore(string)
9
+ else
10
+ super(string)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ ::RuboCop::Cop::RSpec::FilePath.prepend Ws::Style::Inflector
@@ -1,5 +1,5 @@
1
1
  module Ws
2
2
  module Style
3
- VERSION = '6.5.0'.freeze
3
+ VERSION = '6.6.1'.freeze
4
4
  end
5
5
  end
@@ -0,0 +1,4 @@
1
+ sonar.projectKey=ws-style
2
+ sonar.ruby.coverage.reportPaths=coverage/.resultset.json
3
+ sonar.sources=lib
4
+ sonar.tests=spec
data/ws-style.gemspec CHANGED
@@ -30,7 +30,6 @@ Gem::Specification.new do |s|
30
30
 
31
31
  s.add_development_dependency 'bundler'
32
32
  s.add_development_dependency 'bundler-audit'
33
- s.add_development_dependency 'git'
34
33
  s.add_development_dependency 'rake'
35
34
  s.add_development_dependency 'rspec', '~> 3.9.0'
36
35
  end
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: 6.5.0
4
+ version: 6.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Graham
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: git
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: rake
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -158,10 +144,9 @@ executables: []
158
144
  extensions: []
159
145
  extra_rdoc_files: []
160
146
  files:
161
- - ".circleci/config.yml"
162
- - ".dependabot/config.yml"
163
147
  - ".github/CODEOWNERS"
164
148
  - ".github/PULL_REQUEST_TEMPLATE.md"
149
+ - ".github/workflows/pipeline.yml"
165
150
  - ".gitignore"
166
151
  - ".rspec"
167
152
  - ".rubocop.yml"
@@ -172,16 +157,19 @@ files:
172
157
  - Rakefile
173
158
  - bin/console
174
159
  - bin/setup
160
+ - catalog-info.yaml
175
161
  - core.yml
176
162
  - default.yml
177
163
  - lib/ws/style.rb
164
+ - lib/ws/style/inflector.rb
178
165
  - lib/ws/style/version.rb
179
166
  - rails.yml
167
+ - sonar-project.properties
180
168
  - ws-style.gemspec
181
169
  homepage: https://github.com/wealthsimple/ws-style
182
170
  licenses: []
183
171
  metadata: {}
184
- post_install_message:
172
+ post_install_message:
185
173
  rdoc_options: []
186
174
  require_paths:
187
175
  - lib
@@ -196,8 +184,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
184
  - !ruby/object:Gem::Version
197
185
  version: '0'
198
186
  requirements: []
199
- rubygems_version: 3.0.3
200
- signing_key:
187
+ rubyforge_project:
188
+ rubygems_version: 2.7.6.2
189
+ signing_key:
201
190
  specification_version: 4
202
191
  summary: Shared rubocop config
203
192
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,107 +0,0 @@
1
- version: 2
2
-
3
- defaults: &defaults
4
- working_directory: ~/wealthsimple
5
- docker:
6
- - image: circleci/ruby:2.5.7
7
-
8
- references:
9
- attach_code_workspace: &attach_code_workspace
10
- attach_workspace:
11
- at: ~/wealthsimple
12
-
13
- restore_bundle_dependencies: &restore_bundle_dependencies
14
- run:
15
- name: Restore bundle dependencies from workspace
16
- command: bundle --path vendor/bundle
17
-
18
- jobs:
19
- checkout_and_bundle:
20
- <<: *defaults
21
- steps:
22
- - checkout
23
- - run: bundle install --jobs=4 --retry=3 --path vendor/bundle
24
- - persist_to_workspace:
25
- root: .
26
- paths: .
27
-
28
- rspec:
29
- <<: *defaults
30
- steps:
31
- - *attach_code_workspace
32
- - *restore_bundle_dependencies
33
- - run: bundle exec rspec
34
-
35
- lint_check:
36
- <<: *defaults
37
- steps:
38
- - *attach_code_workspace
39
- - *restore_bundle_dependencies
40
- - run: bundle exec rubocop --config=default.yml
41
- - run:
42
- name: Check default.yml for warnings
43
- command: "! bundle exec rubocop --config=default.yml 2>&1 | grep 'Warning:'"
44
-
45
- vulnerability_check:
46
- <<: *defaults
47
- steps:
48
- - *attach_code_workspace
49
- - *restore_bundle_dependencies
50
- - run: bundle exec bundle-audit update && bundle exec bundle-audit check
51
-
52
- release:
53
- <<: *defaults
54
- steps:
55
- - add_ssh_keys:
56
- fingerprints:
57
- - "46:b5:cb:ee:57:dc:14:95:31:be:12:13:4f:11:94:a4"
58
- - *attach_code_workspace
59
- - *restore_bundle_dependencies
60
- - run:
61
- name: Release to rubygems.org
62
- command: |
63
- echo "github.com,192.30.253.112 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
64
- mkdir ~/.gem
65
- echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >> ~/.gem/credentials
66
- chmod 600 ~/.gem/credentials
67
- bundle exec rake release
68
-
69
- workflows:
70
- version: 2
71
- build:
72
- jobs:
73
- - checkout_and_bundle:
74
- context: wealthsimple
75
- - rspec:
76
- requires:
77
- - checkout_and_bundle
78
- - lint_check:
79
- requires:
80
- - checkout_and_bundle
81
- - vulnerability_check:
82
- requires:
83
- - checkout_and_bundle
84
- - release:
85
- context: wealthsimple
86
- filters:
87
- branches:
88
- only: master
89
- requires:
90
- - rspec
91
- - lint_check
92
- - vulnerability_check
93
-
94
- security-audit:
95
- triggers:
96
- - schedule:
97
- # 11:05 am UTC: 6:05 am EST / 7:05 am EDT
98
- cron: "5 11 * * *"
99
- filters:
100
- branches:
101
- only: master
102
- jobs:
103
- - checkout_and_bundle:
104
- context: wealthsimple
105
- - vulnerability_check:
106
- requires:
107
- - checkout_and_bundle
@@ -1,9 +0,0 @@
1
- version: 1
2
- update_configs:
3
- - package_manager: "ruby:bundler"
4
- directory: "/"
5
- update_schedule: "weekly"
6
- automerged_updates:
7
- - match:
8
- dependency_type: "development"
9
- update_type: "all"