pheme 5.3.2 → 5.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/default.yaml +15 -0
- data/.rubocop_todo.yml +12 -14
- data/CHANGELOG.md +18 -5
- data/Gemfile.lock +34 -34
- data/lib/pheme/version.rb +1 -1
- data/pheme.gemspec +1 -0
- data/spec/support/example_queue_poller.rb +2 -2
- data/spec/version_spec.rb +63 -11
- metadata +17 -3
- data/.github/workflows/main.yml +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 219b35c7c69ba33d474d1063586cc0d357a4ab129b84eb80a9d9229570680a15
|
4
|
+
data.tar.gz: 3dce2f5202292466c7f4653e2b68928121a7b9aa5ba0c51375d01d0575159510
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e76e2a025181932da7cb730fa624e2ff101a5e48bf565bec1b1e75448ee59c3a92b16c79444014ca1ef202db0cfb944f03214afdffcb13b8bc62ca6e54d5764a
|
7
|
+
data.tar.gz: db2eced35f5b27bd0db443aaaa7825008c25dd06b2c3a4c4c2173435f92ace7dbf056e48604cdb0d2b0b2f76ab94a8ea26a733f939d338523253c0e3f4e9afd4
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
name: Default
|
3
|
+
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
|
7
|
+
concurrency:
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
9
|
+
cancel-in-progress: true
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build_and_publish:
|
13
|
+
name: Build and Publish
|
14
|
+
uses: wealthsimple/public-github-workflows/.github/workflows/ruby-gem-build.yaml@main
|
15
|
+
secrets: inherit
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-
|
3
|
+
# on 2024-06-14 14:59:19 UTC using RuboCop version 1.64.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -11,10 +11,18 @@
|
|
11
11
|
Metrics/AbcSize:
|
12
12
|
Max: 20
|
13
13
|
|
14
|
+
# Offense count: 2
|
15
|
+
# Configuration parameters: AllowedPatterns.
|
16
|
+
# AllowedPatterns: ^expect_, ^assert_
|
17
|
+
RSpec/NoExpectationExample:
|
18
|
+
Exclude:
|
19
|
+
- 'spec/logger_spec.rb'
|
20
|
+
- 'spec/queue_poller_spec.rb'
|
21
|
+
|
14
22
|
# Offense count: 9
|
15
|
-
# Configuration parameters: Include, CustomTransform, IgnoreMethods,
|
16
|
-
# Include: **/*_spec
|
17
|
-
RSpec/
|
23
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
|
24
|
+
# Include: **/*_spec.rb
|
25
|
+
RSpec/SpecFilePathFormat:
|
18
26
|
Exclude:
|
19
27
|
- 'spec/configuration_spec.rb'
|
20
28
|
- 'spec/logger_spec.rb'
|
@@ -26,16 +34,6 @@ RSpec/FilePath:
|
|
26
34
|
- 'spec/topic_publisher_spec.rb'
|
27
35
|
- 'spec/version_spec.rb'
|
28
36
|
|
29
|
-
# Offense count: 14
|
30
|
-
# Configuration parameters: EnforcedStyle.
|
31
|
-
# SupportedStyles: have_received, receive
|
32
|
-
RSpec/MessageSpies:
|
33
|
-
Exclude:
|
34
|
-
- 'spec/message_handler_spec.rb'
|
35
|
-
- 'spec/queue_poller_spec.rb'
|
36
|
-
- 'spec/rollbar_spec.rb'
|
37
|
-
- 'spec/topic_publisher_spec.rb'
|
38
|
-
|
39
37
|
# Offense count: 2
|
40
38
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
41
39
|
RSpec/VerifiedDoubles:
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
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
|
-
##
|
7
|
+
## Unreleased
|
8
|
+
|
9
|
+
## 5.3.4 - 2024-06-14
|
10
|
+
### Changed
|
11
|
+
- Updated dependencies
|
12
|
+
|
13
|
+
## 5.3.3 - 2024-06-14
|
14
|
+
### Changed
|
15
|
+
- Updated dependencies
|
16
|
+
|
17
|
+
## 5.3.2 - 2024-05-27
|
8
18
|
### Changed
|
9
19
|
- Updated dependencies
|
10
20
|
|
@@ -165,7 +175,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
165
175
|
### Changed
|
166
176
|
- Updated dependencies
|
167
177
|
|
168
|
-
|
178
|
+
## 5.0.4 - 2022-04-01
|
169
179
|
### Changed
|
170
180
|
- Updated workflows
|
171
181
|
|
@@ -242,17 +252,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
242
252
|
- Migrate CI from CircleCI to GitHub Actions
|
243
253
|
|
244
254
|
## 4.0.3 - 2021-03-08
|
255
|
+
### Changed
|
245
256
|
- Update documentation to include instructions on directly publishing to SQS
|
246
257
|
|
247
258
|
## 4.0.2 - 2020-12-17
|
259
|
+
### Changed
|
248
260
|
- Bump local dev version, rubocop fixes, add backstage catalog file + sonarqube project settings
|
249
261
|
|
250
262
|
## 4.0.1 - 2020-03-23
|
251
|
-
###
|
263
|
+
### Fixed
|
252
264
|
- Fixes 4.0.0. Instead of expecting message attributes in the message from `poll`, retrieves them from the right place.
|
253
265
|
|
254
266
|
## 4.0.0 - 2020-03-18
|
255
|
-
###
|
267
|
+
### Changed
|
256
268
|
- Add the ability for SQS to receive message attributes
|
257
269
|
- `handle` function of `QueuePoller` now takes a third parameter `message_attributes`
|
258
270
|
- blocks or `MessageHandler`s passed to `QueuePoller` can use this `message_attributes`
|
@@ -298,6 +310,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
298
310
|
## 2.0.1 - 2019-01-03
|
299
311
|
### Changed
|
300
312
|
- add internal gem spec to test standard gem behavior, reduces unnecessary copy and pasting
|
313
|
+
|
301
314
|
### Fixed
|
302
315
|
- namespace for the VERSION constant was incorrectly set to Ws::Ws
|
303
316
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pheme (5.3.
|
4
|
+
pheme (5.3.4)
|
5
5
|
activesupport (>= 4)
|
6
6
|
aws-sdk-sns (~> 1.1)
|
7
7
|
aws-sdk-sqs (~> 1.3)
|
@@ -11,7 +11,7 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (7.1.3.
|
14
|
+
activesupport (7.1.3.4)
|
15
15
|
base64
|
16
16
|
bigdecimal
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -25,17 +25,17 @@ GEM
|
|
25
25
|
public_suffix (>= 2.0.2, < 6.0)
|
26
26
|
ast (2.4.2)
|
27
27
|
aws-eventstream (1.3.0)
|
28
|
-
aws-partitions (1.
|
29
|
-
aws-sdk-core (3.
|
28
|
+
aws-partitions (1.944.0)
|
29
|
+
aws-sdk-core (3.197.0)
|
30
30
|
aws-eventstream (~> 1, >= 1.3.0)
|
31
31
|
aws-partitions (~> 1, >= 1.651.0)
|
32
32
|
aws-sigv4 (~> 1.8)
|
33
33
|
jmespath (~> 1, >= 1.6.1)
|
34
|
-
aws-sdk-sns (1.
|
35
|
-
aws-sdk-core (~> 3, >= 3.
|
34
|
+
aws-sdk-sns (1.77.0)
|
35
|
+
aws-sdk-core (~> 3, >= 3.197.0)
|
36
36
|
aws-sigv4 (~> 1.1)
|
37
|
-
aws-sdk-sqs (1.
|
38
|
-
aws-sdk-core (~> 3, >= 3.
|
37
|
+
aws-sdk-sqs (1.76.0)
|
38
|
+
aws-sdk-core (~> 3, >= 3.197.0)
|
39
39
|
aws-sigv4 (~> 1.1)
|
40
40
|
aws-sigv4 (1.8.0)
|
41
41
|
aws-eventstream (~> 1, >= 1.0.2)
|
@@ -44,12 +44,12 @@ GEM
|
|
44
44
|
bundler-audit (0.9.1)
|
45
45
|
bundler (>= 1.2.0, < 3)
|
46
46
|
thor (~> 1.0)
|
47
|
-
concurrent-ruby (1.
|
47
|
+
concurrent-ruby (1.3.3)
|
48
48
|
connection_pool (2.4.1)
|
49
49
|
diff-lcs (1.5.1)
|
50
50
|
docile (1.4.0)
|
51
51
|
drb (2.2.1)
|
52
|
-
git (2.
|
52
|
+
git (2.1.1)
|
53
53
|
activesupport (>= 5.0)
|
54
54
|
addressable (~> 2.8)
|
55
55
|
process_executer (~> 1.1)
|
@@ -60,23 +60,26 @@ GEM
|
|
60
60
|
json (2.7.2)
|
61
61
|
language_server-protocol (3.17.0.3)
|
62
62
|
lint_roller (1.1.0)
|
63
|
-
minitest (5.23.
|
63
|
+
minitest (5.23.1)
|
64
64
|
mutex_m (0.2.0)
|
65
|
-
parallel (1.
|
66
|
-
|
65
|
+
parallel (1.25.1)
|
66
|
+
parse_a_changelog (1.3.0)
|
67
|
+
treetop (~> 1.6)
|
68
|
+
parser (3.3.3.0)
|
67
69
|
ast (~> 2.4.1)
|
68
70
|
racc
|
71
|
+
polyglot (0.3.5)
|
69
72
|
process_executer (1.1.0)
|
70
73
|
public_suffix (5.0.5)
|
71
|
-
racc (1.
|
72
|
-
rack (3.
|
74
|
+
racc (1.8.0)
|
75
|
+
rack (3.1.3)
|
73
76
|
rainbow (3.1.1)
|
74
77
|
rake (13.2.1)
|
75
78
|
rchardet (1.8.0)
|
76
79
|
regexp_parser (2.9.2)
|
77
80
|
resource-struct (0.4.0)
|
78
|
-
rexml (3.
|
79
|
-
strscan
|
81
|
+
rexml (3.3.0)
|
82
|
+
strscan
|
80
83
|
rspec (3.13.0)
|
81
84
|
rspec-core (~> 3.13.0)
|
82
85
|
rspec-expectations (~> 3.13.0)
|
@@ -85,7 +88,7 @@ GEM
|
|
85
88
|
rspec-expectations (>= 2.99.0.beta1)
|
86
89
|
rspec-core (3.13.0)
|
87
90
|
rspec-support (~> 3.13.0)
|
88
|
-
rspec-expectations (3.13.
|
91
|
+
rspec-expectations (3.13.1)
|
89
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
93
|
rspec-support (~> 3.13.0)
|
91
94
|
rspec-its (1.3.0)
|
@@ -97,7 +100,7 @@ GEM
|
|
97
100
|
rspec-support (3.13.1)
|
98
101
|
rspec_junit_formatter (0.6.0)
|
99
102
|
rspec-core (>= 2, < 4, != 2.12.0)
|
100
|
-
rubocop (1.
|
103
|
+
rubocop (1.64.1)
|
101
104
|
json (~> 2.3)
|
102
105
|
language_server-protocol (>= 3.17.0)
|
103
106
|
parallel (~> 1.10)
|
@@ -110,10 +113,8 @@ GEM
|
|
110
113
|
unicode-display_width (>= 2.4.0, < 3.0)
|
111
114
|
rubocop-ast (1.31.3)
|
112
115
|
parser (>= 3.3.1.0)
|
113
|
-
rubocop-
|
114
|
-
rubocop (~> 1.
|
115
|
-
rubocop-factory_bot (2.25.1)
|
116
|
-
rubocop (~> 1.41)
|
116
|
+
rubocop-factory_bot (2.26.1)
|
117
|
+
rubocop (~> 1.61)
|
117
118
|
rubocop-performance (1.21.0)
|
118
119
|
rubocop (>= 1.48.1, < 2.0)
|
119
120
|
rubocop-ast (>= 1.31.1, < 2.0)
|
@@ -122,13 +123,8 @@ GEM
|
|
122
123
|
rack (>= 1.1)
|
123
124
|
rubocop (>= 1.33.0, < 2.0)
|
124
125
|
rubocop-ast (>= 1.30.0, < 2.0)
|
125
|
-
rubocop-rspec (
|
126
|
-
rubocop (~> 1.
|
127
|
-
rubocop-capybara (~> 2.17)
|
128
|
-
rubocop-factory_bot (~> 2.22)
|
129
|
-
rubocop-rspec_rails (~> 2.28)
|
130
|
-
rubocop-rspec_rails (2.28.3)
|
131
|
-
rubocop (~> 1.40)
|
126
|
+
rubocop-rspec (3.0.1)
|
127
|
+
rubocop (~> 1.61)
|
132
128
|
rubocop-vendor (0.13.0)
|
133
129
|
rubocop
|
134
130
|
ruby-progressbar (1.13.0)
|
@@ -139,10 +135,10 @@ GEM
|
|
139
135
|
simplecov-html (0.12.3)
|
140
136
|
simplecov_json_formatter (0.1.4)
|
141
137
|
smarter_csv (1.10.3)
|
142
|
-
standard (1.
|
138
|
+
standard (1.37.0)
|
143
139
|
language_server-protocol (~> 3.17.0.2)
|
144
140
|
lint_roller (~> 1.0)
|
145
|
-
rubocop (~> 1.
|
141
|
+
rubocop (~> 1.64.0)
|
146
142
|
standard-custom (~> 1.0.0)
|
147
143
|
standard-performance (~> 1.4)
|
148
144
|
standard-custom (1.0.2)
|
@@ -156,11 +152,14 @@ GEM
|
|
156
152
|
rubocop-rails (~> 2.23.1)
|
157
153
|
strscan (3.1.0)
|
158
154
|
thor (1.3.1)
|
155
|
+
treetop (1.6.12)
|
156
|
+
polyglot (~> 0.3)
|
159
157
|
tzinfo (2.0.6)
|
160
158
|
concurrent-ruby (~> 1.0)
|
161
159
|
unicode-display_width (2.5.0)
|
162
|
-
ws-style (7.
|
163
|
-
rubocop-
|
160
|
+
ws-style (7.5.0)
|
161
|
+
rubocop-factory_bot (>= 2.26.0)
|
162
|
+
rubocop-rspec (>= 3.0.0)
|
164
163
|
rubocop-vendor (>= 0.11)
|
165
164
|
standard (>= 1.30.1)
|
166
165
|
standard-custom (>= 1.0.2)
|
@@ -173,6 +172,7 @@ DEPENDENCIES
|
|
173
172
|
bundler
|
174
173
|
bundler-audit
|
175
174
|
git
|
175
|
+
parse_a_changelog
|
176
176
|
pheme!
|
177
177
|
rake
|
178
178
|
rspec
|
data/lib/pheme/version.rb
CHANGED
data/pheme.gemspec
CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
|
31
31
|
s.add_development_dependency 'bundler'
|
32
32
|
s.add_development_dependency 'git'
|
33
|
+
s.add_development_dependency "parse_a_changelog"
|
33
34
|
s.add_development_dependency 'rake'
|
34
35
|
s.add_development_dependency 'rspec'
|
35
36
|
s.add_development_dependency 'rspec-collection_matchers'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class ExampleQueuePoller < Pheme::QueuePoller
|
2
|
-
def initialize(queue_url: 'http://mock_url.test', **
|
3
|
-
super
|
2
|
+
def initialize(queue_url: 'http://mock_url.test', **)
|
3
|
+
super
|
4
4
|
end
|
5
5
|
|
6
6
|
def handle(message, metadata, message_attributes)
|
data/spec/version_spec.rb
CHANGED
@@ -1,35 +1,87 @@
|
|
1
1
|
require 'git'
|
2
|
+
require 'parse_a_changelog'
|
2
3
|
|
3
|
-
describe
|
4
|
+
RSpec.describe 'a published gem' do # rubocop:disable RSpec/DescribeClass
|
4
5
|
def get_version(git, branch = 'HEAD')
|
5
6
|
git.grep('VERSION = ', 'lib/*/version.rb', { object: branch }).
|
6
7
|
map { |_sha, matches| matches.first[1] }.
|
7
|
-
filter_map { |
|
8
|
+
filter_map { |str| parse_version(str) }.
|
8
9
|
first
|
10
|
+
rescue Git::GitExecuteError
|
11
|
+
# Catches failures for branch name being master
|
12
|
+
nil
|
9
13
|
end
|
10
14
|
|
11
15
|
def parse_version(string)
|
12
16
|
string.match(/VERSION = ['"](.*)['"]/)[1]
|
13
17
|
end
|
14
18
|
|
19
|
+
def main_branch
|
20
|
+
@main_branch ||=
|
21
|
+
if git.branches['origin/main']
|
22
|
+
'origin/main'
|
23
|
+
elsif git.branches['origin/master']
|
24
|
+
'origin/master'
|
25
|
+
else
|
26
|
+
raise StandardError,
|
27
|
+
<<~ERROR
|
28
|
+
Couldn't determine main branch.
|
29
|
+
Does 'origin/main' or 'origin/master' need to be fetched?
|
30
|
+
ERROR
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def needs_version_bump?
|
35
|
+
base = git.merge_base(main_branch, 'HEAD').first&.sha
|
36
|
+
base ||= main_branch
|
37
|
+
git.diff(base, 'HEAD').any? { |diff|
|
38
|
+
not_gemfile?(diff) && not_dotfile?(diff) && not_docs?(diff) && not_spec?(diff)
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
def not_gemfile?(diff)
|
43
|
+
['Gemfile', 'Gemfile.lock'].exclude?(diff.path)
|
44
|
+
end
|
45
|
+
|
46
|
+
def not_docs?(diff)
|
47
|
+
!diff.path.end_with?('.md')
|
48
|
+
end
|
49
|
+
|
50
|
+
def not_spec?(diff)
|
51
|
+
!diff.path.start_with?('spec/')
|
52
|
+
end
|
53
|
+
|
54
|
+
def not_dotfile?(diff)
|
55
|
+
# Ignore dotfiles, like .gitignore and CI files like .github/...
|
56
|
+
!diff.path.start_with?('.')
|
57
|
+
end
|
58
|
+
|
59
|
+
let(:git) { Git.open('.') }
|
60
|
+
let(:head_version) { get_version(git, 'HEAD') }
|
61
|
+
|
15
62
|
it 'has a version number' do
|
16
|
-
git = Git.open('.')
|
17
|
-
head_version = get_version(git, 'HEAD')
|
18
63
|
expect(head_version).not_to be_nil
|
19
64
|
end
|
20
65
|
|
21
|
-
it 'has a bumped version' do
|
22
|
-
|
23
|
-
main_version = get_version(git, 'origin/main')
|
66
|
+
it 'has a bumped version committed' do
|
67
|
+
main_version = get_version(git, main_branch)
|
24
68
|
skip('first time publishing, no need to compare versions') if main_version.nil?
|
25
69
|
|
26
|
-
is_main_branch = git.current_branch ==
|
70
|
+
is_main_branch = git.current_branch == main_branch
|
27
71
|
skip('already on main branch, no need to compare versions') if is_main_branch
|
28
72
|
|
29
|
-
|
30
|
-
puts "head_version " + head_version
|
31
|
-
raise 'no version.rb file found on the current branch' if head_version.nil?
|
73
|
+
skip('Diff only contains non-code changes, no need to bump version') unless needs_version_bump?
|
32
74
|
|
33
75
|
expect(Gem::Version.new(head_version)).to be > Gem::Version.new(main_version)
|
34
76
|
end
|
77
|
+
|
78
|
+
it 'has a CHANGELOG.md file' do
|
79
|
+
expect(File).to exist('CHANGELOG.md')
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'has changelog entry for current version' do
|
83
|
+
parser = ParseAChangelog.parse('CHANGELOG.md')
|
84
|
+
versions = parser.elements[2].elements.map { |element| element.elements[1].text_value }
|
85
|
+
expect(versions.first).to include(head_version)
|
86
|
+
end
|
35
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pheme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Graham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: parse_a_changelog
|
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'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rake
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,7 +229,7 @@ extra_rdoc_files: []
|
|
215
229
|
files:
|
216
230
|
- ".github/CODEOWNERS"
|
217
231
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
218
|
-
- ".github/workflows/
|
232
|
+
- ".github/workflows/default.yaml"
|
219
233
|
- ".github/workflows/stale.yml"
|
220
234
|
- ".gitignore"
|
221
235
|
- ".rspec"
|
data/.github/workflows/main.yml
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Pipeline
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
concurrency:
|
6
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
7
|
-
cancel-in-progress: true
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
build:
|
11
|
-
name: Build
|
12
|
-
runs-on: ubuntu-22.04
|
13
|
-
strategy:
|
14
|
-
matrix:
|
15
|
-
ruby-version: [3.1.4, 3.2.3, 3.3.0]
|
16
|
-
steps:
|
17
|
-
- uses: actions/checkout@v3
|
18
|
-
with:
|
19
|
-
fetch-depth: 0
|
20
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
21
|
-
uses: ruby/setup-ruby@v1
|
22
|
-
with:
|
23
|
-
bundler-cache: true
|
24
|
-
ruby-version: ${{ matrix.ruby-version }}
|
25
|
-
- name: Lint
|
26
|
-
run: bundle exec rubocop
|
27
|
-
- name: Test
|
28
|
-
run: bundle exec rspec
|
29
|
-
|
30
|
-
# Separate `release` job from `build`, as we only want release to be run once
|
31
|
-
# and not run for each ruby version in the matrix:
|
32
|
-
release:
|
33
|
-
name: Release
|
34
|
-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
35
|
-
needs: build
|
36
|
-
runs-on: ubuntu-22.04
|
37
|
-
steps:
|
38
|
-
- uses: actions/checkout@v3
|
39
|
-
with:
|
40
|
-
fetch-depth: 0
|
41
|
-
- name: Set up Ruby
|
42
|
-
uses: ruby/setup-ruby@v1
|
43
|
-
with:
|
44
|
-
bundler-cache: true
|
45
|
-
- name: Release the gem
|
46
|
-
run: |
|
47
|
-
mkdir -p ~/.gem
|
48
|
-
cat << EOF > ~/.gem/credentials
|
49
|
-
---
|
50
|
-
:github: Bearer ${GITHUB_TOKEN}
|
51
|
-
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
52
|
-
EOF
|
53
|
-
chmod 0600 ~/.gem/credentials
|
54
|
-
git config user.email "noreply@wealthsimple.com"
|
55
|
-
git config user.name "Wolfbot"
|
56
|
-
bundle exec rake release
|
57
|
-
env:
|
58
|
-
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|