rspec-terraform 0.5.0.pre.9 → 0.5.0.pre.10
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 +73 -65
- data/README.md +4 -4
- data/Rakefile +101 -47
- data/lib/rspec/terraform/helpers/actions/output.rb +4 -7
- data/lib/rspec/terraform/version.rb +1 -1
- data/rspec-terraform.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: 3b9e8e378905a1c1321c9c3dd666aa691207ef2b8d7995a1d6b611411eab6d33
|
|
4
|
+
data.tar.gz: 9c03ccf1f7eff0dc296dea3164a2cba87c9d86242dbb15cd78e1ce1919423aaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98a2cc033dc507fb84164c2d3fb2ac473465b8b2481e1eee19088b3c97c8ba32be3d0859ecb0c4dbef2c658dbb3642fad345c1b6828329bd79407c4b8024dd51
|
|
7
|
+
data.tar.gz: ea2068f2041dcd3d2c2350eb7f3ea7e2320947a4947c62bcbfa590efcc5caa45c8a0a2e2e2dba0fa71c9da43e4180b1deeb9158445313b79a2bc4014a931d559
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rspec-terraform (0.5.0.pre.
|
|
4
|
+
rspec-terraform (0.5.0.pre.10)
|
|
5
5
|
confidante (>= 0.27)
|
|
6
6
|
rspec (>= 3.0)
|
|
7
7
|
ruby-terraform (= 1.8.0)
|
|
@@ -9,61 +9,71 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (
|
|
12
|
+
activesupport (8.1.3)
|
|
13
13
|
base64
|
|
14
14
|
bigdecimal
|
|
15
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
16
16
|
connection_pool (>= 2.2.5)
|
|
17
17
|
drb
|
|
18
18
|
i18n (>= 1.6, < 2)
|
|
19
|
+
json
|
|
20
|
+
logger (>= 1.4.2)
|
|
19
21
|
minitest (>= 5.1)
|
|
20
|
-
|
|
21
|
-
tzinfo (~> 2.0)
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
securerandom (>= 0.3)
|
|
23
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
24
|
+
uri (>= 0.13.1)
|
|
25
|
+
addressable (2.9.0)
|
|
26
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
24
27
|
ast (2.4.2)
|
|
25
28
|
aws-eventstream (1.3.0)
|
|
26
29
|
aws-sigv4 (1.9.0)
|
|
27
30
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
28
|
-
base64 (0.
|
|
29
|
-
bigdecimal (
|
|
31
|
+
base64 (0.3.0)
|
|
32
|
+
bigdecimal (4.1.2)
|
|
30
33
|
childprocess (5.0.0)
|
|
31
34
|
coderay (1.1.3)
|
|
32
35
|
colored2 (3.1.2)
|
|
33
|
-
concurrent-ruby (1.3.
|
|
36
|
+
concurrent-ruby (1.3.8)
|
|
34
37
|
confidante (0.28.0)
|
|
35
38
|
activesupport (>= 4)
|
|
36
39
|
hiera (~> 3.3)
|
|
37
40
|
shikashi (~> 0.6)
|
|
38
41
|
vault (~> 0.17)
|
|
39
|
-
connection_pool (
|
|
42
|
+
connection_pool (3.0.2)
|
|
40
43
|
diff-lcs (1.5.1)
|
|
41
44
|
docile (1.4.1)
|
|
42
|
-
drb (2.2.
|
|
45
|
+
drb (2.2.3)
|
|
43
46
|
evalhook (0.6.0)
|
|
44
47
|
partialruby (~> 0.3)
|
|
45
48
|
sexp_processor (~> 4.0)
|
|
46
|
-
excon (
|
|
47
|
-
|
|
49
|
+
excon (1.6.0)
|
|
50
|
+
logger
|
|
51
|
+
faker (3.5.1)
|
|
48
52
|
i18n (>= 1.8.11, < 2)
|
|
49
|
-
faraday (2.
|
|
50
|
-
faraday-net_http (>= 2.0, < 3.
|
|
53
|
+
faraday (2.14.3)
|
|
54
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
55
|
+
json
|
|
51
56
|
logger
|
|
52
|
-
faraday-net_http (3.
|
|
53
|
-
net-http
|
|
54
|
-
ffi (1.17.
|
|
57
|
+
faraday-net_http (3.4.4)
|
|
58
|
+
net-http (~> 0.5)
|
|
59
|
+
ffi (1.17.4)
|
|
60
|
+
ffi (1.17.4-arm64-darwin)
|
|
61
|
+
ffi (1.17.4-x86_64-darwin)
|
|
62
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
55
63
|
formatador (1.1.0)
|
|
56
|
-
gem-release (2.2.
|
|
64
|
+
gem-release (2.2.4)
|
|
57
65
|
getsource (0.2.2)
|
|
58
66
|
git (1.19.1)
|
|
59
67
|
addressable (~> 2.8)
|
|
60
68
|
rchardet (~> 1.8)
|
|
61
|
-
guard (2.
|
|
69
|
+
guard (2.19.1)
|
|
62
70
|
formatador (>= 0.2.4)
|
|
63
71
|
listen (>= 2.7, < 4.0)
|
|
72
|
+
logger (~> 1.6)
|
|
64
73
|
lumberjack (>= 1.0.12, < 2.0)
|
|
65
74
|
nenv (~> 0.1)
|
|
66
75
|
notiffany (~> 0.0)
|
|
76
|
+
ostruct (~> 0.6)
|
|
67
77
|
pry (>= 0.13.0)
|
|
68
78
|
shellany (~> 0.0)
|
|
69
79
|
thor (>= 0.18.1)
|
|
@@ -78,10 +88,10 @@ GEM
|
|
|
78
88
|
hamster (3.0.0)
|
|
79
89
|
concurrent-ruby (~> 1.0)
|
|
80
90
|
hiera (3.12.0)
|
|
81
|
-
i18n (1.
|
|
91
|
+
i18n (1.15.2)
|
|
82
92
|
concurrent-ruby (~> 1.0)
|
|
83
|
-
immutable-struct (2.
|
|
84
|
-
json (2.
|
|
93
|
+
immutable-struct (2.5.0)
|
|
94
|
+
json (2.9.1)
|
|
85
95
|
language_server-protocol (3.17.0.3)
|
|
86
96
|
lino (4.1.0)
|
|
87
97
|
childprocess (~> 5.0.0)
|
|
@@ -90,41 +100,38 @@ GEM
|
|
|
90
100
|
listen (3.9.0)
|
|
91
101
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
92
102
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
93
|
-
logger (1.
|
|
103
|
+
logger (1.7.0)
|
|
94
104
|
lumberjack (1.2.10)
|
|
95
105
|
method_source (1.1.0)
|
|
96
|
-
minitest (
|
|
97
|
-
|
|
106
|
+
minitest (6.0.6)
|
|
107
|
+
drb (~> 2.0)
|
|
108
|
+
prism (~> 1.5)
|
|
98
109
|
nenv (0.3.0)
|
|
99
|
-
net-http (0.
|
|
100
|
-
uri
|
|
110
|
+
net-http (0.9.1)
|
|
111
|
+
uri (>= 0.11.1)
|
|
101
112
|
notiffany (0.1.3)
|
|
102
113
|
nenv (~> 0.1)
|
|
103
114
|
shellany (~> 0.0)
|
|
104
|
-
octokit (
|
|
105
|
-
base64
|
|
115
|
+
octokit (10.0.0)
|
|
106
116
|
faraday (>= 1, < 3)
|
|
107
117
|
sawyer (~> 0.9)
|
|
108
118
|
open4 (1.3.4)
|
|
109
|
-
|
|
110
|
-
|
|
119
|
+
ostruct (0.6.1)
|
|
120
|
+
parallel (1.26.3)
|
|
121
|
+
parser (3.3.7.0)
|
|
111
122
|
ast (~> 2.4.1)
|
|
112
123
|
racc
|
|
113
124
|
partialruby (0.3.0)
|
|
114
125
|
ruby2ruby (~> 2)
|
|
115
126
|
ruby_parser (~> 3)
|
|
116
|
-
|
|
127
|
+
prism (1.9.0)
|
|
128
|
+
pry (0.15.2)
|
|
117
129
|
coderay (~> 1.1)
|
|
118
130
|
method_source (~> 1.0)
|
|
119
|
-
public_suffix (
|
|
120
|
-
racc (1.8.
|
|
131
|
+
public_suffix (7.0.5)
|
|
132
|
+
racc (1.8.1)
|
|
121
133
|
rainbow (3.1.1)
|
|
122
|
-
rake (13.2
|
|
123
|
-
rake_circle_ci (0.13.0)
|
|
124
|
-
colored2 (~> 3.1)
|
|
125
|
-
excon (~> 0.72)
|
|
126
|
-
rake_factory (~> 0.33)
|
|
127
|
-
sshkey (~> 2.0)
|
|
134
|
+
rake (13.4.2)
|
|
128
135
|
rake_factory (0.34.0.pre.2)
|
|
129
136
|
activesupport (>= 4)
|
|
130
137
|
rake (~> 13.0)
|
|
@@ -132,30 +139,31 @@ GEM
|
|
|
132
139
|
colored2 (~> 3.1)
|
|
133
140
|
git (~> 1.13, >= 1.13.2)
|
|
134
141
|
rake_factory (~> 0.33)
|
|
135
|
-
rake_git_crypt (0.
|
|
142
|
+
rake_git_crypt (0.5.0.pre.1)
|
|
136
143
|
colored2 (~> 3.1)
|
|
144
|
+
lino (~> 4.1)
|
|
137
145
|
rake_factory (~> 0.33)
|
|
138
146
|
ruby_git_crypt (~> 0.1)
|
|
139
147
|
ruby_gpg2 (~> 0.12)
|
|
140
|
-
rake_github (0.
|
|
148
|
+
rake_github (0.17.0)
|
|
141
149
|
colored2 (~> 3.1)
|
|
142
|
-
octokit (>=
|
|
150
|
+
octokit (>= 7.0, < 11.0)
|
|
143
151
|
rake_factory (~> 0.33)
|
|
152
|
+
rbnacl (~> 7.1)
|
|
144
153
|
sshkey (~> 2.0)
|
|
145
154
|
rake_gpg (0.20.0)
|
|
146
155
|
rake_factory (~> 0.33)
|
|
147
156
|
ruby_gpg2 (~> 0.12)
|
|
148
|
-
|
|
149
|
-
|
|
157
|
+
rake_slack (0.3.0)
|
|
158
|
+
excon (>= 0.72, < 2.0)
|
|
150
159
|
rake_factory (~> 0.33)
|
|
151
|
-
sshkey (~> 2.0)
|
|
152
160
|
rb-fsevent (0.11.2)
|
|
153
161
|
rb-inotify (0.11.1)
|
|
154
162
|
ffi (~> 1.0)
|
|
163
|
+
rbnacl (7.1.2)
|
|
164
|
+
ffi (~> 1)
|
|
155
165
|
rchardet (1.8.0)
|
|
156
|
-
regexp_parser (2.
|
|
157
|
-
rexml (3.3.2)
|
|
158
|
-
strscan
|
|
166
|
+
regexp_parser (2.10.0)
|
|
159
167
|
rspec (3.13.0)
|
|
160
168
|
rspec-core (~> 3.13.0)
|
|
161
169
|
rspec-expectations (~> 3.13.0)
|
|
@@ -169,22 +177,21 @@ GEM
|
|
|
169
177
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
170
178
|
rspec-support (~> 3.13.0)
|
|
171
179
|
rspec-support (3.13.1)
|
|
172
|
-
rubocop (1.
|
|
180
|
+
rubocop (1.69.1)
|
|
173
181
|
json (~> 2.3)
|
|
174
182
|
language_server-protocol (>= 3.17.0)
|
|
175
183
|
parallel (~> 1.10)
|
|
176
184
|
parser (>= 3.3.0.2)
|
|
177
185
|
rainbow (>= 2.2.2, < 4.0)
|
|
178
|
-
regexp_parser (>= 2.
|
|
179
|
-
|
|
180
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
186
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
187
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
|
181
188
|
ruby-progressbar (~> 1.7)
|
|
182
|
-
unicode-display_width (>= 2.4.0, <
|
|
183
|
-
rubocop-ast (1.
|
|
189
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
190
|
+
rubocop-ast (1.37.0)
|
|
184
191
|
parser (>= 3.3.1.0)
|
|
185
192
|
rubocop-rake (0.6.0)
|
|
186
193
|
rubocop (~> 1.0)
|
|
187
|
-
rubocop-rspec (3.0
|
|
194
|
+
rubocop-rspec (3.4.0)
|
|
188
195
|
rubocop (~> 1.61)
|
|
189
196
|
ruby-progressbar (1.13.0)
|
|
190
197
|
ruby-terraform (1.8.0)
|
|
@@ -201,9 +208,10 @@ GEM
|
|
|
201
208
|
ruby_parser (3.21.1)
|
|
202
209
|
racc (~> 1.5)
|
|
203
210
|
sexp_processor (~> 4.16)
|
|
204
|
-
sawyer (0.9.
|
|
211
|
+
sawyer (0.9.3)
|
|
205
212
|
addressable (>= 2.3.5)
|
|
206
213
|
faraday (>= 0.17.3, < 3)
|
|
214
|
+
securerandom (0.4.1)
|
|
207
215
|
sexp_processor (4.17.2)
|
|
208
216
|
shellany (0.0.1)
|
|
209
217
|
shikashi (0.6.0)
|
|
@@ -216,13 +224,14 @@ GEM
|
|
|
216
224
|
simplecov-html (0.12.3)
|
|
217
225
|
simplecov_json_formatter (0.1.4)
|
|
218
226
|
sshkey (2.0.0)
|
|
219
|
-
strscan (3.1.0)
|
|
220
227
|
terminal-notifier-guard (1.7.0)
|
|
221
|
-
thor (1.3.
|
|
228
|
+
thor (1.3.2)
|
|
222
229
|
tzinfo (2.0.6)
|
|
223
230
|
concurrent-ruby (~> 1.0)
|
|
224
|
-
unicode-display_width (
|
|
225
|
-
|
|
231
|
+
unicode-display_width (3.1.4)
|
|
232
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
233
|
+
unicode-emoji (4.0.4)
|
|
234
|
+
uri (1.1.1)
|
|
226
235
|
vault (0.18.2)
|
|
227
236
|
aws-sigv4
|
|
228
237
|
|
|
@@ -240,12 +249,11 @@ DEPENDENCIES
|
|
|
240
249
|
guard-rspec
|
|
241
250
|
guard-rubocop
|
|
242
251
|
rake
|
|
243
|
-
rake_circle_ci
|
|
244
252
|
rake_git
|
|
245
253
|
rake_git_crypt
|
|
246
254
|
rake_github
|
|
247
255
|
rake_gpg
|
|
248
|
-
|
|
256
|
+
rake_slack
|
|
249
257
|
rspec-terraform!
|
|
250
258
|
rubocop
|
|
251
259
|
rubocop-rake
|
data/README.md
CHANGED
|
@@ -187,16 +187,16 @@ To check for code linting / formatting issues without fixing:
|
|
|
187
187
|
You can also run `bin/console` for an interactive prompt that will allow you to
|
|
188
188
|
experiment.
|
|
189
189
|
|
|
190
|
-
### Managing
|
|
190
|
+
### Managing CI keys
|
|
191
191
|
|
|
192
|
-
To encrypt a GPG key for use by
|
|
192
|
+
To encrypt a GPG key for use by CI:
|
|
193
193
|
|
|
194
194
|
```bash
|
|
195
195
|
openssl aes-256-cbc \
|
|
196
196
|
-e \
|
|
197
197
|
-md sha1 \
|
|
198
198
|
-in ./config/secrets/ci/gpg.private \
|
|
199
|
-
-out ./.
|
|
199
|
+
-out ./.github/gpg.private.enc \
|
|
200
200
|
-k "<passphrase>"
|
|
201
201
|
```
|
|
202
202
|
|
|
@@ -206,7 +206,7 @@ To check decryption is working correctly:
|
|
|
206
206
|
openssl aes-256-cbc \
|
|
207
207
|
-d \
|
|
208
208
|
-md sha1 \
|
|
209
|
-
-in ./.
|
|
209
|
+
-in ./.github/gpg.private.enc \
|
|
210
210
|
-k "<passphrase>"
|
|
211
211
|
```
|
|
212
212
|
|
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 :secrets do
|
|
70
61
|
namespace :gpg do
|
|
71
62
|
RakeGPG.define_generate_key_task(
|
|
@@ -96,7 +87,6 @@ namespace :secrets do
|
|
|
96
87
|
desc 'Generate all generatable secrets.'
|
|
97
88
|
task generate: %w[
|
|
98
89
|
encryption:passphrase:generate
|
|
99
|
-
keys:deploy:generate
|
|
100
90
|
keys:secrets:generate
|
|
101
91
|
]
|
|
102
92
|
|
|
@@ -120,57 +110,89 @@ namespace :library do
|
|
|
120
110
|
|
|
121
111
|
desc 'Attempt to automatically fix issues with the library'
|
|
122
112
|
task fix: [:'rubocop:autocorrect_all']
|
|
113
|
+
|
|
114
|
+
desc 'Build the library'
|
|
115
|
+
task :build do
|
|
116
|
+
sh 'gem build rspec-terraform.gemspec'
|
|
117
|
+
end
|
|
123
118
|
end
|
|
124
119
|
|
|
125
120
|
namespace :test do
|
|
126
121
|
RSpec::Core::RakeTask.new(:unit)
|
|
127
122
|
end
|
|
128
123
|
|
|
129
|
-
RakeCircleCI.define_project_tasks(
|
|
130
|
-
namespace: :circle_ci,
|
|
131
|
-
project_slug: 'github/infrablocks/rspec-terraform'
|
|
132
|
-
) do |t|
|
|
133
|
-
circle_ci_config =
|
|
134
|
-
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
|
135
|
-
|
|
136
|
-
t.api_token = circle_ci_config['circle_ci_api_token']
|
|
137
|
-
t.environment_variables = {
|
|
138
|
-
ENCRYPTION_PASSPHRASE:
|
|
139
|
-
File.read('config/secrets/ci/encryption.passphrase')
|
|
140
|
-
.chomp
|
|
141
|
-
}
|
|
142
|
-
t.checkout_keys = []
|
|
143
|
-
t.ssh_keys = [
|
|
144
|
-
{
|
|
145
|
-
hostname: 'github.com',
|
|
146
|
-
private_key: File.read('config/secrets/ci/ssh.private')
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
end
|
|
150
|
-
|
|
151
124
|
RakeGithub.define_repository_tasks(
|
|
152
125
|
namespace: :github,
|
|
153
126
|
repository: 'infrablocks/rspec-terraform'
|
|
154
127
|
) do |t|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
128
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
129
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
130
|
+
# otherwise surface later as an opaque Octokit 401.
|
|
131
|
+
github_token = ENV.fetch('GITHUB_TOKEN') do
|
|
132
|
+
`gh auth token`
|
|
133
|
+
rescue Errno::ENOENT
|
|
134
|
+
''
|
|
135
|
+
end.strip
|
|
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 = File.binread('config/secrets/ci/encryption.passphrase')
|
|
149
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
150
|
+
raise 'encryption.passphrase is git-crypt ciphertext - unlock the ' \
|
|
151
|
+
'clone before provisioning'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
t.secrets = [
|
|
155
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
156
|
+
]
|
|
157
|
+
t.environments = [
|
|
158
|
+
{ name: 'release',
|
|
159
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
164
160
|
]
|
|
165
161
|
end
|
|
166
162
|
|
|
163
|
+
namespace :slack do
|
|
164
|
+
RakeSlack.define_notification_tasks do |t|
|
|
165
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
166
|
+
t.routing_rules = [
|
|
167
|
+
{ when: { type: 'on_hold' },
|
|
168
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
169
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
170
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
171
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
172
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
173
|
+
{ when: { outcome: 'success' },
|
|
174
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
175
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
176
|
+
# out of a popular channel while this pipeline beds in.
|
|
177
|
+
{ when: {},
|
|
178
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
179
|
+
]
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
namespace :repository do
|
|
184
|
+
desc 'Set the git author for CI'
|
|
185
|
+
task :set_ci_author do
|
|
186
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
187
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
167
191
|
namespace :pipeline do
|
|
168
|
-
desc 'Prepare
|
|
192
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
169
193
|
task prepare: %i[
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
circle_ci:ssh_keys:ensure
|
|
173
|
-
github:deploy_keys:ensure
|
|
194
|
+
github:secrets:ensure
|
|
195
|
+
github:environments:ensure
|
|
174
196
|
]
|
|
175
197
|
end
|
|
176
198
|
|
|
@@ -181,6 +203,38 @@ namespace :version do
|
|
|
181
203
|
end
|
|
182
204
|
end
|
|
183
205
|
|
|
206
|
+
namespace :prerelease do
|
|
207
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
208
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
209
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
210
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
211
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
version_file = 'lib/rspec/terraform/version.rb'
|
|
215
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
216
|
+
source = File.read(version_file)
|
|
217
|
+
base = source[version_pattern, 2]
|
|
218
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
219
|
+
|
|
220
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
221
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
222
|
+
gem_file = "rspec-terraform-#{version}.gem"
|
|
223
|
+
begin
|
|
224
|
+
File.write(version_file,
|
|
225
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
226
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
227
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
228
|
+
# (contrast the `release` task).
|
|
229
|
+
sh 'gem build rspec-terraform.gemspec'
|
|
230
|
+
sh "gem push #{gem_file}"
|
|
231
|
+
ensure
|
|
232
|
+
File.write(version_file, source)
|
|
233
|
+
rm_f gem_file
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
184
238
|
desc 'Release gem'
|
|
185
239
|
task :release do
|
|
186
240
|
sh 'gem release --tag --push'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'ruby_terraform'
|
|
4
|
-
require 'stringio'
|
|
5
4
|
|
|
6
5
|
require_relative 'command_instantiation'
|
|
7
6
|
|
|
@@ -13,18 +12,16 @@ module RSpec
|
|
|
13
12
|
include CommandInstantiation
|
|
14
13
|
|
|
15
14
|
def output(parameters)
|
|
16
|
-
stdout = StringIO.new
|
|
17
15
|
parameters = output_parameters(parameters)
|
|
18
16
|
|
|
19
17
|
log_output_starting(parameters)
|
|
20
18
|
log_output_using_parameters(parameters)
|
|
21
19
|
|
|
22
|
-
output_command(
|
|
23
|
-
.execute(parameters)
|
|
20
|
+
output_value = output_command.execute(parameters)
|
|
24
21
|
|
|
25
22
|
log_output_complete
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
output_value
|
|
28
25
|
end
|
|
29
26
|
|
|
30
27
|
private
|
|
@@ -44,8 +41,8 @@ module RSpec
|
|
|
44
41
|
logger&.info('Output complete.')
|
|
45
42
|
end
|
|
46
43
|
|
|
47
|
-
def output_command
|
|
48
|
-
instantiate_command(RubyTerraform::Commands::Output
|
|
44
|
+
def output_command
|
|
45
|
+
instantiate_command(RubyTerraform::Commands::Output)
|
|
49
46
|
end
|
|
50
47
|
|
|
51
48
|
def output_parameters(parameters)
|
data/rspec-terraform.gemspec
CHANGED
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
36
36
|
spec.require_paths = ['lib']
|
|
37
37
|
|
|
38
|
-
spec.required_ruby_version = '>= 3.
|
|
38
|
+
spec.required_ruby_version = '>= 3.3'
|
|
39
39
|
|
|
40
40
|
spec.add_dependency 'confidante', '>= 0.27'
|
|
41
41
|
spec.add_dependency 'rspec', '>= 3.0'
|
|
@@ -48,12 +48,11 @@ Gem::Specification.new do |spec|
|
|
|
48
48
|
spec.add_development_dependency 'guard-rspec'
|
|
49
49
|
spec.add_development_dependency 'guard-rubocop'
|
|
50
50
|
spec.add_development_dependency 'rake'
|
|
51
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
52
51
|
spec.add_development_dependency 'rake_git'
|
|
53
52
|
spec.add_development_dependency 'rake_git_crypt'
|
|
54
53
|
spec.add_development_dependency 'rake_github'
|
|
55
54
|
spec.add_development_dependency 'rake_gpg'
|
|
56
|
-
spec.add_development_dependency '
|
|
55
|
+
spec.add_development_dependency 'rake_slack'
|
|
57
56
|
spec.add_development_dependency 'rubocop'
|
|
58
57
|
spec.add_development_dependency 'rubocop-rake'
|
|
59
58
|
spec.add_development_dependency 'rubocop-rspec'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec-terraform
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.0.pre.
|
|
4
|
+
version: 0.5.0.pre.10
|
|
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-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: confidante
|
|
@@ -150,20 +150,6 @@ dependencies:
|
|
|
150
150
|
- - ">="
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '0'
|
|
153
|
-
- !ruby/object:Gem::Dependency
|
|
154
|
-
name: rake_circle_ci
|
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
|
156
|
-
requirements:
|
|
157
|
-
- - ">="
|
|
158
|
-
- !ruby/object:Gem::Version
|
|
159
|
-
version: '0'
|
|
160
|
-
type: :development
|
|
161
|
-
prerelease: false
|
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - ">="
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: '0'
|
|
167
153
|
- !ruby/object:Gem::Dependency
|
|
168
154
|
name: rake_git
|
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -221,7 +207,7 @@ dependencies:
|
|
|
221
207
|
- !ruby/object:Gem::Version
|
|
222
208
|
version: '0'
|
|
223
209
|
- !ruby/object:Gem::Dependency
|
|
224
|
-
name:
|
|
210
|
+
name: rake_slack
|
|
225
211
|
requirement: !ruby/object:Gem::Requirement
|
|
226
212
|
requirements:
|
|
227
213
|
- - ">="
|
|
@@ -362,7 +348,7 @@ licenses:
|
|
|
362
348
|
- MIT
|
|
363
349
|
metadata:
|
|
364
350
|
rubygems_mfa_required: 'false'
|
|
365
|
-
post_install_message:
|
|
351
|
+
post_install_message:
|
|
366
352
|
rdoc_options: []
|
|
367
353
|
require_paths:
|
|
368
354
|
- lib
|
|
@@ -370,15 +356,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
370
356
|
requirements:
|
|
371
357
|
- - ">="
|
|
372
358
|
- !ruby/object:Gem::Version
|
|
373
|
-
version: '3.
|
|
359
|
+
version: '3.3'
|
|
374
360
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
375
361
|
requirements:
|
|
376
|
-
- - "
|
|
362
|
+
- - ">="
|
|
377
363
|
- !ruby/object:Gem::Version
|
|
378
|
-
version:
|
|
364
|
+
version: '0'
|
|
379
365
|
requirements: []
|
|
380
|
-
rubygems_version: 3.
|
|
381
|
-
signing_key:
|
|
366
|
+
rubygems_version: 3.5.22
|
|
367
|
+
signing_key:
|
|
382
368
|
specification_version: 4
|
|
383
369
|
summary: RSpec support for testing Terraform configurations.
|
|
384
370
|
test_files: []
|