domed-city 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67373aa5975c98fd857ea4859e44f2fe10117fca
4
- data.tar.gz: b65e596b729abbf3c8943c033be9fc7839bc8da5
3
+ metadata.gz: 1d99c9f67b0cb764bb7b36761a2c4e90c915ee94
4
+ data.tar.gz: 6aa2c3609ab8f1b88608a2cdcdd668ea9276926d
5
5
  SHA512:
6
- metadata.gz: bd6c4e608b28914aad3e67048452f3fd059508e419b11d5d413c0a63f8836cb952b7943c407362f69da7efc87baee84d307bd0f7895e6743787703b3ffb9450c
7
- data.tar.gz: 2ac30edb586186cf99415900c16eaa869596ddc84aa1a262f22eea234a4603c69ea2f4daac3e5de4a4cac3355c686ca76ba44963ac6aab0af8206a6b5358f2cc
6
+ metadata.gz: b2ac36eef13ea7f05b2ae00261a28b9a1b293f479520c8dfd8c8e481ee1d6f10d56f6733300bf24c56ea50437f6170c677c569ada06622ec87e655e157100b66
7
+ data.tar.gz: e177fe3a851dc0ba125653745154e66aebf2e82f2d264ef15f0e5971c914b4553be6d63e8093980f52096e1d1d3392604396bd78db89c348f66a0d2a42295f6c
data/README.md CHANGED
@@ -31,10 +31,10 @@ gem 'domed-city'
31
31
 
32
32
  ## Usage
33
33
 
34
- For ease of use, type `dome` in the CLI:
34
+ For ease of use, type `bundle exec dome` (you may get some warnings if you do not use `bundle exec`) in the CLI:
35
35
 
36
36
  ```
37
- $ dome
37
+ $ bundle exec dome
38
38
 
39
39
  Dome wraps the Terraform API and performs useful stuff.
40
40
 
data/bin/dome CHANGED
@@ -17,25 +17,22 @@ EOS
17
17
  opt :apply, 'Applies a Terraform plan'
18
18
  opt :plan_destroy, 'Creates a destructive Terraform plan'
19
19
  opt :state, 'Synchronises the Terraform state'
20
+ opt :output, 'Print all Terraform output variables'
20
21
  end
21
22
 
22
- # TODO: hopefully we can flip this logic to DRY it up
23
+ Trollop.educate unless opts.has_value?(true)
24
+
25
+ @dome = Dome::Terraform.new
26
+ @dome.validate_environment
27
+
23
28
  if opts[:plan]
24
- @dome = Dome::Terraform.new
25
- @dome.validate_environment
26
29
  @dome.plan
27
30
  elsif opts[:apply]
28
- @dome = Dome::Terraform.new
29
- @dome.validate_environment
30
31
  @dome.apply
31
32
  elsif opts[:plan_destroy]
32
- @dome = Dome::Terraform.new
33
- @dome.validate_environment
34
33
  @dome.plan_destroy
35
34
  elsif opts[:state]
36
- @dome = Dome::Terraform.new
37
- @dome.validate_environment
38
35
  @dome.state.s3_state
39
- else
40
- Trollop.educate
36
+ elsif opts[:output]
37
+ @dome.output
41
38
  end
@@ -16,7 +16,7 @@ module Dome
16
16
  end
17
17
 
18
18
  def non_production_environments
19
- %w(infradev sit qa stg)
19
+ %w(infradev sit qa qa1 qa2 stg)
20
20
  end
21
21
 
22
22
  def production_environments
@@ -72,5 +72,11 @@ module Dome
72
72
  failure_message = 'something went wrong when pulling remote TF modules'
73
73
  execute_command(command, failure_message)
74
74
  end
75
+
76
+ def output
77
+ command = 'terraform output'
78
+ failure_message = 'something went wrong when printing TF output variables'
79
+ execute_command(command, failure_message)
80
+ end
75
81
  end
76
82
  end
data/lib/dome/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dome
2
- VERSION = '1.2.1'
2
+ VERSION = '1.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domed-city
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Snape
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler