ruby_zprint 0.1.0.pre.4 → 0.1.0.pre.4.pr79.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.lock +93 -91
- data/README.md +4 -4
- data/Rakefile +111 -48
- data/lib/ruby_zprint/version.rb +1 -1
- data/ruby_zprint.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: 1420f0049655faab8230cbb4e6037ceb6887864c26ed48e04a7f3602457d9a15
|
|
4
|
+
data.tar.gz: 91833a7f20cb85d0a856c40f7c9bff8571ea86dd370e1409997f3df7a1a01719
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3973084d05960a0c76dd314dec9c56a097eefdcf4d76b92a0ae90f83b37f9b019e4580214e41a00d40d8f39e425f266e2499903db8cd1c34270281a8f8722328
|
|
7
|
+
data.tar.gz: 142d2f8d55af96dfc82e0b9aa1fe1f862ccc34a1d666b2b0b1b797a3b00ba80e5a4abf152ed8032fd5122156dd3699f32cbac079ce8a70780e5b55e74c5ebf9e
|
data/Gemfile.lock
CHANGED
|
@@ -1,60 +1,65 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ruby_zprint (0.1.0.pre.4)
|
|
4
|
+
ruby_zprint (0.1.0.pre.4.pr79.1.1)
|
|
5
5
|
immutable-struct (~> 2.4)
|
|
6
6
|
lino (>= 3, < 5)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (
|
|
11
|
+
activesupport (8.1.3)
|
|
12
12
|
base64
|
|
13
13
|
bigdecimal
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
15
|
connection_pool (>= 2.2.5)
|
|
16
16
|
drb
|
|
17
17
|
i18n (>= 1.6, < 2)
|
|
18
|
+
json
|
|
19
|
+
logger (>= 1.4.2)
|
|
18
20
|
minitest (>= 5.1)
|
|
19
|
-
|
|
20
|
-
tzinfo (~> 2.0)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
securerandom (>= 0.3)
|
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
+
uri (>= 0.13.1)
|
|
24
|
+
addressable (2.9.0)
|
|
25
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
26
|
+
ast (2.4.3)
|
|
27
|
+
base64 (0.3.0)
|
|
28
|
+
bigdecimal (4.1.2)
|
|
26
29
|
childprocess (5.0.0)
|
|
27
30
|
coderay (1.1.3)
|
|
28
31
|
colored2 (3.1.2)
|
|
29
|
-
concurrent-ruby (1.3.
|
|
30
|
-
connection_pool (
|
|
31
|
-
diff-lcs (1.
|
|
32
|
+
concurrent-ruby (1.3.8)
|
|
33
|
+
connection_pool (3.0.2)
|
|
34
|
+
diff-lcs (1.6.2)
|
|
32
35
|
docile (1.4.0)
|
|
33
|
-
drb (2.2.
|
|
34
|
-
excon (
|
|
35
|
-
|
|
36
|
+
drb (2.2.3)
|
|
37
|
+
excon (1.6.0)
|
|
38
|
+
logger
|
|
39
|
+
faker (3.5.1)
|
|
36
40
|
i18n (>= 1.8.11, < 2)
|
|
37
|
-
faraday (2.
|
|
38
|
-
faraday-net_http (>= 2.0, < 3.
|
|
41
|
+
faraday (2.14.3)
|
|
42
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
43
|
+
json
|
|
39
44
|
logger
|
|
40
|
-
faraday-net_http (3.
|
|
41
|
-
net-http
|
|
42
|
-
ffi (1.17.
|
|
43
|
-
ffi (1.17.
|
|
44
|
-
ffi (1.17.
|
|
45
|
-
ffi (1.17.0-x86_64-darwin)
|
|
46
|
-
ffi (1.17.0-x86_64-linux-gnu)
|
|
45
|
+
faraday-net_http (3.4.4)
|
|
46
|
+
net-http (~> 0.5)
|
|
47
|
+
ffi (1.17.1)
|
|
48
|
+
ffi (1.17.1-aarch64-linux)
|
|
49
|
+
ffi (1.17.1-x86_64-linux)
|
|
47
50
|
formatador (1.1.0)
|
|
48
|
-
gem-release (2.2.
|
|
51
|
+
gem-release (2.2.4)
|
|
49
52
|
git (1.19.1)
|
|
50
53
|
addressable (~> 2.8)
|
|
51
54
|
rchardet (~> 1.8)
|
|
52
|
-
guard (2.
|
|
55
|
+
guard (2.19.1)
|
|
53
56
|
formatador (>= 0.2.4)
|
|
54
57
|
listen (>= 2.7, < 4.0)
|
|
58
|
+
logger (~> 1.6)
|
|
55
59
|
lumberjack (>= 1.0.12, < 2.0)
|
|
56
60
|
nenv (~> 0.1)
|
|
57
61
|
notiffany (~> 0.0)
|
|
62
|
+
ostruct (~> 0.6)
|
|
58
63
|
pry (>= 0.13.0)
|
|
59
64
|
shellany (~> 0.0)
|
|
60
65
|
thor (>= 0.18.1)
|
|
@@ -65,50 +70,48 @@ GEM
|
|
|
65
70
|
rspec (>= 2.99.0, < 4.0)
|
|
66
71
|
hamster (3.0.0)
|
|
67
72
|
concurrent-ruby (~> 1.0)
|
|
68
|
-
i18n (1.
|
|
73
|
+
i18n (1.15.2)
|
|
69
74
|
concurrent-ruby (~> 1.0)
|
|
70
|
-
immutable-struct (2.
|
|
71
|
-
json (2.
|
|
72
|
-
language_server-protocol (3.17.0.
|
|
75
|
+
immutable-struct (2.5.0)
|
|
76
|
+
json (2.12.2)
|
|
77
|
+
language_server-protocol (3.17.0.5)
|
|
73
78
|
lino (4.1.0)
|
|
74
79
|
childprocess (~> 5.0.0)
|
|
75
80
|
hamster (~> 3.0)
|
|
76
81
|
open4 (~> 1.3)
|
|
82
|
+
lint_roller (1.1.0)
|
|
77
83
|
listen (3.9.0)
|
|
78
84
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
79
85
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
80
|
-
logger (1.
|
|
86
|
+
logger (1.7.0)
|
|
81
87
|
lumberjack (1.2.10)
|
|
82
88
|
method_source (1.1.0)
|
|
83
|
-
minitest (
|
|
84
|
-
|
|
89
|
+
minitest (6.0.6)
|
|
90
|
+
drb (~> 2.0)
|
|
91
|
+
prism (~> 1.5)
|
|
85
92
|
nenv (0.3.0)
|
|
86
|
-
net-http (0.
|
|
87
|
-
uri
|
|
93
|
+
net-http (0.9.1)
|
|
94
|
+
uri (>= 0.11.1)
|
|
88
95
|
notiffany (0.1.3)
|
|
89
96
|
nenv (~> 0.1)
|
|
90
97
|
shellany (~> 0.0)
|
|
91
|
-
octokit (
|
|
92
|
-
base64
|
|
98
|
+
octokit (10.0.0)
|
|
93
99
|
faraday (>= 1, < 3)
|
|
94
100
|
sawyer (~> 0.9)
|
|
95
101
|
open4 (1.3.4)
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
ostruct (0.6.1)
|
|
103
|
+
parallel (1.27.0)
|
|
104
|
+
parser (3.3.8.0)
|
|
98
105
|
ast (~> 2.4.1)
|
|
99
106
|
racc
|
|
100
|
-
|
|
107
|
+
prism (1.9.0)
|
|
108
|
+
pry (0.15.2)
|
|
101
109
|
coderay (~> 1.1)
|
|
102
110
|
method_source (~> 1.0)
|
|
103
|
-
public_suffix (
|
|
104
|
-
racc (1.8.
|
|
111
|
+
public_suffix (7.0.5)
|
|
112
|
+
racc (1.8.1)
|
|
105
113
|
rainbow (3.1.1)
|
|
106
|
-
rake (13.2
|
|
107
|
-
rake_circle_ci (0.13.0)
|
|
108
|
-
colored2 (~> 3.1)
|
|
109
|
-
excon (~> 0.72)
|
|
110
|
-
rake_factory (~> 0.33)
|
|
111
|
-
sshkey (~> 2.0)
|
|
114
|
+
rake (13.4.2)
|
|
112
115
|
rake_factory (0.33.0)
|
|
113
116
|
activesupport (>= 4)
|
|
114
117
|
rake (~> 13.0)
|
|
@@ -116,69 +119,74 @@ GEM
|
|
|
116
119
|
colored2 (~> 3.1)
|
|
117
120
|
git (~> 1.13, >= 1.13.2)
|
|
118
121
|
rake_factory (~> 0.33)
|
|
119
|
-
rake_git_crypt (0.
|
|
122
|
+
rake_git_crypt (0.4.0)
|
|
120
123
|
colored2 (~> 3.1)
|
|
124
|
+
lino (~> 4.1)
|
|
121
125
|
rake_factory (~> 0.33)
|
|
122
126
|
ruby_git_crypt (~> 0.1)
|
|
123
127
|
ruby_gpg2 (~> 0.12)
|
|
124
|
-
rake_github (0.
|
|
128
|
+
rake_github (0.17.0)
|
|
125
129
|
colored2 (~> 3.1)
|
|
126
|
-
octokit (>=
|
|
130
|
+
octokit (>= 7.0, < 11.0)
|
|
127
131
|
rake_factory (~> 0.33)
|
|
132
|
+
rbnacl (~> 7.1)
|
|
128
133
|
sshkey (~> 2.0)
|
|
129
134
|
rake_gpg (0.20.0)
|
|
130
135
|
rake_factory (~> 0.33)
|
|
131
136
|
ruby_gpg2 (~> 0.12)
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
rake_slack (0.3.0)
|
|
138
|
+
excon (>= 0.72, < 2.0)
|
|
134
139
|
rake_factory (~> 0.33)
|
|
135
|
-
sshkey (~> 2.0)
|
|
136
140
|
rb-fsevent (0.11.2)
|
|
137
141
|
rb-inotify (0.11.1)
|
|
138
142
|
ffi (~> 1.0)
|
|
143
|
+
rbnacl (7.1.2)
|
|
144
|
+
ffi (~> 1)
|
|
139
145
|
rchardet (1.8.0)
|
|
140
|
-
regexp_parser (2.
|
|
141
|
-
|
|
142
|
-
strscan
|
|
143
|
-
rspec (3.13.0)
|
|
146
|
+
regexp_parser (2.10.0)
|
|
147
|
+
rspec (3.13.1)
|
|
144
148
|
rspec-core (~> 3.13.0)
|
|
145
149
|
rspec-expectations (~> 3.13.0)
|
|
146
150
|
rspec-mocks (~> 3.13.0)
|
|
147
|
-
rspec-core (3.13.
|
|
151
|
+
rspec-core (3.13.4)
|
|
148
152
|
rspec-support (~> 3.13.0)
|
|
149
|
-
rspec-expectations (3.13.
|
|
153
|
+
rspec-expectations (3.13.5)
|
|
150
154
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
151
155
|
rspec-support (~> 3.13.0)
|
|
152
|
-
rspec-mocks (3.13.
|
|
156
|
+
rspec-mocks (3.13.5)
|
|
153
157
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
154
158
|
rspec-support (~> 3.13.0)
|
|
155
|
-
rspec-support (3.13.
|
|
156
|
-
rubocop (1.
|
|
159
|
+
rspec-support (3.13.4)
|
|
160
|
+
rubocop (1.75.8)
|
|
157
161
|
json (~> 2.3)
|
|
158
|
-
language_server-protocol (
|
|
162
|
+
language_server-protocol (~> 3.17.0.2)
|
|
163
|
+
lint_roller (~> 1.1.0)
|
|
159
164
|
parallel (~> 1.10)
|
|
160
165
|
parser (>= 3.3.0.2)
|
|
161
166
|
rainbow (>= 2.2.2, < 4.0)
|
|
162
|
-
regexp_parser (>= 2.
|
|
163
|
-
|
|
164
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
167
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
168
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
165
169
|
ruby-progressbar (~> 1.7)
|
|
166
|
-
unicode-display_width (>= 2.4.0, <
|
|
167
|
-
rubocop-ast (1.
|
|
168
|
-
parser (>= 3.3.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
rubocop (
|
|
170
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
171
|
+
rubocop-ast (1.44.1)
|
|
172
|
+
parser (>= 3.3.7.2)
|
|
173
|
+
prism (~> 1.4)
|
|
174
|
+
rubocop-rake (0.7.1)
|
|
175
|
+
lint_roller (~> 1.1)
|
|
176
|
+
rubocop (>= 1.72.1)
|
|
177
|
+
rubocop-rspec (3.6.0)
|
|
178
|
+
lint_roller (~> 1.1)
|
|
179
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
173
180
|
ruby-progressbar (1.13.0)
|
|
174
181
|
ruby_git_crypt (0.1.0)
|
|
175
182
|
immutable-struct (~> 2.4)
|
|
176
183
|
lino (>= 4.1)
|
|
177
184
|
ruby_gpg2 (0.12.0)
|
|
178
185
|
lino (>= 4.1)
|
|
179
|
-
sawyer (0.9.
|
|
186
|
+
sawyer (0.9.3)
|
|
180
187
|
addressable (>= 2.3.5)
|
|
181
188
|
faraday (>= 0.17.3, < 3)
|
|
189
|
+
securerandom (0.4.1)
|
|
182
190
|
shellany (0.0.1)
|
|
183
191
|
simplecov (0.22.0)
|
|
184
192
|
docile (~> 1.1)
|
|
@@ -187,24 +195,19 @@ GEM
|
|
|
187
195
|
simplecov-html (0.12.3)
|
|
188
196
|
simplecov_json_formatter (0.1.4)
|
|
189
197
|
sshkey (2.0.0)
|
|
190
|
-
strscan (3.1.0)
|
|
191
198
|
terminal-notifier-guard (1.7.0)
|
|
192
|
-
thor (1.3.
|
|
199
|
+
thor (1.3.2)
|
|
193
200
|
tzinfo (2.0.6)
|
|
194
201
|
concurrent-ruby (~> 1.0)
|
|
195
|
-
unicode-display_width (
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
unicode-display_width (3.1.4)
|
|
203
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
204
|
+
unicode-emoji (4.0.4)
|
|
205
|
+
uri (1.1.1)
|
|
206
|
+
yard (0.9.37)
|
|
198
207
|
|
|
199
208
|
PLATFORMS
|
|
200
209
|
aarch64-linux
|
|
201
|
-
|
|
202
|
-
arm64-darwin-22
|
|
203
|
-
arm64-darwin-23
|
|
204
|
-
arm64-linux
|
|
205
|
-
x86_64-darwin-19
|
|
206
|
-
x86_64-darwin-20
|
|
207
|
-
x86_64-darwin-21
|
|
210
|
+
ruby
|
|
208
211
|
x86_64-linux
|
|
209
212
|
|
|
210
213
|
DEPENDENCIES
|
|
@@ -214,12 +217,11 @@ DEPENDENCIES
|
|
|
214
217
|
guard
|
|
215
218
|
guard-rspec
|
|
216
219
|
rake
|
|
217
|
-
rake_circle_ci
|
|
218
220
|
rake_git
|
|
219
221
|
rake_git_crypt
|
|
220
222
|
rake_github
|
|
221
223
|
rake_gpg
|
|
222
|
-
|
|
224
|
+
rake_slack
|
|
223
225
|
rspec
|
|
224
226
|
rubocop
|
|
225
227
|
rubocop-rake
|
|
@@ -230,4 +232,4 @@ DEPENDENCIES
|
|
|
230
232
|
yard
|
|
231
233
|
|
|
232
234
|
BUNDLED WITH
|
|
233
|
-
|
|
235
|
+
4.0.16
|
data/README.md
CHANGED
|
@@ -63,16 +63,16 @@ To check for code linting / formatting issues without fixing:
|
|
|
63
63
|
You can also run `bin/console` for an interactive prompt that will allow you to
|
|
64
64
|
experiment.
|
|
65
65
|
|
|
66
|
-
### Managing
|
|
66
|
+
### Managing CI keys
|
|
67
67
|
|
|
68
|
-
To encrypt a GPG key for use by
|
|
68
|
+
To encrypt a GPG key for use by CI:
|
|
69
69
|
|
|
70
70
|
```shell
|
|
71
71
|
openssl aes-256-cbc \
|
|
72
72
|
-e \
|
|
73
73
|
-md sha1 \
|
|
74
74
|
-in ./config/secrets/ci/gpg.private \
|
|
75
|
-
-out ./.
|
|
75
|
+
-out ./.github/gpg.private.enc \
|
|
76
76
|
-k "<passphrase>"
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -82,7 +82,7 @@ To check decryption is working correctly:
|
|
|
82
82
|
openssl aes-256-cbc \
|
|
83
83
|
-d \
|
|
84
84
|
-md sha1 \
|
|
85
|
-
-in ./.
|
|
85
|
+
-in ./.github/gpg.private.enc \
|
|
86
86
|
-k "<passphrase>"
|
|
87
87
|
```
|
|
88
88
|
|
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
|
require 'yard'
|
|
14
12
|
|
|
15
13
|
task default: %i[
|
|
@@ -60,13 +58,6 @@ namespace :encryption do
|
|
|
60
58
|
end
|
|
61
59
|
|
|
62
60
|
namespace :keys do
|
|
63
|
-
namespace :deploy do
|
|
64
|
-
RakeSSH.define_key_tasks(
|
|
65
|
-
path: 'config/secrets/ci/',
|
|
66
|
-
comment: 'maintainers@infrablocks.io'
|
|
67
|
-
)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
61
|
namespace :gpg do
|
|
71
62
|
RakeGPG.define_generate_key_task(
|
|
72
63
|
output_directory: 'config/secrets/ci',
|
|
@@ -92,7 +83,6 @@ namespace :secrets do
|
|
|
92
83
|
desc 'Generate all generatable secrets.'
|
|
93
84
|
task generate: %w[
|
|
94
85
|
encryption:passphrase:generate
|
|
95
|
-
keys:deploy:generate
|
|
96
86
|
keys:gpg:generate
|
|
97
87
|
]
|
|
98
88
|
|
|
@@ -121,6 +111,11 @@ namespace :library do
|
|
|
121
111
|
|
|
122
112
|
desc 'Attempt to automatically fix issues with the library'
|
|
123
113
|
task fix: [:'rubocop:autocorrect_all']
|
|
114
|
+
|
|
115
|
+
desc 'Build the library'
|
|
116
|
+
task :build do
|
|
117
|
+
sh 'gem build ruby_zprint.gemspec'
|
|
118
|
+
end
|
|
124
119
|
end
|
|
125
120
|
|
|
126
121
|
namespace :documentation do
|
|
@@ -146,51 +141,87 @@ namespace :test do
|
|
|
146
141
|
RSpec::Core::RakeTask.new(:unit)
|
|
147
142
|
end
|
|
148
143
|
|
|
149
|
-
|
|
150
|
-
namespace: :circle_ci,
|
|
151
|
-
project_slug: 'github/infrablocks/ruby_zprint'
|
|
152
|
-
) do |t|
|
|
153
|
-
circle_ci_config =
|
|
154
|
-
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
|
155
|
-
|
|
156
|
-
t.api_token = circle_ci_config['circle_ci_api_token']
|
|
157
|
-
t.environment_variables = {
|
|
158
|
-
ENCRYPTION_PASSPHRASE:
|
|
159
|
-
File.read('config/secrets/ci/encryption.passphrase')
|
|
160
|
-
.chomp
|
|
161
|
-
}
|
|
162
|
-
t.checkout_keys = []
|
|
163
|
-
t.ssh_keys = [
|
|
164
|
-
{
|
|
165
|
-
hostname: 'github.com',
|
|
166
|
-
private_key: File.read('config/secrets/ci/ssh.private')
|
|
167
|
-
}
|
|
168
|
-
]
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
RakeGithub.define_repository_tasks(
|
|
144
|
+
RakeGithub.define_repository_tasks( # rubocop:disable Metrics/BlockLength
|
|
172
145
|
namespace: :github,
|
|
173
146
|
repository: 'infrablocks/ruby_zprint'
|
|
174
147
|
) do |t|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
148
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
149
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
150
|
+
# otherwise surface later as an opaque Octokit 401. An empty or
|
|
151
|
+
# whitespace-only GITHUB_TOKEN is treated as absent so an authenticated
|
|
152
|
+
# operator falls through to `gh auth token` rather than hitting the raise.
|
|
153
|
+
github_token = ENV['GITHUB_TOKEN'].to_s.strip
|
|
154
|
+
if github_token.empty?
|
|
155
|
+
github_token = begin
|
|
156
|
+
`gh auth token`
|
|
157
|
+
rescue Errno::ENOENT
|
|
158
|
+
''
|
|
159
|
+
end.strip
|
|
160
|
+
end
|
|
161
|
+
if github_token.empty?
|
|
162
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
t.access_token = github_token
|
|
166
|
+
|
|
167
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
168
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
169
|
+
# same-repo human PRs. Guard against a locked clone: without
|
|
170
|
+
# it, File.read returns git-crypt ciphertext and github:secrets:ensure
|
|
171
|
+
# silently uploads garbage that only surfaces much later as an opaque
|
|
172
|
+
# GPG unlock failure in the release job.
|
|
173
|
+
passphrase_path = 'config/secrets/ci/encryption.passphrase'
|
|
174
|
+
unless File.exist?(passphrase_path)
|
|
175
|
+
raise "Passphrase file not found: #{passphrase_path} — expected a " \
|
|
176
|
+
'git-crypt-unlocked clone with the CI secrets present'
|
|
177
|
+
end
|
|
178
|
+
passphrase = File.binread(passphrase_path)
|
|
179
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
180
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the ' \
|
|
181
|
+
'clone before provisioning'
|
|
182
|
+
end
|
|
183
|
+
t.secrets = [
|
|
184
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
184
185
|
]
|
|
186
|
+
t.environments = [
|
|
187
|
+
{ name: 'release',
|
|
188
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
189
|
+
]
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
namespace :slack do
|
|
193
|
+
RakeSlack.define_notification_tasks do |t|
|
|
194
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
195
|
+
t.routing_rules = [
|
|
196
|
+
{ when: { type: 'on_hold' },
|
|
197
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
198
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
199
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
200
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
201
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
202
|
+
{ when: { outcome: 'success' },
|
|
203
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
204
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
205
|
+
# out of a popular channel while this pipeline beds in.
|
|
206
|
+
{ when: {},
|
|
207
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
208
|
+
]
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
namespace :repository do
|
|
213
|
+
desc 'Set the git author for CI'
|
|
214
|
+
task :set_ci_author do
|
|
215
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
216
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
217
|
+
end
|
|
185
218
|
end
|
|
186
219
|
|
|
187
220
|
namespace :pipeline do
|
|
188
|
-
desc 'Prepare
|
|
221
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
189
222
|
task prepare: %i[
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
circle_ci:ssh_keys:ensure
|
|
193
|
-
github:deploy_keys:ensure
|
|
223
|
+
github:secrets:ensure
|
|
224
|
+
github:environments:ensure
|
|
194
225
|
]
|
|
195
226
|
end
|
|
196
227
|
|
|
@@ -201,6 +232,38 @@ namespace :version do
|
|
|
201
232
|
end
|
|
202
233
|
end
|
|
203
234
|
|
|
235
|
+
namespace :prerelease do
|
|
236
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
237
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
238
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
239
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
240
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
version_file = 'lib/ruby_zprint/version.rb'
|
|
244
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
245
|
+
source = File.read(version_file)
|
|
246
|
+
base = source[version_pattern, 2]
|
|
247
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
248
|
+
|
|
249
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
250
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
251
|
+
gem_file = "ruby_zprint-#{version}.gem"
|
|
252
|
+
begin
|
|
253
|
+
File.write(version_file,
|
|
254
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
255
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
256
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
257
|
+
# (contrast the `release` task).
|
|
258
|
+
sh 'gem build ruby_zprint.gemspec'
|
|
259
|
+
sh "gem push #{gem_file}"
|
|
260
|
+
ensure
|
|
261
|
+
File.write(version_file, source)
|
|
262
|
+
rm_f gem_file
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
204
267
|
desc 'Release gem'
|
|
205
268
|
task :release do
|
|
206
269
|
sh 'gem release --tag --push'
|
data/lib/ruby_zprint/version.rb
CHANGED
data/ruby_zprint.gemspec
CHANGED
|
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
37
37
|
spec.require_paths = ['lib']
|
|
38
38
|
|
|
39
|
-
spec.required_ruby_version = '>= 3.
|
|
39
|
+
spec.required_ruby_version = '>= 3.3'
|
|
40
40
|
|
|
41
41
|
spec.add_dependency 'immutable-struct', '~> 2.4'
|
|
42
42
|
spec.add_dependency 'lino', '>= 3', '< 5'
|
|
@@ -47,12 +47,11 @@ Gem::Specification.new do |spec|
|
|
|
47
47
|
spec.add_development_dependency 'guard'
|
|
48
48
|
spec.add_development_dependency 'guard-rspec'
|
|
49
49
|
spec.add_development_dependency 'rake'
|
|
50
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
51
50
|
spec.add_development_dependency 'rake_git'
|
|
52
51
|
spec.add_development_dependency 'rake_git_crypt'
|
|
53
52
|
spec.add_development_dependency 'rake_github'
|
|
54
53
|
spec.add_development_dependency 'rake_gpg'
|
|
55
|
-
spec.add_development_dependency '
|
|
54
|
+
spec.add_development_dependency 'rake_slack'
|
|
56
55
|
spec.add_development_dependency 'rspec'
|
|
57
56
|
spec.add_development_dependency 'rubocop'
|
|
58
57
|
spec.add_development_dependency 'rubocop-rake'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_zprint
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.0.pre.4
|
|
4
|
+
version: 0.1.0.pre.4.pr79.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-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: immutable-struct
|
|
@@ -128,20 +128,6 @@ dependencies:
|
|
|
128
128
|
- - ">="
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
130
|
version: '0'
|
|
131
|
-
- !ruby/object:Gem::Dependency
|
|
132
|
-
name: rake_circle_ci
|
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
|
134
|
-
requirements:
|
|
135
|
-
- - ">="
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: '0'
|
|
138
|
-
type: :development
|
|
139
|
-
prerelease: false
|
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
141
|
-
requirements:
|
|
142
|
-
- - ">="
|
|
143
|
-
- !ruby/object:Gem::Version
|
|
144
|
-
version: '0'
|
|
145
131
|
- !ruby/object:Gem::Dependency
|
|
146
132
|
name: rake_git
|
|
147
133
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -199,7 +185,7 @@ dependencies:
|
|
|
199
185
|
- !ruby/object:Gem::Version
|
|
200
186
|
version: '0'
|
|
201
187
|
- !ruby/object:Gem::Dependency
|
|
202
|
-
name:
|
|
188
|
+
name: rake_slack
|
|
203
189
|
requirement: !ruby/object:Gem::Requirement
|
|
204
190
|
requirements:
|
|
205
191
|
- - ">="
|
|
@@ -334,7 +320,7 @@ licenses:
|
|
|
334
320
|
- MIT
|
|
335
321
|
metadata:
|
|
336
322
|
rubygems_mfa_required: 'false'
|
|
337
|
-
post_install_message:
|
|
323
|
+
post_install_message:
|
|
338
324
|
rdoc_options: []
|
|
339
325
|
require_paths:
|
|
340
326
|
- lib
|
|
@@ -342,15 +328,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
342
328
|
requirements:
|
|
343
329
|
- - ">="
|
|
344
330
|
- !ruby/object:Gem::Version
|
|
345
|
-
version: '3.
|
|
331
|
+
version: '3.3'
|
|
346
332
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
333
|
requirements:
|
|
348
|
-
- - "
|
|
334
|
+
- - ">="
|
|
349
335
|
- !ruby/object:Gem::Version
|
|
350
|
-
version:
|
|
336
|
+
version: '0'
|
|
351
337
|
requirements: []
|
|
352
|
-
rubygems_version: 3.
|
|
353
|
-
signing_key:
|
|
338
|
+
rubygems_version: 3.5.22
|
|
339
|
+
signing_key:
|
|
354
340
|
specification_version: 4
|
|
355
341
|
summary: A simple Ruby wrapper for invoking zprint commands.
|
|
356
342
|
test_files: []
|