ruby_easy_rsa 0.14.0.pre.2 → 0.14.0.pre.3
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.lock +84 -75
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/lib/ruby_easy_rsa/version.rb +1 -1
- data/ruby_easy_rsa.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: 7a430ba082b954e6d9b740933b28660adce87570e1ef7426894ad87ca597efb5
|
|
4
|
+
data.tar.gz: af77274255d314df5861cd8e2d6f032da6a63a3a7fce59d238a00a7d5aa3bc17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b6e6339074f63befd89c4ed897d72d541157c968243c9090d53f0372dbc70de7c3c7dc7cb0f4ff28cbdac13b6df85ed53e69d7697afcce3a84fbbf5c4773647
|
|
7
|
+
data.tar.gz: a826e157eb135e4004b7daa2ac7bcf880b076fdade945b1899a56b2c09e7343a5bff1e5bf21adf974173e1113cff836d6e1a8e26afb17abb04e6c0d7ebb6d18a
|
data/Gemfile.lock
CHANGED
|
@@ -1,78 +1,82 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ruby_easy_rsa (0.14.0.pre.
|
|
4
|
+
ruby_easy_rsa (0.14.0.pre.3)
|
|
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
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
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
|
|
18
|
+
logger (>= 1.4.2)
|
|
17
19
|
minitest (>= 5.1)
|
|
18
|
-
|
|
19
|
-
tzinfo (~> 2.0)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
securerandom (>= 0.3)
|
|
21
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
22
|
+
uri (>= 0.13.1)
|
|
23
|
+
addressable (2.9.0)
|
|
24
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
25
|
+
ast (2.4.3)
|
|
26
|
+
base64 (0.3.0)
|
|
27
|
+
bigdecimal (4.1.2)
|
|
25
28
|
childprocess (5.0.0)
|
|
26
29
|
colored2 (3.1.2)
|
|
27
|
-
concurrent-ruby (1.3.
|
|
28
|
-
connection_pool (
|
|
29
|
-
diff-lcs (1.
|
|
30
|
+
concurrent-ruby (1.3.8)
|
|
31
|
+
connection_pool (3.0.2)
|
|
32
|
+
diff-lcs (1.6.2)
|
|
30
33
|
docile (1.4.0)
|
|
31
|
-
drb (2.2.
|
|
32
|
-
excon (
|
|
33
|
-
faraday (2.10.0)
|
|
34
|
-
faraday-net_http (>= 2.0, < 3.2)
|
|
34
|
+
drb (2.2.3)
|
|
35
|
+
excon (1.6.0)
|
|
35
36
|
logger
|
|
36
|
-
faraday
|
|
37
|
-
|
|
38
|
-
|
|
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)
|
|
39
48
|
git (1.19.1)
|
|
40
49
|
addressable (~> 2.8)
|
|
41
50
|
rchardet (~> 1.8)
|
|
42
51
|
hamster (3.0.0)
|
|
43
52
|
concurrent-ruby (~> 1.0)
|
|
44
|
-
i18n (1.
|
|
53
|
+
i18n (1.15.2)
|
|
45
54
|
concurrent-ruby (~> 1.0)
|
|
46
|
-
immutable-struct (2.
|
|
47
|
-
json (2.
|
|
48
|
-
language_server-protocol (3.17.0.
|
|
55
|
+
immutable-struct (2.5.0)
|
|
56
|
+
json (2.10.2)
|
|
57
|
+
language_server-protocol (3.17.0.4)
|
|
49
58
|
lino (4.1.0)
|
|
50
59
|
childprocess (~> 5.0.0)
|
|
51
60
|
hamster (~> 3.0)
|
|
52
61
|
open4 (~> 1.3)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
net-http (0.
|
|
57
|
-
uri
|
|
58
|
-
octokit (
|
|
59
|
-
base64
|
|
62
|
+
lint_roller (1.1.0)
|
|
63
|
+
logger (1.7.0)
|
|
64
|
+
minitest (5.27.0)
|
|
65
|
+
net-http (0.9.1)
|
|
66
|
+
uri (>= 0.11.1)
|
|
67
|
+
octokit (10.0.0)
|
|
60
68
|
faraday (>= 1, < 3)
|
|
61
69
|
sawyer (~> 0.9)
|
|
62
70
|
open4 (1.3.4)
|
|
63
|
-
parallel (1.
|
|
64
|
-
parser (3.3.
|
|
71
|
+
parallel (1.27.0)
|
|
72
|
+
parser (3.3.8.0)
|
|
65
73
|
ast (~> 2.4.1)
|
|
66
74
|
racc
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
prism (1.4.0)
|
|
76
|
+
public_suffix (7.0.5)
|
|
77
|
+
racc (1.8.1)
|
|
69
78
|
rainbow (3.1.1)
|
|
70
|
-
rake (13.2
|
|
71
|
-
rake_circle_ci (0.11.0)
|
|
72
|
-
colored2 (~> 3.1)
|
|
73
|
-
excon (~> 0.72)
|
|
74
|
-
rake_factory (~> 0.23)
|
|
75
|
-
sshkey (~> 2.0)
|
|
79
|
+
rake (13.4.2)
|
|
76
80
|
rake_factory (0.33.0)
|
|
77
81
|
activesupport (>= 4)
|
|
78
82
|
rake (~> 13.0)
|
|
@@ -80,66 +84,71 @@ GEM
|
|
|
80
84
|
colored2 (~> 3.1)
|
|
81
85
|
git (~> 1.13, >= 1.13.2)
|
|
82
86
|
rake_factory (~> 0.33)
|
|
83
|
-
rake_git_crypt (0.
|
|
87
|
+
rake_git_crypt (0.4.0)
|
|
84
88
|
colored2 (~> 3.1)
|
|
89
|
+
lino (~> 4.1)
|
|
85
90
|
rake_factory (~> 0.33)
|
|
86
91
|
ruby_git_crypt (~> 0.1)
|
|
87
92
|
ruby_gpg2 (~> 0.12)
|
|
88
|
-
rake_github (0.
|
|
93
|
+
rake_github (0.17.0)
|
|
89
94
|
colored2 (~> 3.1)
|
|
90
|
-
octokit (>=
|
|
91
|
-
rake_factory (~> 0.
|
|
95
|
+
octokit (>= 7.0, < 11.0)
|
|
96
|
+
rake_factory (~> 0.33)
|
|
97
|
+
rbnacl (~> 7.1)
|
|
92
98
|
sshkey (~> 2.0)
|
|
93
99
|
rake_gpg (0.20.0)
|
|
94
100
|
rake_factory (~> 0.33)
|
|
95
101
|
ruby_gpg2 (~> 0.12)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
rake_factory (~> 0.
|
|
99
|
-
|
|
102
|
+
rake_slack (0.3.0)
|
|
103
|
+
excon (>= 0.72, < 2.0)
|
|
104
|
+
rake_factory (~> 0.33)
|
|
105
|
+
rbnacl (7.1.2)
|
|
106
|
+
ffi (~> 1)
|
|
100
107
|
rchardet (1.8.0)
|
|
101
|
-
regexp_parser (2.
|
|
102
|
-
|
|
103
|
-
strscan
|
|
104
|
-
rspec (3.13.0)
|
|
108
|
+
regexp_parser (2.10.0)
|
|
109
|
+
rspec (3.13.1)
|
|
105
110
|
rspec-core (~> 3.13.0)
|
|
106
111
|
rspec-expectations (~> 3.13.0)
|
|
107
112
|
rspec-mocks (~> 3.13.0)
|
|
108
|
-
rspec-core (3.13.
|
|
113
|
+
rspec-core (3.13.4)
|
|
109
114
|
rspec-support (~> 3.13.0)
|
|
110
|
-
rspec-expectations (3.13.
|
|
115
|
+
rspec-expectations (3.13.5)
|
|
111
116
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
112
117
|
rspec-support (~> 3.13.0)
|
|
113
|
-
rspec-mocks (3.13.
|
|
118
|
+
rspec-mocks (3.13.5)
|
|
114
119
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
115
120
|
rspec-support (~> 3.13.0)
|
|
116
|
-
rspec-support (3.13.
|
|
117
|
-
rubocop (1.
|
|
121
|
+
rspec-support (3.13.4)
|
|
122
|
+
rubocop (1.72.2)
|
|
118
123
|
json (~> 2.3)
|
|
119
|
-
language_server-protocol (
|
|
124
|
+
language_server-protocol (~> 3.17.0.2)
|
|
125
|
+
lint_roller (~> 1.1.0)
|
|
120
126
|
parallel (~> 1.10)
|
|
121
127
|
parser (>= 3.3.0.2)
|
|
122
128
|
rainbow (>= 2.2.2, < 4.0)
|
|
123
|
-
regexp_parser (>= 2.
|
|
124
|
-
|
|
125
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
129
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
130
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
126
131
|
ruby-progressbar (~> 1.7)
|
|
127
|
-
unicode-display_width (>= 2.4.0, <
|
|
128
|
-
rubocop-ast (1.
|
|
129
|
-
parser (>= 3.3.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
rubocop (
|
|
132
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
133
|
+
rubocop-ast (1.44.1)
|
|
134
|
+
parser (>= 3.3.7.2)
|
|
135
|
+
prism (~> 1.4)
|
|
136
|
+
rubocop-rake (0.7.1)
|
|
137
|
+
lint_roller (~> 1.1)
|
|
138
|
+
rubocop (>= 1.72.1)
|
|
139
|
+
rubocop-rspec (3.6.0)
|
|
140
|
+
lint_roller (~> 1.1)
|
|
141
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
134
142
|
ruby-progressbar (1.13.0)
|
|
135
143
|
ruby_git_crypt (0.1.0)
|
|
136
144
|
immutable-struct (~> 2.4)
|
|
137
145
|
lino (>= 4.1)
|
|
138
146
|
ruby_gpg2 (0.12.0)
|
|
139
147
|
lino (>= 4.1)
|
|
140
|
-
sawyer (0.9.
|
|
148
|
+
sawyer (0.9.3)
|
|
141
149
|
addressable (>= 2.3.5)
|
|
142
150
|
faraday (>= 0.17.3, < 3)
|
|
151
|
+
securerandom (0.4.1)
|
|
143
152
|
simplecov (0.22.0)
|
|
144
153
|
docile (~> 1.1)
|
|
145
154
|
simplecov-html (~> 0.11)
|
|
@@ -147,11 +156,12 @@ GEM
|
|
|
147
156
|
simplecov-html (0.12.3)
|
|
148
157
|
simplecov_json_formatter (0.1.4)
|
|
149
158
|
sshkey (2.0.0)
|
|
150
|
-
strscan (3.1.0)
|
|
151
159
|
tzinfo (2.0.6)
|
|
152
160
|
concurrent-ruby (~> 1.0)
|
|
153
|
-
unicode-display_width (
|
|
154
|
-
|
|
161
|
+
unicode-display_width (3.1.4)
|
|
162
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
163
|
+
unicode-emoji (4.0.4)
|
|
164
|
+
uri (1.1.1)
|
|
155
165
|
|
|
156
166
|
PLATFORMS
|
|
157
167
|
arm64-darwin-21
|
|
@@ -166,12 +176,11 @@ DEPENDENCIES
|
|
|
166
176
|
bundler
|
|
167
177
|
gem-release
|
|
168
178
|
rake
|
|
169
|
-
rake_circle_ci
|
|
170
179
|
rake_git
|
|
171
180
|
rake_git_crypt
|
|
172
181
|
rake_github
|
|
173
182
|
rake_gpg
|
|
174
|
-
|
|
183
|
+
rake_slack
|
|
175
184
|
rspec
|
|
176
185
|
rubocop
|
|
177
186
|
rubocop-rake
|
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_easy_rsa.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_easy_rsa'
|
|
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_easy_rsa'
|
|
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_easy_rsa/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_easy_rsa-#{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_easy_rsa.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/ruby_easy_rsa.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_easy_rsa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.14.0.pre.
|
|
4
|
+
version: 0.14.0.pre.3
|
|
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
|
- - ">="
|
|
@@ -274,7 +260,7 @@ licenses:
|
|
|
274
260
|
- MIT
|
|
275
261
|
metadata:
|
|
276
262
|
rubygems_mfa_required: 'false'
|
|
277
|
-
post_install_message:
|
|
263
|
+
post_install_message:
|
|
278
264
|
rdoc_options: []
|
|
279
265
|
require_paths:
|
|
280
266
|
- lib
|
|
@@ -282,15 +268,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
282
268
|
requirements:
|
|
283
269
|
- - ">="
|
|
284
270
|
- !ruby/object:Gem::Version
|
|
285
|
-
version: '3.
|
|
271
|
+
version: '3.3'
|
|
286
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
273
|
requirements:
|
|
288
|
-
- - "
|
|
274
|
+
- - ">="
|
|
289
275
|
- !ruby/object:Gem::Version
|
|
290
|
-
version:
|
|
276
|
+
version: '0'
|
|
291
277
|
requirements: []
|
|
292
|
-
rubygems_version: 3.
|
|
293
|
-
signing_key:
|
|
278
|
+
rubygems_version: 3.5.22
|
|
279
|
+
signing_key:
|
|
294
280
|
specification_version: 4
|
|
295
281
|
summary: A simple Ruby wrapper for invoking EasyRSA commands.
|
|
296
282
|
test_files: []
|