nexoform 0.0.1 → 0.0.2

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 +39 -22
  3. data/lib/nexoform/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be5988ba5a83aaf424f2d9f8b0164f738d87daca
4
- data.tar.gz: ea0eb52b1ee24f85b886f66dd5d9c2fe073ee7e8
3
+ metadata.gz: 235d3949df2a548cbdeb011cb174b77319ac8823
4
+ data.tar.gz: 020a865bbe63ac73dc3b65a35f73dc663194cfc3
5
5
  SHA512:
6
- metadata.gz: f51b9ec53e05106619663d190710fd741ee43f6fabf8daa45d45ab5c294c88b71231ce3d89bb00d3e8787c9e58b501520c83461e93098bf75b1bbca5fbbfdb7b
7
- data.tar.gz: b4b7623970dd7dfc6db14e3f3dc2bad2b5808fbaba6bfc65f00a9dfb1a65eb996a1797b5ff3b9a81697181b9d285d746ddee876a9d05add42eb3019a1a4f07ed
6
+ metadata.gz: 154cf0ca5348c61aa7b7a47cfb46fe91441ca5af59404cc6e94bc3d3061c2f1d1949d98dbbe9908936b093ec87826d2b96fa2f66101d6bf9ba8d574718096f28
7
+ data.tar.gz: 7ead5faf89db2b3113a52d25477b866abf6826c9f7ec780647348c1ddecb4709d2831159df4ec065c663a18068d7c342127364f04590a8654dc0bd75b5cb2738
data/bin/nexoform CHANGED
@@ -17,29 +17,21 @@ def default_plan_filename
17
17
  'nexoform.tfplan'
18
18
  end
19
19
 
20
+ # Temporary fix for https://github.com/erikhuda/thor/issues/398
21
+ class Thor
22
+ module Shell
23
+ class Basic
24
+ def print_wrapped(message, options = {})
25
+ stdout.puts message
26
+ end
27
+ end
28
+ end
29
+ end
30
+
20
31
  class NexoformBin < Thor
21
32
  class_option :environment, type: :string, aliases: 'e', required: false
22
33
  class_option :assume_yes, type: :boolean, aliases: 'y', default: false
23
34
 
24
- desc 'apply', 'Apply changes (Runs a terraform apply)'
25
- long_desc <<-LONGDESC
26
- Applies any applicable changes. Under the hood, this
27
- command runs a terraform apply.
28
-
29
- If you pass --plan, the specified file will be used for the plan
30
- If you pass --noplan, no plan file will be used
31
- If you don't pass either, no plan file will be used unless the default
32
- is present. If it is, you'll be prompted about using it
33
-
34
- > $ nexoform apply --environment 'dev' [--plan=#{default_plan_filename}]
35
- LONGDESC
36
- option :plan, type: :string, aliases: 'p', required: false
37
- option :noplan, type: :boolean, aliases: 'n', default: false
38
- option :overwrite, type: :boolean, required: false
39
- def apply
40
- exec_apply(options)
41
- end
42
-
43
35
  desc 'plan', 'Print out changes that will be made on next apply (runs a terraform plan)'
44
36
  long_desc <<-LONGDESC
45
37
  Prints out any changes that will be made the next time
@@ -51,20 +43,45 @@ class NexoformBin < Thor
51
43
  If you pass '--nosave' or '-n' the plan will not be saved
52
44
  If you pass none of those, you'll be prompted about saving the plan
53
45
 
54
- > $ nexoform plan --environment 'dev' [--save] [--out='#{default_plan_filename}']
46
+ > $ nexoform plan
47
+ > $ nexoform plan --environment 'dev'
48
+ > $ nexoform plan --environment 'dev' --save --overwrite
49
+ > $ nexoform plan --environment 'dev' --out='#{default_plan_filename}'
55
50
  LONGDESC
56
51
  option :out, type: :string, aliases: 'o', required: false
57
52
  option :save, type: :boolean, aliases: 's', required: false
58
53
  option :nosave, type: :boolean, aliases: 'n', required: false
59
- option :overwrite, type: :boolean, required: false
54
+ option :overwrite, type: :boolean, aliases: 'w', required: false
60
55
  def plan
61
56
  exec_plan(options)
62
57
  end
63
58
 
59
+ desc 'apply', 'Apply changes (Runs a terraform apply)'
60
+ long_desc <<-LONGDESC
61
+ Applies any applicable changes. Under the hood, this command runs a
62
+ terraform apply.
63
+
64
+ If you pass --plan, the specified file will be used for the plan
65
+ If you pass --noplan, no plan file will be used
66
+ If you don't pass either, no plan file will be used unless the default
67
+ is present. If it is, you'll be prompted about using it
68
+
69
+ > $ nexoform apply
70
+ > $ nexoform apply --environment 'dev'
71
+ > $ nexoform apply --environment 'dev' --noplan
72
+ > $ nexoform apply --environment 'dev' --plan=#{default_plan_filename}
73
+ LONGDESC
74
+ option :plan, type: :string, aliases: 'p', required: false
75
+ option :noplan, type: :boolean, aliases: 'n', default: false
76
+ def apply
77
+ exec_apply(options)
78
+ end
79
+
64
80
  desc 'destroy', 'Destroy all provisioned resources (runs a terraform destroy)'
65
81
  long_desc <<-LONGDESC
66
82
  Destroys any resources that have been provisioned
67
83
 
84
+ > $ nexoform destroy
68
85
  > $ nexoform destroy --environment 'dev'
69
86
  LONGDESC
70
87
  def destroy
@@ -96,7 +113,7 @@ class NexoformBin < Thor
96
113
  LONGDESC
97
114
  option :force, type: :boolean, aliases: 'f', default: false
98
115
  option :upgrade, type: :boolean, aliases: 'u', default: false
99
- option :'project-name', type: :string, aliases: 'c', required: false
116
+ option :'project-name', type: :string, aliases: 'p', required: false
100
117
  def config_file
101
118
  exec_config_file(options)
102
119
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Nexoform
4
4
  def self.version
5
- '0.0.1'
5
+ '0.0.2'
6
6
  end
7
7
 
8
8
  def self.date
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexoform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Porter