nexoform 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/nexoform +34 -2
- data/lib/nexoform/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 780f35d4f1af069004f3a37547f6d5c4dd0e629c80646eccf88dd60fe3cb6454
|
4
|
+
data.tar.gz: 232eed045be457621c64406f82d4af5662396f7692124dc306bd574615838700
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5a764f74fead9a76e5be271323c16370d769af2eb78347125f8b0f55739949988344c5f783643e84c213c745690c028113e435c24474414dcecc714c87e0c9b
|
7
|
+
data.tar.gz: 91f58b6fd91bd74a31ad52b34d36cdba93beb0fcfb5eb2e6041f837512830b90f28090d2a0c4f09e48fe2dc53c9142ef49a298eba98aa40987887f74da2d35fe
|
data/bin/nexoform
CHANGED
@@ -148,6 +148,27 @@ class NexoformBin < Thor
|
|
148
148
|
exec_generate(options)
|
149
149
|
end
|
150
150
|
|
151
|
+
desc 'init', 'Generate the raw terraform files for the environment and run terraform init on them'
|
152
|
+
long_desc <<-LONGDESC
|
153
|
+
Generates the raw terraform files for the specified (or default) environment
|
154
|
+
and runs terraform init on them.
|
155
|
+
|
156
|
+
> $ nexoform init -e [environment]
|
157
|
+
LONGDESC
|
158
|
+
def init
|
159
|
+
exec_init(options)
|
160
|
+
end
|
161
|
+
|
162
|
+
desc 'clean', 'Cleans up generated terraform files for the environment'
|
163
|
+
long_desc <<-LONGDESC
|
164
|
+
Cleans up generated terraform files for the specified (or default) environment
|
165
|
+
|
166
|
+
> $ nexoform clean -e [environment]
|
167
|
+
LONGDESC
|
168
|
+
def clean
|
169
|
+
exec_clean(options)
|
170
|
+
end
|
171
|
+
|
151
172
|
private
|
152
173
|
|
153
174
|
def print_next_color(str)
|
@@ -339,6 +360,17 @@ class NexoformBin < Thor
|
|
339
360
|
execute('terraform output')
|
340
361
|
end
|
341
362
|
|
363
|
+
def exec_init(options)
|
364
|
+
sanity_check(options)
|
365
|
+
generate_files(options, chdir: true) if has_erb_files?
|
366
|
+
run_init(options)
|
367
|
+
end
|
368
|
+
|
369
|
+
def exec_clean(options)
|
370
|
+
sanity_check(options)
|
371
|
+
clean_output_dir(options, mkdir: false)
|
372
|
+
end
|
373
|
+
|
342
374
|
def exec_apply(options)
|
343
375
|
sanity_check(options)
|
344
376
|
generate_files(options, chdir: true) if has_erb_files? && !options[:plan]
|
@@ -550,12 +582,12 @@ class NexoformBin < Thor
|
|
550
582
|
set_working_dir(options) if chdir
|
551
583
|
end
|
552
584
|
|
553
|
-
def clean_output_dir(options)
|
585
|
+
def clean_output_dir(options, mkdir: true)
|
554
586
|
od = output_dir(options)
|
555
587
|
if Dir.exist?(od)
|
556
588
|
FileUtils.remove_dir(od)
|
557
589
|
end
|
558
|
-
FileUtils.mkdir_p(od)
|
590
|
+
FileUtils.mkdir_p(od) if mkdir
|
559
591
|
end
|
560
592
|
|
561
593
|
def output_dir(options)
|
data/lib/nexoform/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexoform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|