pct 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6e1b02a8d3f1af80abc2cf6636b021c28fe7d7aa68c87f1040317424c863d1cb
4
+ data.tar.gz: 2a90d14912f17b9a73878c2d675bf55d827ffb5157f762cad75d27077171bacb
5
+ SHA512:
6
+ metadata.gz: '09dcf771c4e44ae49dc164b210b638f5cc040a219fc15c6e249e84f3775bb0e7d5c85e7c9aa9e9e4ef1d0c8ed8bf227848c4e5897b5a9c6f3764a4414e8998bd'
7
+ data.tar.gz: 66fe08c3c06ea5bb12dc513bea989c8a9fcf0b0d92d72c6dfba5904e6ba730f5cc64184ea61625a9cc5b350e1e72ec269ba09bf9a19f21e895cc9e9a395ef8b3
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ before_install: gem install bundler -v 2.0.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in pct.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,743 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pct (0.1.0)
5
+ aws-sdk (~> 3.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ aws-eventstream (1.0.2)
11
+ aws-partitions (1.150.0)
12
+ aws-sdk (3.0.1)
13
+ aws-sdk-resources (~> 3)
14
+ aws-sdk-acm (1.19.0)
15
+ aws-sdk-core (~> 3, >= 3.48.2)
16
+ aws-sigv4 (~> 1.1)
17
+ aws-sdk-acmpca (1.13.0)
18
+ aws-sdk-core (~> 3, >= 3.48.2)
19
+ aws-sigv4 (~> 1.1)
20
+ aws-sdk-alexaforbusiness (1.19.0)
21
+ aws-sdk-core (~> 3, >= 3.48.2)
22
+ aws-sigv4 (~> 1.1)
23
+ aws-sdk-amplify (1.3.0)
24
+ aws-sdk-core (~> 3, >= 3.48.2)
25
+ aws-sigv4 (~> 1.1)
26
+ aws-sdk-apigateway (1.26.0)
27
+ aws-sdk-core (~> 3, >= 3.48.2)
28
+ aws-sigv4 (~> 1.1)
29
+ aws-sdk-apigatewaymanagementapi (1.3.0)
30
+ aws-sdk-core (~> 3, >= 3.48.2)
31
+ aws-sigv4 (~> 1.1)
32
+ aws-sdk-apigatewayv2 (1.4.0)
33
+ aws-sdk-core (~> 3, >= 3.48.2)
34
+ aws-sigv4 (~> 1.1)
35
+ aws-sdk-applicationautoscaling (1.22.0)
36
+ aws-sdk-core (~> 3, >= 3.48.2)
37
+ aws-sigv4 (~> 1.1)
38
+ aws-sdk-applicationdiscoveryservice (1.14.0)
39
+ aws-sdk-core (~> 3, >= 3.48.2)
40
+ aws-sigv4 (~> 1.1)
41
+ aws-sdk-appmesh (1.6.0)
42
+ aws-sdk-core (~> 3, >= 3.48.2)
43
+ aws-sigv4 (~> 1.1)
44
+ aws-sdk-appstream (1.25.0)
45
+ aws-sdk-core (~> 3, >= 3.48.2)
46
+ aws-sigv4 (~> 1.1)
47
+ aws-sdk-appsync (1.12.0)
48
+ aws-sdk-core (~> 3, >= 3.48.2)
49
+ aws-sigv4 (~> 1.1)
50
+ aws-sdk-athena (1.12.0)
51
+ aws-sdk-core (~> 3, >= 3.48.2)
52
+ aws-sigv4 (~> 1.1)
53
+ aws-sdk-autoscaling (1.20.0)
54
+ aws-sdk-core (~> 3, >= 3.48.2)
55
+ aws-sigv4 (~> 1.1)
56
+ aws-sdk-autoscalingplans (1.12.0)
57
+ aws-sdk-core (~> 3, >= 3.48.2)
58
+ aws-sigv4 (~> 1.1)
59
+ aws-sdk-backup (1.3.0)
60
+ aws-sdk-core (~> 3, >= 3.48.2)
61
+ aws-sigv4 (~> 1.1)
62
+ aws-sdk-batch (1.16.0)
63
+ aws-sdk-core (~> 3, >= 3.48.2)
64
+ aws-sigv4 (~> 1.1)
65
+ aws-sdk-budgets (1.18.0)
66
+ aws-sdk-core (~> 3, >= 3.48.2)
67
+ aws-sigv4 (~> 1.1)
68
+ aws-sdk-chime (1.6.0)
69
+ aws-sdk-core (~> 3, >= 3.48.2)
70
+ aws-sigv4 (~> 1.1)
71
+ aws-sdk-cloud9 (1.11.0)
72
+ aws-sdk-core (~> 3, >= 3.48.2)
73
+ aws-sigv4 (~> 1.1)
74
+ aws-sdk-clouddirectory (1.14.0)
75
+ aws-sdk-core (~> 3, >= 3.48.2)
76
+ aws-sigv4 (~> 1.1)
77
+ aws-sdk-cloudformation (1.18.0)
78
+ aws-sdk-core (~> 3, >= 3.48.2)
79
+ aws-sigv4 (~> 1.1)
80
+ aws-sdk-cloudfront (1.15.0)
81
+ aws-sdk-core (~> 3, >= 3.48.2)
82
+ aws-sigv4 (~> 1.1)
83
+ aws-sdk-cloudhsm (1.12.0)
84
+ aws-sdk-core (~> 3, >= 3.48.2)
85
+ aws-sigv4 (~> 1.1)
86
+ aws-sdk-cloudhsmv2 (1.12.0)
87
+ aws-sdk-core (~> 3, >= 3.48.2)
88
+ aws-sigv4 (~> 1.1)
89
+ aws-sdk-cloudsearch (1.9.0)
90
+ aws-sdk-core (~> 3, >= 3.48.2)
91
+ aws-sigv4 (~> 1.1)
92
+ aws-sdk-cloudsearchdomain (1.9.0)
93
+ aws-sdk-core (~> 3, >= 3.48.2)
94
+ aws-sigv4 (~> 1.1)
95
+ aws-sdk-cloudtrail (1.11.0)
96
+ aws-sdk-core (~> 3, >= 3.48.2)
97
+ aws-sigv4 (~> 1.1)
98
+ aws-sdk-cloudwatch (1.20.0)
99
+ aws-sdk-core (~> 3, >= 3.48.2)
100
+ aws-sigv4 (~> 1.1)
101
+ aws-sdk-cloudwatchevents (1.17.0)
102
+ aws-sdk-core (~> 3, >= 3.48.2)
103
+ aws-sigv4 (~> 1.1)
104
+ aws-sdk-cloudwatchlogs (1.17.0)
105
+ aws-sdk-core (~> 3, >= 3.48.2)
106
+ aws-sigv4 (~> 1.1)
107
+ aws-sdk-codebuild (1.32.0)
108
+ aws-sdk-core (~> 3, >= 3.48.2)
109
+ aws-sigv4 (~> 1.1)
110
+ aws-sdk-codecommit (1.17.0)
111
+ aws-sdk-core (~> 3, >= 3.48.2)
112
+ aws-sigv4 (~> 1.1)
113
+ aws-sdk-codedeploy (1.18.0)
114
+ aws-sdk-core (~> 3, >= 3.48.2)
115
+ aws-sigv4 (~> 1.1)
116
+ aws-sdk-codepipeline (1.15.0)
117
+ aws-sdk-core (~> 3, >= 3.48.2)
118
+ aws-sigv4 (~> 1.1)
119
+ aws-sdk-codestar (1.11.0)
120
+ aws-sdk-core (~> 3, >= 3.48.2)
121
+ aws-sigv4 (~> 1.1)
122
+ aws-sdk-cognitoidentity (1.10.0)
123
+ aws-sdk-core (~> 3, >= 3.48.2)
124
+ aws-sigv4 (~> 1.1)
125
+ aws-sdk-cognitoidentityprovider (1.17.0)
126
+ aws-sdk-core (~> 3, >= 3.48.2)
127
+ aws-sigv4 (~> 1.1)
128
+ aws-sdk-cognitosync (1.9.0)
129
+ aws-sdk-core (~> 3, >= 3.48.2)
130
+ aws-sigv4 (~> 1.1)
131
+ aws-sdk-comprehend (1.18.0)
132
+ aws-sdk-core (~> 3, >= 3.48.2)
133
+ aws-sigv4 (~> 1.1)
134
+ aws-sdk-comprehendmedical (1.3.0)
135
+ aws-sdk-core (~> 3, >= 3.48.2)
136
+ aws-sigv4 (~> 1.1)
137
+ aws-sdk-configservice (1.26.0)
138
+ aws-sdk-core (~> 3, >= 3.48.2)
139
+ aws-sigv4 (~> 1.1)
140
+ aws-sdk-connect (1.13.0)
141
+ aws-sdk-core (~> 3, >= 3.48.2)
142
+ aws-sigv4 (~> 1.1)
143
+ aws-sdk-core (3.48.3)
144
+ aws-eventstream (~> 1.0, >= 1.0.2)
145
+ aws-partitions (~> 1.0)
146
+ aws-sigv4 (~> 1.1)
147
+ jmespath (~> 1.0)
148
+ aws-sdk-costandusagereportservice (1.10.0)
149
+ aws-sdk-core (~> 3, >= 3.48.2)
150
+ aws-sigv4 (~> 1.1)
151
+ aws-sdk-costexplorer (1.21.0)
152
+ aws-sdk-core (~> 3, >= 3.48.2)
153
+ aws-sigv4 (~> 1.1)
154
+ aws-sdk-databasemigrationservice (1.20.0)
155
+ aws-sdk-core (~> 3, >= 3.48.2)
156
+ aws-sigv4 (~> 1.1)
157
+ aws-sdk-datapipeline (1.9.0)
158
+ aws-sdk-core (~> 3, >= 3.48.2)
159
+ aws-sigv4 (~> 1.1)
160
+ aws-sdk-datasync (1.3.0)
161
+ aws-sdk-core (~> 3, >= 3.48.2)
162
+ aws-sigv4 (~> 1.1)
163
+ aws-sdk-dax (1.11.0)
164
+ aws-sdk-core (~> 3, >= 3.48.2)
165
+ aws-sigv4 (~> 1.1)
166
+ aws-sdk-devicefarm (1.19.0)
167
+ aws-sdk-core (~> 3, >= 3.48.2)
168
+ aws-sigv4 (~> 1.1)
169
+ aws-sdk-directconnect (1.16.0)
170
+ aws-sdk-core (~> 3, >= 3.48.2)
171
+ aws-sigv4 (~> 1.1)
172
+ aws-sdk-directoryservice (1.15.0)
173
+ aws-sdk-core (~> 3, >= 3.48.2)
174
+ aws-sigv4 (~> 1.1)
175
+ aws-sdk-dlm (1.11.0)
176
+ aws-sdk-core (~> 3, >= 3.48.2)
177
+ aws-sigv4 (~> 1.1)
178
+ aws-sdk-docdb (1.4.0)
179
+ aws-sdk-core (~> 3, >= 3.48.2)
180
+ aws-sigv4 (~> 1.1)
181
+ aws-sdk-dynamodb (1.25.0)
182
+ aws-sdk-core (~> 3, >= 3.48.2)
183
+ aws-sigv4 (~> 1.1)
184
+ aws-sdk-dynamodbstreams (1.9.0)
185
+ aws-sdk-core (~> 3, >= 3.48.2)
186
+ aws-sigv4 (~> 1.1)
187
+ aws-sdk-ec2 (1.78.0)
188
+ aws-sdk-core (~> 3, >= 3.48.2)
189
+ aws-sigv4 (~> 1.1)
190
+ aws-sdk-ecr (1.14.0)
191
+ aws-sdk-core (~> 3, >= 3.48.2)
192
+ aws-sigv4 (~> 1.1)
193
+ aws-sdk-ecs (1.36.0)
194
+ aws-sdk-core (~> 3, >= 3.48.2)
195
+ aws-sigv4 (~> 1.1)
196
+ aws-sdk-efs (1.13.0)
197
+ aws-sdk-core (~> 3, >= 3.48.2)
198
+ aws-sigv4 (~> 1.1)
199
+ aws-sdk-eks (1.15.0)
200
+ aws-sdk-core (~> 3, >= 3.48.2)
201
+ aws-sigv4 (~> 1.1)
202
+ aws-sdk-elasticache (1.14.0)
203
+ aws-sdk-core (~> 3, >= 3.48.2)
204
+ aws-sigv4 (~> 1.1)
205
+ aws-sdk-elasticbeanstalk (1.19.0)
206
+ aws-sdk-core (~> 3, >= 3.48.2)
207
+ aws-sigv4 (~> 1.1)
208
+ aws-sdk-elasticloadbalancing (1.12.0)
209
+ aws-sdk-core (~> 3, >= 3.48.2)
210
+ aws-sigv4 (~> 1.1)
211
+ aws-sdk-elasticloadbalancingv2 (1.26.0)
212
+ aws-sdk-core (~> 3, >= 3.48.2)
213
+ aws-sigv4 (~> 1.1)
214
+ aws-sdk-elasticsearchservice (1.19.0)
215
+ aws-sdk-core (~> 3, >= 3.48.2)
216
+ aws-sigv4 (~> 1.1)
217
+ aws-sdk-elastictranscoder (1.11.0)
218
+ aws-sdk-core (~> 3, >= 3.48.2)
219
+ aws-sigv4 (~> 1.1)
220
+ aws-sdk-emr (1.14.0)
221
+ aws-sdk-core (~> 3, >= 3.48.2)
222
+ aws-sigv4 (~> 1.1)
223
+ aws-sdk-firehose (1.14.0)
224
+ aws-sdk-core (~> 3, >= 3.48.2)
225
+ aws-sigv4 (~> 1.1)
226
+ aws-sdk-fms (1.12.0)
227
+ aws-sdk-core (~> 3, >= 3.48.2)
228
+ aws-sigv4 (~> 1.1)
229
+ aws-sdk-fsx (1.4.0)
230
+ aws-sdk-core (~> 3, >= 3.48.2)
231
+ aws-sigv4 (~> 1.1)
232
+ aws-sdk-gamelift (1.15.0)
233
+ aws-sdk-core (~> 3, >= 3.48.2)
234
+ aws-sigv4 (~> 1.1)
235
+ aws-sdk-glacier (1.18.0)
236
+ aws-sdk-core (~> 3, >= 3.48.2)
237
+ aws-sigv4 (~> 1.1)
238
+ aws-sdk-globalaccelerator (1.4.0)
239
+ aws-sdk-core (~> 3, >= 3.48.2)
240
+ aws-sigv4 (~> 1.1)
241
+ aws-sdk-glue (1.30.0)
242
+ aws-sdk-core (~> 3, >= 3.48.2)
243
+ aws-sigv4 (~> 1.1)
244
+ aws-sdk-greengrass (1.17.0)
245
+ aws-sdk-core (~> 3, >= 3.48.2)
246
+ aws-sigv4 (~> 1.1)
247
+ aws-sdk-guardduty (1.14.0)
248
+ aws-sdk-core (~> 3, >= 3.48.2)
249
+ aws-sigv4 (~> 1.1)
250
+ aws-sdk-health (1.12.0)
251
+ aws-sdk-core (~> 3, >= 3.48.2)
252
+ aws-sigv4 (~> 1.1)
253
+ aws-sdk-iam (1.18.0)
254
+ aws-sdk-core (~> 3, >= 3.48.2)
255
+ aws-sigv4 (~> 1.1)
256
+ aws-sdk-importexport (1.9.0)
257
+ aws-sdk-core (~> 3, >= 3.48.2)
258
+ aws-sigv2 (~> 1.0)
259
+ aws-sdk-inspector (1.15.0)
260
+ aws-sdk-core (~> 3, >= 3.48.2)
261
+ aws-sigv4 (~> 1.1)
262
+ aws-sdk-iot (1.29.0)
263
+ aws-sdk-core (~> 3, >= 3.48.2)
264
+ aws-sigv4 (~> 1.1)
265
+ aws-sdk-iot1clickdevicesservice (1.11.0)
266
+ aws-sdk-core (~> 3, >= 3.48.2)
267
+ aws-sigv4 (~> 1.1)
268
+ aws-sdk-iot1clickprojects (1.10.0)
269
+ aws-sdk-core (~> 3, >= 3.48.2)
270
+ aws-sigv4 (~> 1.1)
271
+ aws-sdk-iotanalytics (1.16.0)
272
+ aws-sdk-core (~> 3, >= 3.48.2)
273
+ aws-sigv4 (~> 1.1)
274
+ aws-sdk-iotdataplane (1.9.0)
275
+ aws-sdk-core (~> 3, >= 3.48.2)
276
+ aws-sigv4 (~> 1.1)
277
+ aws-sdk-iotjobsdataplane (1.10.0)
278
+ aws-sdk-core (~> 3, >= 3.48.2)
279
+ aws-sigv4 (~> 1.1)
280
+ aws-sdk-kafka (1.3.0)
281
+ aws-sdk-core (~> 3, >= 3.48.2)
282
+ aws-sigv4 (~> 1.1)
283
+ aws-sdk-kinesis (1.13.1)
284
+ aws-sdk-core (~> 3, >= 3.48.2)
285
+ aws-sigv4 (~> 1.1)
286
+ aws-sdk-kinesisanalytics (1.12.0)
287
+ aws-sdk-core (~> 3, >= 3.48.2)
288
+ aws-sigv4 (~> 1.1)
289
+ aws-sdk-kinesisanalyticsv2 (1.3.0)
290
+ aws-sdk-core (~> 3, >= 3.48.2)
291
+ aws-sigv4 (~> 1.1)
292
+ aws-sdk-kinesisvideo (1.12.0)
293
+ aws-sdk-core (~> 3, >= 3.48.2)
294
+ aws-sigv4 (~> 1.1)
295
+ aws-sdk-kinesisvideoarchivedmedia (1.11.0)
296
+ aws-sdk-core (~> 3, >= 3.48.2)
297
+ aws-sigv4 (~> 1.1)
298
+ aws-sdk-kinesisvideomedia (1.10.0)
299
+ aws-sdk-core (~> 3, >= 3.48.2)
300
+ aws-sigv4 (~> 1.1)
301
+ aws-sdk-kms (1.16.0)
302
+ aws-sdk-core (~> 3, >= 3.48.2)
303
+ aws-sigv4 (~> 1.1)
304
+ aws-sdk-lambda (1.21.0)
305
+ aws-sdk-core (~> 3, >= 3.48.2)
306
+ aws-sigv4 (~> 1.1)
307
+ aws-sdk-lambdapreview (1.9.0)
308
+ aws-sdk-core (~> 3, >= 3.48.2)
309
+ aws-sigv4 (~> 1.1)
310
+ aws-sdk-lex (1.12.0)
311
+ aws-sdk-core (~> 3, >= 3.48.2)
312
+ aws-sigv4 (~> 1.1)
313
+ aws-sdk-lexmodelbuildingservice (1.15.0)
314
+ aws-sdk-core (~> 3, >= 3.48.2)
315
+ aws-sigv4 (~> 1.1)
316
+ aws-sdk-licensemanager (1.3.0)
317
+ aws-sdk-core (~> 3, >= 3.48.2)
318
+ aws-sigv4 (~> 1.1)
319
+ aws-sdk-lightsail (1.18.0)
320
+ aws-sdk-core (~> 3, >= 3.48.2)
321
+ aws-sigv4 (~> 1.1)
322
+ aws-sdk-machinelearning (1.10.0)
323
+ aws-sdk-core (~> 3, >= 3.48.2)
324
+ aws-sigv4 (~> 1.1)
325
+ aws-sdk-macie (1.9.0)
326
+ aws-sdk-core (~> 3, >= 3.48.2)
327
+ aws-sigv4 (~> 1.1)
328
+ aws-sdk-marketplacecommerceanalytics (1.9.0)
329
+ aws-sdk-core (~> 3, >= 3.48.2)
330
+ aws-sigv4 (~> 1.1)
331
+ aws-sdk-marketplaceentitlementservice (1.9.0)
332
+ aws-sdk-core (~> 3, >= 3.48.2)
333
+ aws-sigv4 (~> 1.1)
334
+ aws-sdk-marketplacemetering (1.11.0)
335
+ aws-sdk-core (~> 3, >= 3.48.2)
336
+ aws-sigv4 (~> 1.1)
337
+ aws-sdk-mediaconnect (1.4.0)
338
+ aws-sdk-core (~> 3, >= 3.48.2)
339
+ aws-sigv4 (~> 1.1)
340
+ aws-sdk-mediaconvert (1.25.0)
341
+ aws-sdk-core (~> 3, >= 3.48.2)
342
+ aws-sigv4 (~> 1.1)
343
+ aws-sdk-medialive (1.28.0)
344
+ aws-sdk-core (~> 3, >= 3.48.2)
345
+ aws-sigv4 (~> 1.1)
346
+ aws-sdk-mediapackage (1.15.0)
347
+ aws-sdk-core (~> 3, >= 3.48.2)
348
+ aws-sigv4 (~> 1.1)
349
+ aws-sdk-mediastore (1.12.0)
350
+ aws-sdk-core (~> 3, >= 3.48.2)
351
+ aws-sigv4 (~> 1.1)
352
+ aws-sdk-mediastoredata (1.11.0)
353
+ aws-sdk-core (~> 3, >= 3.48.2)
354
+ aws-sigv4 (~> 1.1)
355
+ aws-sdk-mediatailor (1.13.0)
356
+ aws-sdk-core (~> 3, >= 3.48.2)
357
+ aws-sigv4 (~> 1.1)
358
+ aws-sdk-migrationhub (1.11.0)
359
+ aws-sdk-core (~> 3, >= 3.48.2)
360
+ aws-sigv4 (~> 1.1)
361
+ aws-sdk-mobile (1.9.0)
362
+ aws-sdk-core (~> 3, >= 3.48.2)
363
+ aws-sigv4 (~> 1.1)
364
+ aws-sdk-mq (1.13.0)
365
+ aws-sdk-core (~> 3, >= 3.48.2)
366
+ aws-sigv4 (~> 1.1)
367
+ aws-sdk-mturk (1.12.0)
368
+ aws-sdk-core (~> 3, >= 3.48.2)
369
+ aws-sigv4 (~> 1.1)
370
+ aws-sdk-neptune (1.11.0)
371
+ aws-sdk-core (~> 3, >= 3.48.2)
372
+ aws-sigv4 (~> 1.1)
373
+ aws-sdk-opsworks (1.13.0)
374
+ aws-sdk-core (~> 3, >= 3.48.2)
375
+ aws-sigv4 (~> 1.1)
376
+ aws-sdk-opsworkscm (1.16.0)
377
+ aws-sdk-core (~> 3, >= 3.48.2)
378
+ aws-sigv4 (~> 1.1)
379
+ aws-sdk-organizations (1.23.0)
380
+ aws-sdk-core (~> 3, >= 3.48.2)
381
+ aws-sigv4 (~> 1.1)
382
+ aws-sdk-pi (1.9.0)
383
+ aws-sdk-core (~> 3, >= 3.48.2)
384
+ aws-sigv4 (~> 1.1)
385
+ aws-sdk-pinpoint (1.19.0)
386
+ aws-sdk-core (~> 3, >= 3.48.2)
387
+ aws-sigv4 (~> 1.1)
388
+ aws-sdk-pinpointemail (1.6.0)
389
+ aws-sdk-core (~> 3, >= 3.48.2)
390
+ aws-sigv4 (~> 1.1)
391
+ aws-sdk-pinpointsmsvoice (1.6.0)
392
+ aws-sdk-core (~> 3, >= 3.48.2)
393
+ aws-sigv4 (~> 1.1)
394
+ aws-sdk-polly (1.18.0)
395
+ aws-sdk-core (~> 3, >= 3.48.2)
396
+ aws-sigv4 (~> 1.1)
397
+ aws-sdk-pricing (1.9.0)
398
+ aws-sdk-core (~> 3, >= 3.48.2)
399
+ aws-sigv4 (~> 1.1)
400
+ aws-sdk-quicksight (1.5.0)
401
+ aws-sdk-core (~> 3, >= 3.48.2)
402
+ aws-sigv4 (~> 1.1)
403
+ aws-sdk-ram (1.4.0)
404
+ aws-sdk-core (~> 3, >= 3.48.2)
405
+ aws-sigv4 (~> 1.1)
406
+ aws-sdk-rds (1.48.0)
407
+ aws-sdk-core (~> 3, >= 3.48.2)
408
+ aws-sigv4 (~> 1.1)
409
+ aws-sdk-rdsdataservice (1.4.0)
410
+ aws-sdk-core (~> 3, >= 3.48.2)
411
+ aws-sigv4 (~> 1.1)
412
+ aws-sdk-redshift (1.23.0)
413
+ aws-sdk-core (~> 3, >= 3.48.2)
414
+ aws-sigv4 (~> 1.1)
415
+ aws-sdk-rekognition (1.22.0)
416
+ aws-sdk-core (~> 3, >= 3.48.2)
417
+ aws-sigv4 (~> 1.1)
418
+ aws-sdk-resourcegroups (1.13.0)
419
+ aws-sdk-core (~> 3, >= 3.48.2)
420
+ aws-sigv4 (~> 1.1)
421
+ aws-sdk-resourcegroupstaggingapi (1.9.0)
422
+ aws-sdk-core (~> 3, >= 3.48.2)
423
+ aws-sigv4 (~> 1.1)
424
+ aws-sdk-resources (3.41.0)
425
+ aws-sdk-acm (~> 1)
426
+ aws-sdk-acmpca (~> 1)
427
+ aws-sdk-alexaforbusiness (~> 1)
428
+ aws-sdk-amplify (~> 1)
429
+ aws-sdk-apigateway (~> 1)
430
+ aws-sdk-apigatewaymanagementapi (~> 1)
431
+ aws-sdk-apigatewayv2 (~> 1)
432
+ aws-sdk-applicationautoscaling (~> 1)
433
+ aws-sdk-applicationdiscoveryservice (~> 1)
434
+ aws-sdk-appmesh (~> 1)
435
+ aws-sdk-appstream (~> 1)
436
+ aws-sdk-appsync (~> 1)
437
+ aws-sdk-athena (~> 1)
438
+ aws-sdk-autoscaling (~> 1)
439
+ aws-sdk-autoscalingplans (~> 1)
440
+ aws-sdk-backup (~> 1)
441
+ aws-sdk-batch (~> 1)
442
+ aws-sdk-budgets (~> 1)
443
+ aws-sdk-chime (~> 1)
444
+ aws-sdk-cloud9 (~> 1)
445
+ aws-sdk-clouddirectory (~> 1)
446
+ aws-sdk-cloudformation (~> 1)
447
+ aws-sdk-cloudfront (~> 1)
448
+ aws-sdk-cloudhsm (~> 1)
449
+ aws-sdk-cloudhsmv2 (~> 1)
450
+ aws-sdk-cloudsearch (~> 1)
451
+ aws-sdk-cloudsearchdomain (~> 1)
452
+ aws-sdk-cloudtrail (~> 1)
453
+ aws-sdk-cloudwatch (~> 1)
454
+ aws-sdk-cloudwatchevents (~> 1)
455
+ aws-sdk-cloudwatchlogs (~> 1)
456
+ aws-sdk-codebuild (~> 1)
457
+ aws-sdk-codecommit (~> 1)
458
+ aws-sdk-codedeploy (~> 1)
459
+ aws-sdk-codepipeline (~> 1)
460
+ aws-sdk-codestar (~> 1)
461
+ aws-sdk-cognitoidentity (~> 1)
462
+ aws-sdk-cognitoidentityprovider (~> 1)
463
+ aws-sdk-cognitosync (~> 1)
464
+ aws-sdk-comprehend (~> 1)
465
+ aws-sdk-comprehendmedical (~> 1)
466
+ aws-sdk-configservice (~> 1)
467
+ aws-sdk-connect (~> 1)
468
+ aws-sdk-costandusagereportservice (~> 1)
469
+ aws-sdk-costexplorer (~> 1)
470
+ aws-sdk-databasemigrationservice (~> 1)
471
+ aws-sdk-datapipeline (~> 1)
472
+ aws-sdk-datasync (~> 1)
473
+ aws-sdk-dax (~> 1)
474
+ aws-sdk-devicefarm (~> 1)
475
+ aws-sdk-directconnect (~> 1)
476
+ aws-sdk-directoryservice (~> 1)
477
+ aws-sdk-dlm (~> 1)
478
+ aws-sdk-docdb (~> 1)
479
+ aws-sdk-dynamodb (~> 1)
480
+ aws-sdk-dynamodbstreams (~> 1)
481
+ aws-sdk-ec2 (~> 1)
482
+ aws-sdk-ecr (~> 1)
483
+ aws-sdk-ecs (~> 1)
484
+ aws-sdk-efs (~> 1)
485
+ aws-sdk-eks (~> 1)
486
+ aws-sdk-elasticache (~> 1)
487
+ aws-sdk-elasticbeanstalk (~> 1)
488
+ aws-sdk-elasticloadbalancing (~> 1)
489
+ aws-sdk-elasticloadbalancingv2 (~> 1)
490
+ aws-sdk-elasticsearchservice (~> 1)
491
+ aws-sdk-elastictranscoder (~> 1)
492
+ aws-sdk-emr (~> 1)
493
+ aws-sdk-firehose (~> 1)
494
+ aws-sdk-fms (~> 1)
495
+ aws-sdk-fsx (~> 1)
496
+ aws-sdk-gamelift (~> 1)
497
+ aws-sdk-glacier (~> 1)
498
+ aws-sdk-globalaccelerator (~> 1)
499
+ aws-sdk-glue (~> 1)
500
+ aws-sdk-greengrass (~> 1)
501
+ aws-sdk-guardduty (~> 1)
502
+ aws-sdk-health (~> 1)
503
+ aws-sdk-iam (~> 1)
504
+ aws-sdk-importexport (~> 1)
505
+ aws-sdk-inspector (~> 1)
506
+ aws-sdk-iot (~> 1)
507
+ aws-sdk-iot1clickdevicesservice (~> 1)
508
+ aws-sdk-iot1clickprojects (~> 1)
509
+ aws-sdk-iotanalytics (~> 1)
510
+ aws-sdk-iotdataplane (~> 1)
511
+ aws-sdk-iotjobsdataplane (~> 1)
512
+ aws-sdk-kafka (~> 1)
513
+ aws-sdk-kinesis (~> 1)
514
+ aws-sdk-kinesisanalytics (~> 1)
515
+ aws-sdk-kinesisanalyticsv2 (~> 1)
516
+ aws-sdk-kinesisvideo (~> 1)
517
+ aws-sdk-kinesisvideoarchivedmedia (~> 1)
518
+ aws-sdk-kinesisvideomedia (~> 1)
519
+ aws-sdk-kms (~> 1)
520
+ aws-sdk-lambda (~> 1)
521
+ aws-sdk-lambdapreview (~> 1)
522
+ aws-sdk-lex (~> 1)
523
+ aws-sdk-lexmodelbuildingservice (~> 1)
524
+ aws-sdk-licensemanager (~> 1)
525
+ aws-sdk-lightsail (~> 1)
526
+ aws-sdk-machinelearning (~> 1)
527
+ aws-sdk-macie (~> 1)
528
+ aws-sdk-marketplacecommerceanalytics (~> 1)
529
+ aws-sdk-marketplaceentitlementservice (~> 1)
530
+ aws-sdk-marketplacemetering (~> 1)
531
+ aws-sdk-mediaconnect (~> 1)
532
+ aws-sdk-mediaconvert (~> 1)
533
+ aws-sdk-medialive (~> 1)
534
+ aws-sdk-mediapackage (~> 1)
535
+ aws-sdk-mediastore (~> 1)
536
+ aws-sdk-mediastoredata (~> 1)
537
+ aws-sdk-mediatailor (~> 1)
538
+ aws-sdk-migrationhub (~> 1)
539
+ aws-sdk-mobile (~> 1)
540
+ aws-sdk-mq (~> 1)
541
+ aws-sdk-mturk (~> 1)
542
+ aws-sdk-neptune (~> 1)
543
+ aws-sdk-opsworks (~> 1)
544
+ aws-sdk-opsworkscm (~> 1)
545
+ aws-sdk-organizations (~> 1)
546
+ aws-sdk-pi (~> 1)
547
+ aws-sdk-pinpoint (~> 1)
548
+ aws-sdk-pinpointemail (~> 1)
549
+ aws-sdk-pinpointsmsvoice (~> 1)
550
+ aws-sdk-polly (~> 1)
551
+ aws-sdk-pricing (~> 1)
552
+ aws-sdk-quicksight (~> 1)
553
+ aws-sdk-ram (~> 1)
554
+ aws-sdk-rds (~> 1)
555
+ aws-sdk-rdsdataservice (~> 1)
556
+ aws-sdk-redshift (~> 1)
557
+ aws-sdk-rekognition (~> 1)
558
+ aws-sdk-resourcegroups (~> 1)
559
+ aws-sdk-resourcegroupstaggingapi (~> 1)
560
+ aws-sdk-robomaker (~> 1)
561
+ aws-sdk-route53 (~> 1)
562
+ aws-sdk-route53domains (~> 1)
563
+ aws-sdk-route53resolver (~> 1)
564
+ aws-sdk-s3 (~> 1)
565
+ aws-sdk-s3control (~> 1)
566
+ aws-sdk-sagemaker (~> 1)
567
+ aws-sdk-sagemakerruntime (~> 1)
568
+ aws-sdk-secretsmanager (~> 1)
569
+ aws-sdk-securityhub (~> 1)
570
+ aws-sdk-serverlessapplicationrepository (~> 1)
571
+ aws-sdk-servicecatalog (~> 1)
572
+ aws-sdk-servicediscovery (~> 1)
573
+ aws-sdk-ses (~> 1)
574
+ aws-sdk-shield (~> 1)
575
+ aws-sdk-signer (~> 1)
576
+ aws-sdk-simpledb (~> 1)
577
+ aws-sdk-sms (~> 1)
578
+ aws-sdk-snowball (~> 1)
579
+ aws-sdk-sns (~> 1)
580
+ aws-sdk-sqs (~> 1)
581
+ aws-sdk-ssm (~> 1)
582
+ aws-sdk-states (~> 1)
583
+ aws-sdk-storagegateway (~> 1)
584
+ aws-sdk-support (~> 1)
585
+ aws-sdk-swf (~> 1)
586
+ aws-sdk-textract (~> 1)
587
+ aws-sdk-transcribeservice (~> 1)
588
+ aws-sdk-transcribestreamingservice (~> 1)
589
+ aws-sdk-transfer (~> 1)
590
+ aws-sdk-translate (~> 1)
591
+ aws-sdk-waf (~> 1)
592
+ aws-sdk-wafregional (~> 1)
593
+ aws-sdk-workdocs (~> 1)
594
+ aws-sdk-worklink (~> 1)
595
+ aws-sdk-workmail (~> 1)
596
+ aws-sdk-workspaces (~> 1)
597
+ aws-sdk-xray (~> 1)
598
+ aws-sdk-robomaker (1.5.0)
599
+ aws-sdk-core (~> 3, >= 3.48.2)
600
+ aws-sigv4 (~> 1.1)
601
+ aws-sdk-route53 (1.21.0)
602
+ aws-sdk-core (~> 3, >= 3.48.2)
603
+ aws-sigv4 (~> 1.1)
604
+ aws-sdk-route53domains (1.11.0)
605
+ aws-sdk-core (~> 3, >= 3.48.2)
606
+ aws-sigv4 (~> 1.1)
607
+ aws-sdk-route53resolver (1.4.0)
608
+ aws-sdk-core (~> 3, >= 3.48.2)
609
+ aws-sigv4 (~> 1.1)
610
+ aws-sdk-s3 (1.36.0)
611
+ aws-sdk-core (~> 3, >= 3.48.2)
612
+ aws-sdk-kms (~> 1)
613
+ aws-sigv4 (~> 1.0)
614
+ aws-sdk-s3control (1.4.0)
615
+ aws-sdk-core (~> 3, >= 3.48.2)
616
+ aws-sigv4 (~> 1.0)
617
+ aws-sdk-sagemaker (1.33.0)
618
+ aws-sdk-core (~> 3, >= 3.48.2)
619
+ aws-sigv4 (~> 1.1)
620
+ aws-sdk-sagemakerruntime (1.10.0)
621
+ aws-sdk-core (~> 3, >= 3.48.2)
622
+ aws-sigv4 (~> 1.1)
623
+ aws-sdk-secretsmanager (1.24.0)
624
+ aws-sdk-core (~> 3, >= 3.48.2)
625
+ aws-sigv4 (~> 1.1)
626
+ aws-sdk-securityhub (1.4.0)
627
+ aws-sdk-core (~> 3, >= 3.48.2)
628
+ aws-sigv4 (~> 1.1)
629
+ aws-sdk-serverlessapplicationrepository (1.15.0)
630
+ aws-sdk-core (~> 3, >= 3.48.2)
631
+ aws-sigv4 (~> 1.1)
632
+ aws-sdk-servicecatalog (1.20.0)
633
+ aws-sdk-core (~> 3, >= 3.48.2)
634
+ aws-sigv4 (~> 1.1)
635
+ aws-sdk-servicediscovery (1.12.0)
636
+ aws-sdk-core (~> 3, >= 3.48.2)
637
+ aws-sigv4 (~> 1.1)
638
+ aws-sdk-ses (1.18.0)
639
+ aws-sdk-core (~> 3, >= 3.48.2)
640
+ aws-sigv4 (~> 1.1)
641
+ aws-sdk-shield (1.13.0)
642
+ aws-sdk-core (~> 3, >= 3.48.2)
643
+ aws-sigv4 (~> 1.1)
644
+ aws-sdk-signer (1.9.0)
645
+ aws-sdk-core (~> 3, >= 3.48.2)
646
+ aws-sigv4 (~> 1.1)
647
+ aws-sdk-simpledb (1.9.0)
648
+ aws-sdk-core (~> 3, >= 3.48.2)
649
+ aws-sigv2 (~> 1.0)
650
+ aws-sdk-sms (1.10.0)
651
+ aws-sdk-core (~> 3, >= 3.48.2)
652
+ aws-sigv4 (~> 1.1)
653
+ aws-sdk-snowball (1.14.0)
654
+ aws-sdk-core (~> 3, >= 3.48.2)
655
+ aws-sigv4 (~> 1.1)
656
+ aws-sdk-sns (1.12.0)
657
+ aws-sdk-core (~> 3, >= 3.48.2)
658
+ aws-sigv4 (~> 1.1)
659
+ aws-sdk-sqs (1.13.0)
660
+ aws-sdk-core (~> 3, >= 3.48.2)
661
+ aws-sigv4 (~> 1.1)
662
+ aws-sdk-ssm (1.42.0)
663
+ aws-sdk-core (~> 3, >= 3.48.2)
664
+ aws-sigv4 (~> 1.1)
665
+ aws-sdk-states (1.14.0)
666
+ aws-sdk-core (~> 3, >= 3.48.2)
667
+ aws-sigv4 (~> 1.1)
668
+ aws-sdk-storagegateway (1.20.0)
669
+ aws-sdk-core (~> 3, >= 3.48.2)
670
+ aws-sigv4 (~> 1.1)
671
+ aws-sdk-support (1.9.0)
672
+ aws-sdk-core (~> 3, >= 3.48.2)
673
+ aws-sigv4 (~> 1.1)
674
+ aws-sdk-swf (1.9.0)
675
+ aws-sdk-core (~> 3, >= 3.48.2)
676
+ aws-sigv4 (~> 1.1)
677
+ aws-sdk-textract (1.3.0)
678
+ aws-sdk-core (~> 3, >= 3.48.2)
679
+ aws-sigv4 (~> 1.1)
680
+ aws-sdk-transcribeservice (1.18.0)
681
+ aws-sdk-core (~> 3, >= 3.48.2)
682
+ aws-sigv4 (~> 1.1)
683
+ aws-sdk-transcribestreamingservice (1.1.0)
684
+ aws-sdk-core (~> 3, >= 3.48.2)
685
+ aws-sigv4 (~> 1.1)
686
+ aws-sdk-transfer (1.5.0)
687
+ aws-sdk-core (~> 3, >= 3.48.2)
688
+ aws-sigv4 (~> 1.1)
689
+ aws-sdk-translate (1.11.0)
690
+ aws-sdk-core (~> 3, >= 3.48.2)
691
+ aws-sigv4 (~> 1.1)
692
+ aws-sdk-waf (1.16.0)
693
+ aws-sdk-core (~> 3, >= 3.48.2)
694
+ aws-sigv4 (~> 1.1)
695
+ aws-sdk-wafregional (1.17.0)
696
+ aws-sdk-core (~> 3, >= 3.48.2)
697
+ aws-sigv4 (~> 1.1)
698
+ aws-sdk-workdocs (1.12.0)
699
+ aws-sdk-core (~> 3, >= 3.48.2)
700
+ aws-sigv4 (~> 1.1)
701
+ aws-sdk-worklink (1.3.0)
702
+ aws-sdk-core (~> 3, >= 3.48.2)
703
+ aws-sigv4 (~> 1.1)
704
+ aws-sdk-workmail (1.11.0)
705
+ aws-sdk-core (~> 3, >= 3.48.2)
706
+ aws-sigv4 (~> 1.1)
707
+ aws-sdk-workspaces (1.16.0)
708
+ aws-sdk-core (~> 3, >= 3.48.2)
709
+ aws-sigv4 (~> 1.1)
710
+ aws-sdk-xray (1.13.0)
711
+ aws-sdk-core (~> 3, >= 3.48.2)
712
+ aws-sigv4 (~> 1.1)
713
+ aws-sigv2 (1.0.1)
714
+ aws-sigv4 (1.1.0)
715
+ aws-eventstream (~> 1.0, >= 1.0.2)
716
+ diff-lcs (1.3)
717
+ jmespath (1.4.0)
718
+ rake (10.5.0)
719
+ rspec (3.8.0)
720
+ rspec-core (~> 3.8.0)
721
+ rspec-expectations (~> 3.8.0)
722
+ rspec-mocks (~> 3.8.0)
723
+ rspec-core (3.8.0)
724
+ rspec-support (~> 3.8.0)
725
+ rspec-expectations (3.8.2)
726
+ diff-lcs (>= 1.2.0, < 2.0)
727
+ rspec-support (~> 3.8.0)
728
+ rspec-mocks (3.8.0)
729
+ diff-lcs (>= 1.2.0, < 2.0)
730
+ rspec-support (~> 3.8.0)
731
+ rspec-support (3.8.0)
732
+
733
+ PLATFORMS
734
+ ruby
735
+
736
+ DEPENDENCIES
737
+ bundler (~> 2.0)
738
+ pct!
739
+ rake (~> 10.0)
740
+ rspec (~> 3.0)
741
+
742
+ BUNDLED WITH
743
+ 2.0.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Emily Dobervich
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # PCT - Protected Configuration Tool
2
+
3
+ Protect configuration by encrypting it with KMS.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'pct'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install pct
20
+
21
+ ## Usage
22
+
23
+ `pct config_file.yml`
24
+
25
+ And then follow the instructions in the file.
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pct"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/config.yml ADDED
@@ -0,0 +1,9 @@
1
+ ---
2
+ configuration:
3
+ example_key: AQICAHh0BgEfuLkWCbVYPwWdv1VNzShKV0UUHr8upi4Aus9l2AHaCyzmolmDJFG1YYrW2Z3+AAAAgTB/BgkqhkiG9w0BBwagcjBwAgEAMGsGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMSl81BU9HEZQAtsIHAgEQgD4PtrJ8bwYarvJ2qecT/BUcn85Eo4woHAhKJlQf8lAOZlLqRwwUtMKH2GUsrGf6TIq5XQVkwq/LZLA/pQX5Qg==
4
+ example_key2: AQICAHh0BgEfuLkWCbVYPwWdv1VNzShKV0UUHr8upi4Aus9l2AGU8xVzrbUnkHIEsn5FFaTbAAAAgTB/BgkqhkiG9w0BBwagcjBwAgEAMGsGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMkToWFE82Rao5Deg9AgEQgD5N3aQ2YMf5C7ENozpJEvzYsEjxVa+oT2aHP1ZJepUkEBvcyT/6VRxhSHiMwPJDuCYSo7/t1mtmDrsnuyCc4w==
5
+ test: AQICAHh0BgEfuLkWCbVYPwWdv1VNzShKV0UUHr8upi4Aus9l2AE6w5OxDcLt92r+le3+MEpCAAAAazBpBgkqhkiG9w0BBwagXDBaAgEAMFUGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMwzYhpO7Pmt5x1CKZAgEQgChMopJbZNB5U6lZOR/1IpP8Ktzy8NDspIebLraFXa0sDYwa9kOA0E50
6
+ key_mapping:
7
+ example_key: constructor-master
8
+ example_key2: constructor-master
9
+ test: constructor-master
data/exe/pct ADDED
@@ -0,0 +1,9 @@
1
+ require 'pct'
2
+
3
+ puts ARGV[0]
4
+
5
+ if ARGV[1] == '--new'
6
+ Pct.create(ARGV[0])
7
+ else
8
+ Pct.edit(ARGV[0], ARGV[1] == '--decrypt')
9
+ end
@@ -0,0 +1,3 @@
1
+ module Pct
2
+ VERSION = "0.2.0"
3
+ end
data/lib/pct.rb ADDED
@@ -0,0 +1,128 @@
1
+ require 'pct/version'
2
+ require 'tempfile'
3
+ require 'yaml'
4
+ require 'base64'
5
+ require 'aws-sdk-kms'
6
+
7
+ module Pct
8
+ class Error < StandardError; end
9
+
10
+ DEFAULT = <<~EOS
11
+ configuration:
12
+ example_key: "some value that should be encrypted"
13
+ some:
14
+ nested: "values"
15
+
16
+ key_mapping:
17
+ example_key: 'SomeKmsKeyAlias'
18
+ some:
19
+ nested: 'SomeKmsKeyAlias'
20
+ EOS
21
+
22
+ def self.client
23
+ @client ||= Aws::KMS::Client.new
24
+ end
25
+
26
+ def self.encrypt(value, key)
27
+ raise ArgumentError, "all values for encryption must be a string" if !value.is_a?(String)
28
+
29
+ Base64.strict_encode64(client.encrypt({
30
+ key_id: "alias/#{key}",
31
+ plaintext: value
32
+ }).ciphertext_blob)
33
+ end
34
+
35
+ def self.to_encrypted(configuration, key_mapping, original_config = {}, potentially_decrypted = {})
36
+ encrypted_config = Hash[configuration.map do |key, value|
37
+ if value.is_a?(Hash)
38
+ [key, to_encrypted(value, key_mapping[key], original_config[key] || {}, potentially_decrypted || {})['configuration']]
39
+ else
40
+ if value == '<encrypted>'
41
+ if !original_config[key]
42
+ raise "moving encrypted values is not supported"
43
+ end
44
+
45
+ [key, original_config[key]]
46
+ elsif value == potentially_decrypted[key]
47
+ [key, original_config[key]]
48
+ else
49
+ [key, encrypt(value, key_mapping[key])]
50
+ end
51
+ end
52
+ end]
53
+
54
+ {
55
+ 'configuration' => encrypted_config,
56
+ 'key_mapping' => key_mapping,
57
+ }
58
+ end
59
+
60
+ def self.create(path)
61
+ file = Tempfile.new(['new-config', '.yml'])
62
+
63
+ File.open(file.path, 'w') do |f|
64
+ f.puts(DEFAULT)
65
+ end
66
+
67
+ system("#{ENV['EDITOR']} #{file.path}")
68
+
69
+ new_config = YAML.load(File.read(file.path))
70
+ encrypted_config = to_encrypted(new_config['configuration'], new_config['key_mapping'])
71
+
72
+ File.open(path, 'w') do |f|
73
+ f.write(encrypted_config.to_yaml)
74
+ end
75
+ ensure
76
+ file.close
77
+ file.unlink
78
+ end
79
+
80
+ def self.set_placeholders(config)
81
+ config.each do |k, v|
82
+ if v.is_a?(Hash)
83
+ set_placeholders(v)
84
+ else
85
+ config[k] = '<encrypted>'
86
+ end
87
+ end
88
+ end
89
+
90
+ def self.to_decrypted(configuration)
91
+ Hash[configuration.map do |k, v|
92
+ if v.is_a?(Hash)
93
+ [k, to_decrypted(v)]
94
+ else
95
+ [k, client.decrypt({ciphertext_blob: Base64.decode64(v)}).plaintext]
96
+ end
97
+ end]
98
+ end
99
+
100
+ def self.edit(path, decrypt)
101
+ file = Tempfile.new([path, '.yml'])
102
+
103
+ processed_file = YAML.load(File.read(path))
104
+ original_file = YAML.load(File.read(path))
105
+
106
+ if decrypt
107
+ processed_file['configuration'] = to_decrypted(processed_file['configuration'])
108
+ else
109
+ processed_file['configuration'] = set_placeholders(processed_file['configuration'])
110
+ end
111
+
112
+ File.open(file.path, 'w') do |f|
113
+ f.puts(processed_file.to_yaml)
114
+ end
115
+
116
+ system("#{ENV['EDITOR']} #{file.path}")
117
+
118
+ new_config = YAML.load(File.read(file.path))
119
+ encrypted_config = to_encrypted(new_config['configuration'], new_config['key_mapping'], original_file['configuration'], processed_file['configuration'])
120
+
121
+ File.open(path, 'w') do |f|
122
+ f.write(encrypted_config.to_yaml)
123
+ end
124
+ ensure
125
+ file.close
126
+ file.unlink
127
+ end
128
+ end
data/pct.gemspec ADDED
@@ -0,0 +1,37 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "pct/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "pct"
7
+ spec.version = Pct::VERSION
8
+ spec.authors = ["Emily Dobervich"]
9
+ spec.email = ["emily@dobervich.com"]
10
+
11
+ spec.summary = %q{}
12
+ spec.description = %q{}
13
+ spec.license = "MIT"
14
+
15
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
16
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
17
+ if spec.respond_to?(:metadata)
18
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
19
+ else
20
+ raise "RubyGems 2.0 or newer is required to protect against " \
21
+ "public gem pushes."
22
+ end
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
27
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 2.0"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
36
+ spec.add_dependency "aws-sdk", "~> 3.0"
37
+ end
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pct
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Emily Dobervich
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-04-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: aws-sdk
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ description: ''
70
+ email:
71
+ - emily@dobervich.com
72
+ executables:
73
+ - pct
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".travis.yml"
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE.txt
83
+ - README.md
84
+ - Rakefile
85
+ - bin/console
86
+ - bin/setup
87
+ - config.yml
88
+ - exe/pct
89
+ - lib/pct.rb
90
+ - lib/pct/version.rb
91
+ - pct.gemspec
92
+ homepage:
93
+ licenses:
94
+ - MIT
95
+ metadata: {}
96
+ post_install_message:
97
+ rdoc_options: []
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ requirements: []
111
+ rubyforge_project:
112
+ rubygems_version: 2.7.6
113
+ signing_key:
114
+ specification_version: 4
115
+ summary: ''
116
+ test_files: []