ruby_gpg2 0.13.0.pre.4 → 0.13.0.pre.4.pr113.1.1
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 +4 -4
- data/Gemfile +8 -0
- data/Gemfile.lock +63 -54
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/lib/ruby_gpg2/version.rb +1 -1
- data/ruby_gpg2.gemspec +2 -3
- metadata +10 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c14117a737001e846888b84dc831e67ad90aa7c93d9b92104439c90cbdfe9507
|
|
4
|
+
data.tar.gz: 265a00a0bc7951619894980967d807d707effc9b46eebe001ba799af2eb409d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1be7139673bddf81de62cc17bfbb221d2bf99f126ac76c8c1f29df458eacbac6611c415139e4f20f4bfdd563a8947dd4f001ca629f706f5aaa3bad10a8a09c2
|
|
7
|
+
data.tar.gz: 40841c045f2ca570a9c4a5885d0ff5c0728a6c982a6c0855c5951f8a9826276ce8dfaf7e16e5920d92184dd0c50701bcecb9b53eab8a85ab3344cd65e15fa240
|
data/Gemfile
CHANGED
|
@@ -4,3 +4,11 @@ source 'https://rubygems.org'
|
|
|
4
4
|
|
|
5
5
|
# Specify your gem's dependencies in ruby_fly.gemspec
|
|
6
6
|
gemspec
|
|
7
|
+
|
|
8
|
+
# Hold the rake tasklib family to its stable line: a floor-only requirement
|
|
9
|
+
# lets bundler prefer a prerelease build even when a stable release satisfies
|
|
10
|
+
# every dependant.
|
|
11
|
+
gem 'rake_factory', '0.33.0'
|
|
12
|
+
gem 'rake_git', '0.2.0'
|
|
13
|
+
gem 'rake_git_crypt', '0.4.0'
|
|
14
|
+
gem 'ruby_git_crypt', '0.1.0'
|
data/Gemfile.lock
CHANGED
|
@@ -1,104 +1,112 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ruby_gpg2 (0.13.0.pre.4)
|
|
4
|
+
ruby_gpg2 (0.13.0.pre.4.pr113.1.1)
|
|
5
5
|
lino (>= 4.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (
|
|
10
|
+
activesupport (8.1.3)
|
|
11
11
|
base64
|
|
12
12
|
bigdecimal
|
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
14
14
|
connection_pool (>= 2.2.5)
|
|
15
15
|
drb
|
|
16
16
|
i18n (>= 1.6, < 2)
|
|
17
|
+
json
|
|
17
18
|
logger (>= 1.4.2)
|
|
18
19
|
minitest (>= 5.1)
|
|
19
20
|
securerandom (>= 0.3)
|
|
20
21
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
uri (>= 0.13.1)
|
|
23
|
+
addressable (2.9.0)
|
|
24
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
23
25
|
ast (2.4.2)
|
|
24
|
-
base64 (0.
|
|
25
|
-
bigdecimal (
|
|
26
|
+
base64 (0.3.0)
|
|
27
|
+
bigdecimal (4.1.2)
|
|
26
28
|
childprocess (5.0.0)
|
|
27
29
|
colored2 (3.1.2)
|
|
28
|
-
concurrent-ruby (1.3.
|
|
29
|
-
connection_pool (
|
|
30
|
+
concurrent-ruby (1.3.8)
|
|
31
|
+
connection_pool (3.0.2)
|
|
30
32
|
diff-lcs (1.5.1)
|
|
31
33
|
docile (1.4.0)
|
|
32
|
-
drb (2.2.
|
|
33
|
-
excon (
|
|
34
|
-
faraday (2.10.0)
|
|
35
|
-
faraday-net_http (>= 2.0, < 3.2)
|
|
34
|
+
drb (2.2.3)
|
|
35
|
+
excon (1.6.0)
|
|
36
36
|
logger
|
|
37
|
-
faraday
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
faraday (2.14.3)
|
|
38
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
39
|
+
json
|
|
40
|
+
logger
|
|
41
|
+
faraday-net_http (3.4.4)
|
|
42
|
+
net-http (~> 0.5)
|
|
43
|
+
ffi (1.17.4)
|
|
44
|
+
ffi (1.17.4-arm64-darwin)
|
|
45
|
+
ffi (1.17.4-x86_64-darwin)
|
|
46
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
47
|
+
gem-release (2.2.4)
|
|
40
48
|
git (1.19.1)
|
|
41
49
|
addressable (~> 2.8)
|
|
42
50
|
rchardet (~> 1.8)
|
|
43
51
|
hamster (3.0.0)
|
|
44
52
|
concurrent-ruby (~> 1.0)
|
|
45
|
-
i18n (1.
|
|
53
|
+
i18n (1.15.2)
|
|
46
54
|
concurrent-ruby (~> 1.0)
|
|
47
|
-
immutable-struct (2.
|
|
48
|
-
json (2.
|
|
55
|
+
immutable-struct (2.5.0)
|
|
56
|
+
json (2.21.1)
|
|
49
57
|
language_server-protocol (3.17.0.3)
|
|
50
58
|
lino (4.1.0)
|
|
51
59
|
childprocess (~> 5.0.0)
|
|
52
60
|
hamster (~> 3.0)
|
|
53
61
|
open4 (~> 1.3)
|
|
54
|
-
logger (1.
|
|
55
|
-
minitest (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
logger (1.7.0)
|
|
63
|
+
minitest (6.0.6)
|
|
64
|
+
drb (~> 2.0)
|
|
65
|
+
prism (~> 1.5)
|
|
66
|
+
net-http (0.9.1)
|
|
67
|
+
uri (>= 0.11.1)
|
|
68
|
+
octokit (10.0.0)
|
|
60
69
|
faraday (>= 1, < 3)
|
|
61
70
|
sawyer (~> 0.9)
|
|
62
71
|
open4 (1.3.4)
|
|
63
72
|
parallel (1.26.3)
|
|
64
|
-
parser (3.3.
|
|
73
|
+
parser (3.3.7.0)
|
|
65
74
|
ast (~> 2.4.1)
|
|
66
75
|
racc
|
|
67
|
-
|
|
76
|
+
prism (1.9.0)
|
|
77
|
+
public_suffix (7.0.5)
|
|
68
78
|
racc (1.8.1)
|
|
69
79
|
rainbow (3.1.1)
|
|
70
|
-
rake (13.2
|
|
71
|
-
|
|
72
|
-
colored2 (~> 3.1)
|
|
73
|
-
excon (~> 0.72)
|
|
74
|
-
rake_factory (~> 0.33)
|
|
75
|
-
sshkey (~> 2.0)
|
|
76
|
-
rake_factory (0.34.0.pre.2)
|
|
80
|
+
rake (13.4.2)
|
|
81
|
+
rake_factory (0.33.0)
|
|
77
82
|
activesupport (>= 4)
|
|
78
83
|
rake (~> 13.0)
|
|
79
|
-
rake_git (0.
|
|
84
|
+
rake_git (0.2.0)
|
|
80
85
|
colored2 (~> 3.1)
|
|
81
86
|
git (~> 1.13, >= 1.13.2)
|
|
82
87
|
rake_factory (~> 0.33)
|
|
83
|
-
rake_git_crypt (0.
|
|
88
|
+
rake_git_crypt (0.4.0)
|
|
84
89
|
colored2 (~> 3.1)
|
|
90
|
+
lino (~> 4.1)
|
|
85
91
|
rake_factory (~> 0.33)
|
|
86
92
|
ruby_git_crypt (~> 0.1)
|
|
87
93
|
ruby_gpg2 (~> 0.12)
|
|
88
|
-
rake_github (0.
|
|
94
|
+
rake_github (0.17.0)
|
|
89
95
|
colored2 (~> 3.1)
|
|
90
|
-
octokit (>=
|
|
96
|
+
octokit (>= 7.0, < 11.0)
|
|
91
97
|
rake_factory (~> 0.33)
|
|
98
|
+
rbnacl (~> 7.1)
|
|
92
99
|
sshkey (~> 2.0)
|
|
93
100
|
rake_gpg (0.20.0)
|
|
94
101
|
rake_factory (~> 0.33)
|
|
95
102
|
ruby_gpg2 (~> 0.12)
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
rake_slack (0.3.0)
|
|
104
|
+
excon (>= 0.72, < 2.0)
|
|
98
105
|
rake_factory (~> 0.33)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
rbnacl (7.1.2)
|
|
107
|
+
ffi (~> 1)
|
|
108
|
+
rchardet (1.10.2)
|
|
109
|
+
regexp_parser (2.10.0)
|
|
102
110
|
rspec (3.13.0)
|
|
103
111
|
rspec-core (~> 3.13.0)
|
|
104
112
|
rspec-expectations (~> 3.13.0)
|
|
@@ -112,7 +120,7 @@ GEM
|
|
|
112
120
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
113
121
|
rspec-support (~> 3.13.0)
|
|
114
122
|
rspec-support (3.13.1)
|
|
115
|
-
rubocop (1.
|
|
123
|
+
rubocop (1.67.0)
|
|
116
124
|
json (~> 2.3)
|
|
117
125
|
language_server-protocol (>= 3.17.0)
|
|
118
126
|
parallel (~> 1.10)
|
|
@@ -122,20 +130,20 @@ GEM
|
|
|
122
130
|
rubocop-ast (>= 1.32.2, < 2.0)
|
|
123
131
|
ruby-progressbar (~> 1.7)
|
|
124
132
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
125
|
-
rubocop-ast (1.
|
|
133
|
+
rubocop-ast (1.37.0)
|
|
126
134
|
parser (>= 3.3.1.0)
|
|
127
135
|
rubocop-rake (0.6.0)
|
|
128
136
|
rubocop (~> 1.0)
|
|
129
|
-
rubocop-rspec (3.0
|
|
137
|
+
rubocop-rspec (3.4.0)
|
|
130
138
|
rubocop (~> 1.61)
|
|
131
139
|
ruby-progressbar (1.13.0)
|
|
132
|
-
ruby_git_crypt (0.
|
|
140
|
+
ruby_git_crypt (0.1.0)
|
|
133
141
|
immutable-struct (~> 2.4)
|
|
134
142
|
lino (>= 4.1)
|
|
135
|
-
sawyer (0.9.
|
|
143
|
+
sawyer (0.9.3)
|
|
136
144
|
addressable (>= 2.3.5)
|
|
137
145
|
faraday (>= 0.17.3, < 3)
|
|
138
|
-
securerandom (0.
|
|
146
|
+
securerandom (0.4.1)
|
|
139
147
|
simplecov (0.22.0)
|
|
140
148
|
docile (~> 1.1)
|
|
141
149
|
simplecov-html (~> 0.11)
|
|
@@ -145,8 +153,8 @@ GEM
|
|
|
145
153
|
sshkey (2.0.0)
|
|
146
154
|
tzinfo (2.0.6)
|
|
147
155
|
concurrent-ruby (~> 1.0)
|
|
148
|
-
unicode-display_width (2.
|
|
149
|
-
uri (
|
|
156
|
+
unicode-display_width (2.6.0)
|
|
157
|
+
uri (1.1.1)
|
|
150
158
|
|
|
151
159
|
PLATFORMS
|
|
152
160
|
arm64-darwin-21
|
|
@@ -161,16 +169,17 @@ DEPENDENCIES
|
|
|
161
169
|
bundler
|
|
162
170
|
gem-release
|
|
163
171
|
rake
|
|
164
|
-
|
|
165
|
-
rake_git
|
|
166
|
-
rake_git_crypt
|
|
172
|
+
rake_factory (= 0.33.0)
|
|
173
|
+
rake_git (= 0.2.0)
|
|
174
|
+
rake_git_crypt (= 0.4.0)
|
|
167
175
|
rake_github
|
|
168
176
|
rake_gpg
|
|
169
|
-
|
|
177
|
+
rake_slack
|
|
170
178
|
rspec
|
|
171
179
|
rubocop
|
|
172
180
|
rubocop-rake
|
|
173
181
|
rubocop-rspec
|
|
182
|
+
ruby_git_crypt (= 0.1.0)
|
|
174
183
|
ruby_gpg2!
|
|
175
184
|
simplecov
|
|
176
185
|
|
data/README.md
CHANGED
|
@@ -34,16 +34,16 @@ release a new version, update the version number in `version.rb`, and then run
|
|
|
34
34
|
git commits and tags, and push the `.gem` file to
|
|
35
35
|
[rubygems.org](https://rubygems.org).
|
|
36
36
|
|
|
37
|
-
### Managing
|
|
37
|
+
### Managing CI keys
|
|
38
38
|
|
|
39
|
-
To encrypt a GPG key for use by
|
|
39
|
+
To encrypt a GPG key for use by CI:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
openssl aes-256-cbc \
|
|
43
43
|
-e \
|
|
44
44
|
-md sha1 \
|
|
45
45
|
-in ./config/secrets/ci/gpg.private \
|
|
46
|
-
-out ./.
|
|
46
|
+
-out ./.github/gpg.private.enc \
|
|
47
47
|
-k "<passphrase>"
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ To check decryption is working correctly:
|
|
|
53
53
|
openssl aes-256-cbc \
|
|
54
54
|
-d \
|
|
55
55
|
-md sha1 \
|
|
56
|
-
-in ./.
|
|
56
|
+
-in ./.github/gpg.private.enc \
|
|
57
57
|
-k "<passphrase>"
|
|
58
58
|
```
|
|
59
59
|
|
data/Rakefile
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'rake_circle_ci'
|
|
4
3
|
require 'rake_git'
|
|
5
4
|
require 'rake_git_crypt'
|
|
6
5
|
require 'rake_github'
|
|
7
6
|
require 'rake_gpg'
|
|
8
|
-
require '
|
|
7
|
+
require 'rake_slack'
|
|
9
8
|
require 'rspec/core/rake_task'
|
|
10
9
|
require 'rubocop/rake_task'
|
|
11
10
|
require 'securerandom'
|
|
12
|
-
require 'yaml'
|
|
13
11
|
|
|
14
12
|
task default: %i[
|
|
15
13
|
library:fix
|
|
@@ -59,13 +57,6 @@ namespace :encryption do
|
|
|
59
57
|
end
|
|
60
58
|
|
|
61
59
|
namespace :keys do
|
|
62
|
-
namespace :deploy do
|
|
63
|
-
RakeSSH.define_key_tasks(
|
|
64
|
-
path: 'config/secrets/ci/',
|
|
65
|
-
comment: 'maintainers@infrablocks.io'
|
|
66
|
-
)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
60
|
namespace :gpg do
|
|
70
61
|
RakeGPG.define_generate_key_task(
|
|
71
62
|
output_directory: 'config/secrets/ci',
|
|
@@ -91,7 +82,6 @@ namespace :secrets do
|
|
|
91
82
|
desc 'Generate all generatable secrets.'
|
|
92
83
|
task generate: %w[
|
|
93
84
|
encryption:passphrase:generate
|
|
94
|
-
keys:deploy:generate
|
|
95
85
|
keys:gpg:generate
|
|
96
86
|
]
|
|
97
87
|
|
|
@@ -115,57 +105,98 @@ namespace :library do
|
|
|
115
105
|
|
|
116
106
|
desc 'Attempt to automatically fix issues with the library'
|
|
117
107
|
task fix: [:'rubocop:autocorrect_all']
|
|
108
|
+
|
|
109
|
+
desc 'Build the library'
|
|
110
|
+
task :build do
|
|
111
|
+
sh 'gem build ruby_gpg2.gemspec'
|
|
112
|
+
end
|
|
118
113
|
end
|
|
119
114
|
|
|
120
115
|
namespace :test do
|
|
121
116
|
RSpec::Core::RakeTask.new(:unit)
|
|
122
117
|
end
|
|
123
118
|
|
|
124
|
-
RakeCircleCI.define_project_tasks(
|
|
125
|
-
namespace: :circle_ci,
|
|
126
|
-
project_slug: 'github/infrablocks/ruby_gpg2'
|
|
127
|
-
) do |t|
|
|
128
|
-
circle_ci_config =
|
|
129
|
-
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
|
130
|
-
|
|
131
|
-
t.api_token = circle_ci_config['circle_ci_api_token']
|
|
132
|
-
t.environment_variables = {
|
|
133
|
-
ENCRYPTION_PASSPHRASE:
|
|
134
|
-
File.read('config/secrets/ci/encryption.passphrase')
|
|
135
|
-
.chomp
|
|
136
|
-
}
|
|
137
|
-
t.checkout_keys = []
|
|
138
|
-
t.ssh_keys = [
|
|
139
|
-
{
|
|
140
|
-
hostname: 'github.com',
|
|
141
|
-
private_key: File.read('config/secrets/ci/ssh.private')
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
end
|
|
145
|
-
|
|
146
119
|
RakeGithub.define_repository_tasks(
|
|
147
120
|
namespace: :github,
|
|
148
121
|
repository: 'infrablocks/ruby_gpg2'
|
|
149
122
|
) do |t|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
123
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
124
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
125
|
+
# otherwise surface later as an opaque Octokit 401. An empty or
|
|
126
|
+
# whitespace-only GITHUB_TOKEN is treated as absent so an authenticated
|
|
127
|
+
# operator falls through to `gh auth token` rather than hitting the raise.
|
|
128
|
+
github_token = ENV['GITHUB_TOKEN'].to_s.strip
|
|
129
|
+
if github_token.empty?
|
|
130
|
+
github_token = begin
|
|
131
|
+
`gh auth token`
|
|
132
|
+
rescue Errno::ENOENT
|
|
133
|
+
''
|
|
134
|
+
end.strip
|
|
135
|
+
end
|
|
136
|
+
if github_token.empty?
|
|
137
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
t.access_token = github_token
|
|
141
|
+
|
|
142
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
143
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
144
|
+
# same-repo human PRs. Guard against a locked clone: without
|
|
145
|
+
# it, File.read returns git-crypt ciphertext and github:secrets:ensure
|
|
146
|
+
# silently uploads garbage that only surfaces much later as an opaque
|
|
147
|
+
# GPG unlock failure in the release job.
|
|
148
|
+
passphrase_path = 'config/secrets/ci/encryption.passphrase'
|
|
149
|
+
unless File.exist?(passphrase_path)
|
|
150
|
+
raise "Passphrase file not found: #{passphrase_path} — expected a " \
|
|
151
|
+
'git-crypt-unlocked clone with the CI secrets present'
|
|
152
|
+
end
|
|
153
|
+
passphrase = File.binread(passphrase_path)
|
|
154
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
155
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the ' \
|
|
156
|
+
'clone before provisioning'
|
|
157
|
+
end
|
|
158
|
+
t.secrets = [
|
|
159
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
159
160
|
]
|
|
161
|
+
t.environments = [
|
|
162
|
+
{ name: 'release',
|
|
163
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
164
|
+
]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
namespace :slack do
|
|
168
|
+
RakeSlack.define_notification_tasks do |t|
|
|
169
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
170
|
+
t.routing_rules = [
|
|
171
|
+
{ when: { type: 'on_hold' },
|
|
172
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
173
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
174
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
175
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
176
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
177
|
+
{ when: { outcome: 'success' },
|
|
178
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
179
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
180
|
+
# out of a popular channel while this pipeline beds in.
|
|
181
|
+
{ when: {},
|
|
182
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
183
|
+
]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
namespace :repository do
|
|
188
|
+
desc 'Set the git author for CI'
|
|
189
|
+
task :set_ci_author do
|
|
190
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
191
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
192
|
+
end
|
|
160
193
|
end
|
|
161
194
|
|
|
162
195
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
196
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
197
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
198
|
+
github:secrets:ensure
|
|
199
|
+
github:environments:ensure
|
|
169
200
|
]
|
|
170
201
|
end
|
|
171
202
|
|
|
@@ -176,6 +207,38 @@ namespace :version do
|
|
|
176
207
|
end
|
|
177
208
|
end
|
|
178
209
|
|
|
210
|
+
namespace :prerelease do
|
|
211
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
212
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
213
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
214
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
215
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
version_file = 'lib/ruby_gpg2/version.rb'
|
|
219
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
220
|
+
source = File.read(version_file)
|
|
221
|
+
base = source[version_pattern, 2]
|
|
222
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
223
|
+
|
|
224
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
225
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
226
|
+
gem_file = "ruby_gpg2-#{version}.gem"
|
|
227
|
+
begin
|
|
228
|
+
File.write(version_file,
|
|
229
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
230
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
231
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
232
|
+
# (contrast the `release` task).
|
|
233
|
+
sh 'gem build ruby_gpg2.gemspec'
|
|
234
|
+
sh "gem push #{gem_file}"
|
|
235
|
+
ensure
|
|
236
|
+
File.write(version_file, source)
|
|
237
|
+
rm_f gem_file
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
179
242
|
desc 'Release gem'
|
|
180
243
|
task :release do
|
|
181
244
|
sh 'gem release --tag --push'
|
data/lib/ruby_gpg2/version.rb
CHANGED
data/ruby_gpg2.gemspec
CHANGED
|
@@ -34,19 +34,18 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
35
35
|
spec.require_paths = ['lib']
|
|
36
36
|
|
|
37
|
-
spec.required_ruby_version = '>= 3.
|
|
37
|
+
spec.required_ruby_version = '>= 3.3'
|
|
38
38
|
|
|
39
39
|
spec.add_dependency 'lino', '>= 4.1'
|
|
40
40
|
|
|
41
41
|
spec.add_development_dependency 'bundler'
|
|
42
42
|
spec.add_development_dependency 'gem-release'
|
|
43
43
|
spec.add_development_dependency 'rake'
|
|
44
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
45
44
|
spec.add_development_dependency 'rake_git'
|
|
46
45
|
spec.add_development_dependency 'rake_git_crypt'
|
|
47
46
|
spec.add_development_dependency 'rake_github'
|
|
48
47
|
spec.add_development_dependency 'rake_gpg'
|
|
49
|
-
spec.add_development_dependency '
|
|
48
|
+
spec.add_development_dependency 'rake_slack'
|
|
50
49
|
spec.add_development_dependency 'rspec'
|
|
51
50
|
spec.add_development_dependency 'rubocop'
|
|
52
51
|
spec.add_development_dependency 'rubocop-rake'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_gpg2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.0.pre.4
|
|
4
|
+
version: 0.13.0.pre.4.pr113.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- InfraBlocks Maintainers
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lino
|
|
@@ -66,20 +66,6 @@ dependencies:
|
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: rake_circle_ci
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
69
|
- !ruby/object:Gem::Dependency
|
|
84
70
|
name: rake_git
|
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -137,7 +123,7 @@ dependencies:
|
|
|
137
123
|
- !ruby/object:Gem::Version
|
|
138
124
|
version: '0'
|
|
139
125
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
126
|
+
name: rake_slack
|
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
|
142
128
|
requirements:
|
|
143
129
|
- - ">="
|
|
@@ -283,7 +269,7 @@ licenses:
|
|
|
283
269
|
- MIT
|
|
284
270
|
metadata:
|
|
285
271
|
rubygems_mfa_required: 'false'
|
|
286
|
-
post_install_message:
|
|
272
|
+
post_install_message:
|
|
287
273
|
rdoc_options: []
|
|
288
274
|
require_paths:
|
|
289
275
|
- lib
|
|
@@ -291,15 +277,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
291
277
|
requirements:
|
|
292
278
|
- - ">="
|
|
293
279
|
- !ruby/object:Gem::Version
|
|
294
|
-
version: '3.
|
|
280
|
+
version: '3.3'
|
|
295
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
296
282
|
requirements:
|
|
297
|
-
- - "
|
|
283
|
+
- - ">="
|
|
298
284
|
- !ruby/object:Gem::Version
|
|
299
|
-
version:
|
|
285
|
+
version: '0'
|
|
300
286
|
requirements: []
|
|
301
|
-
rubygems_version: 3.
|
|
302
|
-
signing_key:
|
|
287
|
+
rubygems_version: 3.5.22
|
|
288
|
+
signing_key:
|
|
303
289
|
specification_version: 4
|
|
304
290
|
summary: A simple Ruby wrapper for invoking gpg (>= 2.0) commands.
|
|
305
291
|
test_files: []
|