nexoform 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/nexoform +34 -2
  3. data/lib/nexoform/version.rb +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8317eca0ca981b99412bf1782be8c0c827b0a279f6a08eeb24e58e4b409e616
4
- data.tar.gz: a9743e23117edfd20dd61c6a9a05c1c6aa0cedddf6576a58aaf2f01d48cced78
3
+ metadata.gz: 780f35d4f1af069004f3a37547f6d5c4dd0e629c80646eccf88dd60fe3cb6454
4
+ data.tar.gz: 232eed045be457621c64406f82d4af5662396f7692124dc306bd574615838700
5
5
  SHA512:
6
- metadata.gz: 43222a947970924c59b689d1d6c8bb07db56eddeec580c55f0e27f87c2081f4a1678ab1008dd6f5f8de3952e54a9bc0f61aaf094e8d71dba6615ec51587f5fdf
7
- data.tar.gz: 3278c9d384e8891080ef0662e33747a003e85e11395587068667dddb4bc149972b6cdf99002a7b353134dc4b6cb9b261a4807adcd689193f24aeb0d3870cbc44
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)
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Nexoform
4
4
  def self.version
5
- '0.1.2'
5
+ '0.1.3'
6
6
  end
7
7
 
8
8
  def self.date
9
- '2019-07-25'
9
+ '2019-09-26'
10
10
  end
11
11
  end
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.2
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-07-25 00:00:00.000000000 Z
11
+ date: 2019-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport