pangea 0.0.30 → 0.0.32
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/.gitignore +3 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +10 -41
- data/bin/stitches +0 -0
- data/gemset.nix +17 -132
- data/lib/pangea/cli/subcommands/config.rb +24 -11
- data/lib/pangea/cli/subcommands/infra.rb +75 -48
- data/lib/pangea/modules.rb +72 -0
- data/lib/pangea/version.rb +1 -1
- data/lib/pangea.rb +11 -0
- data/spec/modules_spec.rb +11 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05fd91af3bdb569afe2b6a4a2b4f8445f479cf1fe312282c9c75d5e35b4f359d
|
|
4
|
+
data.tar.gz: 06df4b71cf542c16cc3c0ea44bff9324cb88cca3b3ed6cee327f6b72565e02cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: deae78f3c4384d097481c572fff86e711fc9ab7f5b3472a3b813a3028ada006de0c6887f03163c2b38275c77416f3d79c7459c62077621ffc7a1d510e0ba46ed
|
|
7
|
+
data.tar.gz: 40636066a0d51c458bfad53af314bc1fd2da310566e8a8bbbed3bc63b27f804532d5039588380feb9be4e49106841c2a5e564dceff04420dc90767fca6c170bc
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -4,33 +4,24 @@ GEM
|
|
|
4
4
|
abstract-synthesizer (0.0.1)
|
|
5
5
|
ast (2.4.2)
|
|
6
6
|
aws-eventstream (1.2.0)
|
|
7
|
-
aws-partitions (1.
|
|
8
|
-
aws-sdk-core (3.
|
|
7
|
+
aws-partitions (1.802.0)
|
|
8
|
+
aws-sdk-core (3.180.3)
|
|
9
9
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
10
10
|
aws-partitions (~> 1, >= 1.651.0)
|
|
11
11
|
aws-sigv4 (~> 1.5)
|
|
12
12
|
jmespath (~> 1, >= 1.6.1)
|
|
13
|
-
aws-sdk-dynamodb (1.
|
|
13
|
+
aws-sdk-dynamodb (1.93.1)
|
|
14
14
|
aws-sdk-core (~> 3, >= 3.177.0)
|
|
15
15
|
aws-sigv4 (~> 1.1)
|
|
16
16
|
aws-sigv4 (1.6.0)
|
|
17
17
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
18
|
-
|
|
19
|
-
benchmark (0.2.1)
|
|
18
|
+
base64 (0.1.1)
|
|
20
19
|
citrus (3.0.2)
|
|
21
20
|
diff-lcs (1.5.0)
|
|
22
|
-
e2mmap (0.1.0)
|
|
23
|
-
jaro_winkler (1.5.6)
|
|
24
21
|
jmespath (1.6.2)
|
|
25
22
|
json (2.6.3)
|
|
26
23
|
keycutter (1.0.2)
|
|
27
|
-
kramdown (2.4.0)
|
|
28
|
-
rexml
|
|
29
|
-
kramdown-parser-gfm (1.1.0)
|
|
30
|
-
kramdown (~> 2.0)
|
|
31
24
|
language_server-protocol (3.17.0.3)
|
|
32
|
-
nokogiri (1.15.3)
|
|
33
|
-
racc (~> 1.4)
|
|
34
25
|
parallel (1.23.0)
|
|
35
26
|
parser (3.2.2.3)
|
|
36
27
|
ast (~> 2.4.1)
|
|
@@ -40,11 +31,8 @@ GEM
|
|
|
40
31
|
racc (1.7.1)
|
|
41
32
|
rainbow (3.1.1)
|
|
42
33
|
rake (13.0.6)
|
|
43
|
-
rbs (2.8.4)
|
|
44
34
|
regexp_parser (2.8.1)
|
|
45
|
-
|
|
46
|
-
nokogiri
|
|
47
|
-
rexml (3.2.5)
|
|
35
|
+
rexml (3.2.6)
|
|
48
36
|
rspec (3.12.0)
|
|
49
37
|
rspec-core (~> 3.12.0)
|
|
50
38
|
rspec-expectations (~> 3.12.0)
|
|
@@ -58,7 +46,8 @@ GEM
|
|
|
58
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
59
47
|
rspec-support (~> 3.12.0)
|
|
60
48
|
rspec-support (3.12.1)
|
|
61
|
-
rubocop (1.
|
|
49
|
+
rubocop (1.56.0)
|
|
50
|
+
base64 (~> 0.1.1)
|
|
62
51
|
json (~> 2.3)
|
|
63
52
|
language_server-protocol (>= 3.17.0)
|
|
64
53
|
parallel (~> 1.10)
|
|
@@ -66,7 +55,7 @@ GEM
|
|
|
66
55
|
rainbow (>= 2.2.2, < 4.0)
|
|
67
56
|
regexp_parser (>= 1.8, < 3.0)
|
|
68
57
|
rexml (>= 3.2.5, < 4.0)
|
|
69
|
-
rubocop-ast (>= 1.28.
|
|
58
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
|
70
59
|
ruby-progressbar (~> 1.7)
|
|
71
60
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
72
61
|
rubocop-ast (1.29.0)
|
|
@@ -77,35 +66,17 @@ GEM
|
|
|
77
66
|
rubocop (~> 1.33)
|
|
78
67
|
rubocop-rake (0.6.0)
|
|
79
68
|
rubocop (~> 1.0)
|
|
80
|
-
rubocop-rspec (2.
|
|
69
|
+
rubocop-rspec (2.23.2)
|
|
81
70
|
rubocop (~> 1.33)
|
|
82
71
|
rubocop-capybara (~> 2.17)
|
|
83
72
|
rubocop-factory_bot (~> 2.22)
|
|
84
73
|
ruby-progressbar (1.13.0)
|
|
85
|
-
solargraph (0.49.0)
|
|
86
|
-
backport (~> 1.2)
|
|
87
|
-
benchmark
|
|
88
|
-
bundler (~> 2.0)
|
|
89
|
-
diff-lcs (~> 1.4)
|
|
90
|
-
e2mmap
|
|
91
|
-
jaro_winkler (~> 1.5)
|
|
92
|
-
kramdown (~> 2.3)
|
|
93
|
-
kramdown-parser-gfm (~> 1.1)
|
|
94
|
-
parser (~> 3.0)
|
|
95
|
-
rbs (~> 2.0)
|
|
96
|
-
reverse_markdown (~> 2.0)
|
|
97
|
-
rubocop (~> 1.38)
|
|
98
|
-
thor (~> 1.0)
|
|
99
|
-
tilt (~> 2.0)
|
|
100
|
-
yard (~> 0.9, >= 0.9.24)
|
|
101
74
|
strings (0.2.1)
|
|
102
75
|
strings-ansi (~> 0.2)
|
|
103
76
|
unicode-display_width (>= 1.5, < 3.0)
|
|
104
77
|
unicode_utils (~> 1.4)
|
|
105
78
|
strings-ansi (0.2.0)
|
|
106
79
|
terraform-synthesizer (0.0.1)
|
|
107
|
-
thor (1.2.2)
|
|
108
|
-
tilt (2.2.0)
|
|
109
80
|
toml-rb (2.2.0)
|
|
110
81
|
citrus (~> 3.0, > 3.0)
|
|
111
82
|
tty-box (0.7.0)
|
|
@@ -130,7 +101,7 @@ GEM
|
|
|
130
101
|
yard (0.9.34)
|
|
131
102
|
|
|
132
103
|
PLATFORMS
|
|
133
|
-
|
|
104
|
+
x86_64-darwin-22
|
|
134
105
|
|
|
135
106
|
DEPENDENCIES
|
|
136
107
|
abstract-synthesizer
|
|
@@ -138,10 +109,8 @@ DEPENDENCIES
|
|
|
138
109
|
keycutter
|
|
139
110
|
rake
|
|
140
111
|
rspec
|
|
141
|
-
rubocop
|
|
142
112
|
rubocop-rake
|
|
143
113
|
rubocop-rspec
|
|
144
|
-
solargraph
|
|
145
114
|
terraform-synthesizer
|
|
146
115
|
toml-rb
|
|
147
116
|
tty-box
|
data/bin/stitches
CHANGED
|
File without changes
|
data/gemset.nix
CHANGED
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
platforms = [];
|
|
35
35
|
source = {
|
|
36
36
|
remotes = ["https://rubygems.org"];
|
|
37
|
-
sha256 = "
|
|
37
|
+
sha256 = "1z6667xiw59fwbz6hqmw8nbw07hllcl9xbqr928d9g8cpwbz1ys6";
|
|
38
38
|
type = "gem";
|
|
39
39
|
};
|
|
40
|
-
version = "1.
|
|
40
|
+
version = "1.802.0";
|
|
41
41
|
};
|
|
42
42
|
aws-sdk-core = {
|
|
43
43
|
dependencies = ["aws-eventstream" "aws-partitions" "aws-sigv4" "jmespath"];
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
platforms = [];
|
|
46
46
|
source = {
|
|
47
47
|
remotes = ["https://rubygems.org"];
|
|
48
|
-
sha256 = "
|
|
48
|
+
sha256 = "0lc3j74v49b2akyimfnsx3vsgi1i3068cpchn358l0dv27aib6c2";
|
|
49
49
|
type = "gem";
|
|
50
50
|
};
|
|
51
|
-
version = "3.
|
|
51
|
+
version = "3.180.3";
|
|
52
52
|
};
|
|
53
53
|
aws-sdk-dynamodb = {
|
|
54
54
|
dependencies = ["aws-sdk-core" "aws-sigv4"];
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
platforms = [];
|
|
57
57
|
source = {
|
|
58
58
|
remotes = ["https://rubygems.org"];
|
|
59
|
-
sha256 = "
|
|
59
|
+
sha256 = "18siyaajyd59sbfvxj16rlgfdlbdshmkqcvdsmbmd7pl88wxr0c4";
|
|
60
60
|
type = "gem";
|
|
61
61
|
};
|
|
62
|
-
version = "1.
|
|
62
|
+
version = "1.93.1";
|
|
63
63
|
};
|
|
64
64
|
aws-sigv4 = {
|
|
65
65
|
dependencies = ["aws-eventstream"];
|
|
@@ -72,25 +72,15 @@
|
|
|
72
72
|
};
|
|
73
73
|
version = "1.6.0";
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
base64 = {
|
|
76
76
|
groups = ["default" "development"];
|
|
77
77
|
platforms = [];
|
|
78
78
|
source = {
|
|
79
79
|
remotes = ["https://rubygems.org"];
|
|
80
|
-
sha256 = "
|
|
80
|
+
sha256 = "0cydk9p2cv25qysm0sn2pb97fcpz1isa7n3c8xm1gd99li8x6x8c";
|
|
81
81
|
type = "gem";
|
|
82
82
|
};
|
|
83
|
-
version = "1.
|
|
84
|
-
};
|
|
85
|
-
benchmark = {
|
|
86
|
-
groups = ["default" "development"];
|
|
87
|
-
platforms = [];
|
|
88
|
-
source = {
|
|
89
|
-
remotes = ["https://rubygems.org"];
|
|
90
|
-
sha256 = "017jh2lx3z5hqjvnqclc5bfr5q0d3zk0nqjfz73909ybr4h20kmi";
|
|
91
|
-
type = "gem";
|
|
92
|
-
};
|
|
93
|
-
version = "0.2.1";
|
|
83
|
+
version = "0.1.1";
|
|
94
84
|
};
|
|
95
85
|
citrus = {
|
|
96
86
|
groups = ["default" "production"];
|
|
@@ -112,26 +102,6 @@
|
|
|
112
102
|
};
|
|
113
103
|
version = "1.5.0";
|
|
114
104
|
};
|
|
115
|
-
e2mmap = {
|
|
116
|
-
groups = ["default" "development"];
|
|
117
|
-
platforms = [];
|
|
118
|
-
source = {
|
|
119
|
-
remotes = ["https://rubygems.org"];
|
|
120
|
-
sha256 = "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5";
|
|
121
|
-
type = "gem";
|
|
122
|
-
};
|
|
123
|
-
version = "0.1.0";
|
|
124
|
-
};
|
|
125
|
-
jaro_winkler = {
|
|
126
|
-
groups = ["default" "development"];
|
|
127
|
-
platforms = [];
|
|
128
|
-
source = {
|
|
129
|
-
remotes = ["https://rubygems.org"];
|
|
130
|
-
sha256 = "10fd3i92897blalxfkgc0jjv0qqx31v7cm7j2b6a3b97an0bfz80";
|
|
131
|
-
type = "gem";
|
|
132
|
-
};
|
|
133
|
-
version = "1.5.6";
|
|
134
|
-
};
|
|
135
105
|
jmespath = {
|
|
136
106
|
groups = ["default" "production"];
|
|
137
107
|
platforms = [];
|
|
@@ -162,28 +132,6 @@
|
|
|
162
132
|
};
|
|
163
133
|
version = "1.0.2";
|
|
164
134
|
};
|
|
165
|
-
kramdown = {
|
|
166
|
-
dependencies = ["rexml"];
|
|
167
|
-
groups = ["default" "development"];
|
|
168
|
-
platforms = [];
|
|
169
|
-
source = {
|
|
170
|
-
remotes = ["https://rubygems.org"];
|
|
171
|
-
sha256 = "1ic14hdcqxn821dvzki99zhmcy130yhv5fqfffkcf87asv5mnbmn";
|
|
172
|
-
type = "gem";
|
|
173
|
-
};
|
|
174
|
-
version = "2.4.0";
|
|
175
|
-
};
|
|
176
|
-
kramdown-parser-gfm = {
|
|
177
|
-
dependencies = ["kramdown"];
|
|
178
|
-
groups = ["default" "development"];
|
|
179
|
-
platforms = [];
|
|
180
|
-
source = {
|
|
181
|
-
remotes = ["https://rubygems.org"];
|
|
182
|
-
sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
|
|
183
|
-
type = "gem";
|
|
184
|
-
};
|
|
185
|
-
version = "1.1.0";
|
|
186
|
-
};
|
|
187
135
|
language_server-protocol = {
|
|
188
136
|
groups = ["default" "development"];
|
|
189
137
|
platforms = [];
|
|
@@ -194,17 +142,6 @@
|
|
|
194
142
|
};
|
|
195
143
|
version = "3.17.0.3";
|
|
196
144
|
};
|
|
197
|
-
nokogiri = {
|
|
198
|
-
dependencies = ["racc"];
|
|
199
|
-
groups = ["default" "development"];
|
|
200
|
-
platforms = [];
|
|
201
|
-
source = {
|
|
202
|
-
remotes = ["https://rubygems.org"];
|
|
203
|
-
sha256 = "1jw8a20a9k05fpz3q24im19b97idss3179z76yn5scc5b8lk2rl7";
|
|
204
|
-
type = "gem";
|
|
205
|
-
};
|
|
206
|
-
version = "1.15.3";
|
|
207
|
-
};
|
|
208
145
|
parallel = {
|
|
209
146
|
groups = ["default" "development"];
|
|
210
147
|
platforms = [];
|
|
@@ -267,16 +204,6 @@
|
|
|
267
204
|
};
|
|
268
205
|
version = "13.0.6";
|
|
269
206
|
};
|
|
270
|
-
rbs = {
|
|
271
|
-
groups = ["default" "development"];
|
|
272
|
-
platforms = [];
|
|
273
|
-
source = {
|
|
274
|
-
remotes = ["https://rubygems.org"];
|
|
275
|
-
sha256 = "0dgj5n7rj83981fvrhswfwsh88x42p7r00nvd80hkxmdcjvda2h6";
|
|
276
|
-
type = "gem";
|
|
277
|
-
};
|
|
278
|
-
version = "2.8.4";
|
|
279
|
-
};
|
|
280
207
|
regexp_parser = {
|
|
281
208
|
groups = ["default" "development"];
|
|
282
209
|
platforms = [];
|
|
@@ -287,26 +214,15 @@
|
|
|
287
214
|
};
|
|
288
215
|
version = "2.8.1";
|
|
289
216
|
};
|
|
290
|
-
reverse_markdown = {
|
|
291
|
-
dependencies = ["nokogiri"];
|
|
292
|
-
groups = ["default" "development"];
|
|
293
|
-
platforms = [];
|
|
294
|
-
source = {
|
|
295
|
-
remotes = ["https://rubygems.org"];
|
|
296
|
-
sha256 = "0087vhw5ik50lxvddicns01clkx800fk5v5qnrvi3b42nrk6885j";
|
|
297
|
-
type = "gem";
|
|
298
|
-
};
|
|
299
|
-
version = "2.1.1";
|
|
300
|
-
};
|
|
301
217
|
rexml = {
|
|
302
218
|
groups = ["default" "development"];
|
|
303
219
|
platforms = [];
|
|
304
220
|
source = {
|
|
305
221
|
remotes = ["https://rubygems.org"];
|
|
306
|
-
sha256 = "
|
|
222
|
+
sha256 = "05i8518ay14kjbma550mv0jm8a6di8yp5phzrd8rj44z9qnrlrp0";
|
|
307
223
|
type = "gem";
|
|
308
224
|
};
|
|
309
|
-
version = "3.2.
|
|
225
|
+
version = "3.2.6";
|
|
310
226
|
};
|
|
311
227
|
rspec = {
|
|
312
228
|
dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"];
|
|
@@ -363,15 +279,15 @@
|
|
|
363
279
|
version = "3.12.1";
|
|
364
280
|
};
|
|
365
281
|
rubocop = {
|
|
366
|
-
dependencies = ["json" "language_server-protocol" "parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"];
|
|
367
|
-
groups = ["development"];
|
|
282
|
+
dependencies = ["base64" "json" "language_server-protocol" "parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"];
|
|
283
|
+
groups = ["default" "development"];
|
|
368
284
|
platforms = [];
|
|
369
285
|
source = {
|
|
370
286
|
remotes = ["https://rubygems.org"];
|
|
371
|
-
sha256 = "
|
|
287
|
+
sha256 = "1ig23w64f9y1gi6l4pv69m0nfhn3nnr3q4s81br9vl1b1z02n5cn";
|
|
372
288
|
type = "gem";
|
|
373
289
|
};
|
|
374
|
-
version = "1.
|
|
290
|
+
version = "1.56.0";
|
|
375
291
|
};
|
|
376
292
|
rubocop-ast = {
|
|
377
293
|
dependencies = ["parser"];
|
|
@@ -423,10 +339,10 @@
|
|
|
423
339
|
platforms = [];
|
|
424
340
|
source = {
|
|
425
341
|
remotes = ["https://rubygems.org"];
|
|
426
|
-
sha256 = "
|
|
342
|
+
sha256 = "0ylwy4afnxhbrvlaf8an9nrizj78axnzggiyfcp8v531cv8six5f";
|
|
427
343
|
type = "gem";
|
|
428
344
|
};
|
|
429
|
-
version = "2.
|
|
345
|
+
version = "2.23.2";
|
|
430
346
|
};
|
|
431
347
|
ruby-progressbar = {
|
|
432
348
|
groups = ["default" "development"];
|
|
@@ -438,17 +354,6 @@
|
|
|
438
354
|
};
|
|
439
355
|
version = "1.13.0";
|
|
440
356
|
};
|
|
441
|
-
solargraph = {
|
|
442
|
-
dependencies = ["backport" "benchmark" "diff-lcs" "e2mmap" "jaro_winkler" "kramdown" "kramdown-parser-gfm" "parser" "rbs" "reverse_markdown" "rubocop" "thor" "tilt" "yard"];
|
|
443
|
-
groups = ["development"];
|
|
444
|
-
platforms = [];
|
|
445
|
-
source = {
|
|
446
|
-
remotes = ["https://rubygems.org"];
|
|
447
|
-
sha256 = "18wpma2mgw82qzf1jwjalmz7nwdvn87b22wd5yy16jb67fqgrq78";
|
|
448
|
-
type = "gem";
|
|
449
|
-
};
|
|
450
|
-
version = "0.49.0";
|
|
451
|
-
};
|
|
452
357
|
strings = {
|
|
453
358
|
dependencies = ["strings-ansi" "unicode-display_width" "unicode_utils"];
|
|
454
359
|
groups = ["default" "production"];
|
|
@@ -480,26 +385,6 @@
|
|
|
480
385
|
};
|
|
481
386
|
version = "0.0.1";
|
|
482
387
|
};
|
|
483
|
-
thor = {
|
|
484
|
-
groups = ["default" "development"];
|
|
485
|
-
platforms = [];
|
|
486
|
-
source = {
|
|
487
|
-
remotes = ["https://rubygems.org"];
|
|
488
|
-
sha256 = "0k7j2wn14h1pl4smibasw0bp66kg626drxb59z7rzflch99cd4rg";
|
|
489
|
-
type = "gem";
|
|
490
|
-
};
|
|
491
|
-
version = "1.2.2";
|
|
492
|
-
};
|
|
493
|
-
tilt = {
|
|
494
|
-
groups = ["default" "development"];
|
|
495
|
-
platforms = [];
|
|
496
|
-
source = {
|
|
497
|
-
remotes = ["https://rubygems.org"];
|
|
498
|
-
sha256 = "0bmjgbv8158klwp2r3klxjwaj93nh1sbl4xvj9wsha0ic478avz7";
|
|
499
|
-
type = "gem";
|
|
500
|
-
};
|
|
501
|
-
version = "2.2.0";
|
|
502
|
-
};
|
|
503
388
|
toml-rb = {
|
|
504
389
|
dependencies = ["citrus"];
|
|
505
390
|
groups = ["production"];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
require %(pangea/cli/subcommands/pangea)
|
|
2
2
|
require %(pangea/synthesizer/config)
|
|
3
|
+
require %(terraform-synthesizer)
|
|
3
4
|
require %(pangea/cli/config)
|
|
4
|
-
require %(json)
|
|
5
5
|
require %(aws-sdk-dynamodb)
|
|
6
6
|
require %(aws-sdk-s3)
|
|
7
|
-
require %(
|
|
7
|
+
require %(json)
|
|
8
8
|
|
|
9
9
|
class ConfigCommand < PangeaCommand
|
|
10
10
|
usage do
|
|
11
|
-
desc
|
|
11
|
+
desc %(manage configuration)
|
|
12
12
|
program %(pangea)
|
|
13
13
|
command %(config)
|
|
14
14
|
end
|
|
@@ -30,6 +30,10 @@ class ConfigCommand < PangeaCommand
|
|
|
30
30
|
HELP
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
#############################################################################
|
|
34
|
+
# helpers
|
|
35
|
+
#############################################################################
|
|
36
|
+
|
|
33
37
|
# check if dynamodb table exists
|
|
34
38
|
def table_exists?(table_name)
|
|
35
39
|
dynamodb.describe_table({ table_name: table_name })
|
|
@@ -72,6 +76,12 @@ class ConfigCommand < PangeaCommand
|
|
|
72
76
|
}
|
|
73
77
|
end
|
|
74
78
|
|
|
79
|
+
# end helpers
|
|
80
|
+
|
|
81
|
+
#####################################################################
|
|
82
|
+
# catch pangea config <subcommand>
|
|
83
|
+
#####################################################################
|
|
84
|
+
|
|
75
85
|
def run(argv)
|
|
76
86
|
case argv[1].to_s
|
|
77
87
|
when %(show)
|
|
@@ -95,9 +105,6 @@ class ConfigCommand < PangeaCommand
|
|
|
95
105
|
module_dirs = %w[lib src test]
|
|
96
106
|
modules = ctx[:modules]
|
|
97
107
|
|
|
98
|
-
puts "modules:"
|
|
99
|
-
puts JSON.pretty_generate(modules)
|
|
100
|
-
|
|
101
108
|
modules.each_key do |mod_name|
|
|
102
109
|
this_mod = modules[mod_name]
|
|
103
110
|
|
|
@@ -108,8 +115,6 @@ class ConfigCommand < PangeaCommand
|
|
|
108
115
|
|
|
109
116
|
lib_dir = File.join(this_mod[:path], %(lib))
|
|
110
117
|
lib_files = Dir.glob(File.join(this_mod[:path], %(lib), %(**/*.rb)))
|
|
111
|
-
puts lib_dir
|
|
112
|
-
puts lib_files
|
|
113
118
|
|
|
114
119
|
system(%(mkdir -p #{lib_dir})) unless Dir.exist?(lib_dir)
|
|
115
120
|
|
|
@@ -130,8 +135,6 @@ class ConfigCommand < PangeaCommand
|
|
|
130
135
|
|
|
131
136
|
src_dir = File.join(this_mod[:path], %(src))
|
|
132
137
|
src_files = Dir.glob(File.join(src_dir, %(**/*.rb)))
|
|
133
|
-
puts src_dir
|
|
134
|
-
puts src_files
|
|
135
138
|
|
|
136
139
|
system(%(mkdir -p #{src_dir})) unless Dir.exist?(src_dir)
|
|
137
140
|
|
|
@@ -149,6 +152,11 @@ class ConfigCommand < PangeaCommand
|
|
|
149
152
|
|
|
150
153
|
config[:namespace].each_key do |ns_name|
|
|
151
154
|
ns = config[:namespace][ns_name]
|
|
155
|
+
|
|
156
|
+
#####################################################################
|
|
157
|
+
# process namespaces in configuraton
|
|
158
|
+
#####################################################################
|
|
159
|
+
|
|
152
160
|
ns.each_key do |ctx_name|
|
|
153
161
|
ctx = ns[ctx_name]
|
|
154
162
|
next unless ctx[:state_config][:terraform][:s3]
|
|
@@ -175,10 +183,11 @@ class ConfigCommand < PangeaCommand
|
|
|
175
183
|
###################################################################
|
|
176
184
|
# s3 bucket setup
|
|
177
185
|
###################################################################
|
|
186
|
+
|
|
178
187
|
bucket_name =
|
|
179
188
|
ctx[:state_config][:terraform][:s3][:bucket]
|
|
180
189
|
if bucket_exist?(bucket_name)
|
|
181
|
-
|
|
190
|
+
nil
|
|
182
191
|
else
|
|
183
192
|
s3.create_bucket(bucket: bucket_name)
|
|
184
193
|
end
|
|
@@ -198,7 +207,11 @@ class ConfigCommand < PangeaCommand
|
|
|
198
207
|
|
|
199
208
|
# end setup directories
|
|
200
209
|
end
|
|
210
|
+
|
|
211
|
+
# end process namespaces in configuraton
|
|
201
212
|
end
|
|
202
213
|
end
|
|
203
214
|
end
|
|
215
|
+
|
|
216
|
+
# end catch pangea config <subcommand>
|
|
204
217
|
end
|
|
@@ -7,6 +7,7 @@ require %(pangea/errors/project_not_found_error)
|
|
|
7
7
|
require %(pangea/errors/no_infra_target_error)
|
|
8
8
|
require %(pangea/errors/incorrect_subcommand_error)
|
|
9
9
|
require %(pangea/say/init)
|
|
10
|
+
require %(pangea/modules)
|
|
10
11
|
require %(terraform-synthesizer)
|
|
11
12
|
require %(json)
|
|
12
13
|
|
|
@@ -25,10 +26,11 @@ class InfraCommand < PangeaCommand
|
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
argument :target do
|
|
28
|
-
desc %(target like ${namespace}.${site}
|
|
29
|
+
desc %(target like ${namespace}.${site})
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
def run(argv)
|
|
33
|
+
Say.terminal %(planning!)
|
|
32
34
|
parse(argv)
|
|
33
35
|
|
|
34
36
|
# grab a config synth
|
|
@@ -40,12 +42,38 @@ class InfraCommand < PangeaCommand
|
|
|
40
42
|
exit
|
|
41
43
|
end
|
|
42
44
|
|
|
45
|
+
Say.terminal JSON.pretty_generate(cfg_synth)
|
|
46
|
+
|
|
43
47
|
# preflight checks for the command execution
|
|
44
|
-
check_run
|
|
45
|
-
check_target(params[:target], cfg_synth)
|
|
48
|
+
# check_run
|
|
49
|
+
# check_target(params[:target], cfg_synth)
|
|
50
|
+
|
|
51
|
+
# targets = params[:target].split('.').map(&:to_sym)
|
|
52
|
+
# process_target(targets, cfg_synth)
|
|
53
|
+
|
|
54
|
+
###########################################################################
|
|
55
|
+
# modules
|
|
56
|
+
# modules can be fetched from git or local path
|
|
57
|
+
# modules can have a virtual environment to execute in
|
|
58
|
+
###########################################################################
|
|
59
|
+
|
|
60
|
+
namespaces = cfg_synth[:namespace].keys.map(&:to_sym)
|
|
61
|
+
|
|
62
|
+
namespaces.each do |namespace_name|
|
|
63
|
+
namespace = cfg_synth[:namespace][namespace_name]
|
|
64
|
+
context_names = namespace.keys.map(&:to_sym)
|
|
65
|
+
|
|
66
|
+
context_names.each do |cn|
|
|
67
|
+
context = namespace[cn]
|
|
68
|
+
modules = context[:modules]
|
|
69
|
+
|
|
70
|
+
modules.each do |mod|
|
|
71
|
+
PangeaModule.process(mod)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
46
75
|
|
|
47
|
-
|
|
48
|
-
process_target(targets, cfg_synth)
|
|
76
|
+
###########################################################################
|
|
49
77
|
|
|
50
78
|
# provide some kind of default exit of the command execution
|
|
51
79
|
exit
|
|
@@ -146,50 +174,49 @@ class InfraCommand < PangeaCommand
|
|
|
146
174
|
# targets can be...
|
|
147
175
|
# ${namespace}
|
|
148
176
|
# ${namespace}.${site}
|
|
149
|
-
# ${namespace}.${site}.${project}
|
|
150
177
|
def check_target(target, config)
|
|
151
|
-
raise NamespaceNotFoundError if target.nil?
|
|
152
|
-
|
|
153
|
-
targets = target.split('.').map(&:to_sym)
|
|
154
|
-
namespaces = config[:namespace].keys.map(&:to_sym)
|
|
155
|
-
runtype = nil
|
|
156
|
-
environments = []
|
|
157
|
-
|
|
158
|
-
namespaces.each do |ns_name|
|
|
159
|
-
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
raise NamespaceNotFoundError unless namespaces.include?(targets[0])
|
|
163
|
-
|
|
164
|
-
namespaces.each do |ns_name|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
end
|
|
178
|
+
# raise NamespaceNotFoundError if target.nil?
|
|
179
|
+
|
|
180
|
+
# targets = target.split('.').map(&:to_sym)
|
|
181
|
+
# namespaces = config[:namespace].keys.map(&:to_sym)
|
|
182
|
+
# runtype = nil
|
|
183
|
+
# environments = []
|
|
184
|
+
|
|
185
|
+
# namespaces.each do |ns_name|
|
|
186
|
+
# environments.concat(config[:namespace][ns_name].keys.map(&:to_sym))
|
|
187
|
+
# end
|
|
188
|
+
|
|
189
|
+
# raise NamespaceNotFoundError unless namespaces.include?(targets[0])
|
|
190
|
+
|
|
191
|
+
# namespaces.each do |ns_name|
|
|
192
|
+
# environments.each do |e_name|
|
|
193
|
+
# sites = config[:namespace][ns_name][e_name][:sites] || []
|
|
194
|
+
#
|
|
195
|
+
# next if sites.empty?
|
|
196
|
+
#
|
|
197
|
+
# site_names = []
|
|
198
|
+
# sites.each do |site|
|
|
199
|
+
# site_names << site[:name]
|
|
200
|
+
# end
|
|
201
|
+
#
|
|
202
|
+
# raise SiteNotFoundError unless site_names.include?(targets[1].to_sym)
|
|
203
|
+
#
|
|
204
|
+
# projects = config[:namespace][ns_name][e_name][:projects] || []
|
|
205
|
+
#
|
|
206
|
+
# next if projects.empty?
|
|
207
|
+
#
|
|
208
|
+
# project_names = []
|
|
209
|
+
# projects.each do |project|
|
|
210
|
+
# project_names << project[:name]
|
|
211
|
+
# end
|
|
212
|
+
#
|
|
213
|
+
# raise ProjectNotFoundError \
|
|
214
|
+
# unless project_names
|
|
215
|
+
# .include?(
|
|
216
|
+
# targets[2].to_sym
|
|
217
|
+
# )
|
|
218
|
+
# end
|
|
219
|
+
# end
|
|
193
220
|
end
|
|
194
221
|
|
|
195
222
|
def check_run
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# modules
|
|
3
|
+
# module for handling pangea modules
|
|
4
|
+
# pangea modules are execution units
|
|
5
|
+
# for terraform code.
|
|
6
|
+
###############################################################################
|
|
7
|
+
|
|
8
|
+
module PangeaBase
|
|
9
|
+
BASE_DIR = File.join(
|
|
10
|
+
Dir.home,
|
|
11
|
+
%(.pangea)
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
module PangeaRbenv
|
|
16
|
+
include PangeaBase
|
|
17
|
+
|
|
18
|
+
BIN = %(rbenv).freeze
|
|
19
|
+
|
|
20
|
+
RBENV_DIR = File.join(
|
|
21
|
+
BASE_DIR,
|
|
22
|
+
%(rbenv)
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
VERSIONS_DIR = File.join(
|
|
26
|
+
RBENV_DIR,
|
|
27
|
+
%(versions)
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
class << self
|
|
31
|
+
def rbenv_installed?
|
|
32
|
+
`which rbenv`.strip != ''
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def rbenv_install(_version)
|
|
36
|
+
system %(mkdir -p #{VERSIONS_DIR}) unless Dir.exist?(VERSIONS_DIR)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
module PangeaModule
|
|
42
|
+
include PangeaBase
|
|
43
|
+
|
|
44
|
+
CACHE_DIR = File.join(
|
|
45
|
+
BASE_DIR,
|
|
46
|
+
%(cache)
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
RUBIES_DIR = File.join(
|
|
50
|
+
BASE_DIR,
|
|
51
|
+
%(rubies)
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
RUBIES_DIR = File.join(
|
|
55
|
+
BASE_DIR,
|
|
56
|
+
%(rubies)
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
SECTIONS = %i[
|
|
60
|
+
lib
|
|
61
|
+
src
|
|
62
|
+
].freeze
|
|
63
|
+
|
|
64
|
+
class << self
|
|
65
|
+
# entrypoint for module processing
|
|
66
|
+
def process(mod)
|
|
67
|
+
exit 1 unless mod.fetch(:sandboxed, false)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# end modules
|
data/lib/pangea/version.rb
CHANGED
data/lib/pangea.rb
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# non-cli top level commands
|
|
3
|
+
###############################################################################
|
|
4
|
+
|
|
5
|
+
module Pangea
|
|
6
|
+
class << self
|
|
7
|
+
def ping
|
|
8
|
+
%(pong)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pangea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.32
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- drzthslnt@gmail.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubocop-rspec
|
|
@@ -288,6 +288,7 @@ files:
|
|
|
288
288
|
- flake.lock
|
|
289
289
|
- flake.nix
|
|
290
290
|
- gemset.nix
|
|
291
|
+
- lib/pangea.rb
|
|
291
292
|
- lib/pangea/cli.rb
|
|
292
293
|
- lib/pangea/cli/config.rb
|
|
293
294
|
- lib/pangea/cli/constants.rb
|
|
@@ -302,6 +303,7 @@ files:
|
|
|
302
303
|
- lib/pangea/errors/project_not_found_error.rb
|
|
303
304
|
- lib/pangea/errors/site_not_found_error.rb
|
|
304
305
|
- lib/pangea/log/init.rb
|
|
306
|
+
- lib/pangea/modules.rb
|
|
305
307
|
- lib/pangea/say/init.rb
|
|
306
308
|
- lib/pangea/shell/README.md
|
|
307
309
|
- lib/pangea/shell/terraform.rb
|
|
@@ -315,6 +317,7 @@ files:
|
|
|
315
317
|
- pangea.gemspec
|
|
316
318
|
- pangea.rb
|
|
317
319
|
- spec/cli/config_spec.rb
|
|
320
|
+
- spec/modules_spec.rb
|
|
318
321
|
- spec/synthesizer/config_spec.rb
|
|
319
322
|
homepage: https://github.com/drzln/pangea
|
|
320
323
|
licenses:
|