sfn 0.3.2 → 0.3.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69dfa18182936f431c28d80ce5fa6fbbc356b006
4
- data.tar.gz: 5f7cff254502ffaef0a89e3fa0dc005f68a6aa93
3
+ metadata.gz: 1a11a729564c226c7461f7c37587e3a9150d0023
4
+ data.tar.gz: 8a6cecbf6cd336cacf588f9d0727d4118cd9b6b1
5
5
  SHA512:
6
- metadata.gz: 34e785122c57f3e05bd498a533dec705026556159c52077967f49cb3058da52cf62f793f10e72d1e202b70ffad7b510154b56f6bb8adf0190bd1a0f558a8b5f7
7
- data.tar.gz: 96ec84db44330109ef9b046e0dcd9afa25a5dc9c291e93bad36257b191aed6b6c6a26099c73a0b62061f11d203621e7fab26f4e5f9f99b07be12d381e12e0004
6
+ metadata.gz: fac9b75692ced44867ea3e803a38050c2d696960415fd0e2f4f68437b23f033d9601bea49d37f1b6fbaf678fd29fcc631ab223609a3a9cb96aa47eb90449989e
7
+ data.tar.gz: 60e0d51439863aef941212d246c03f66612b5ec8b0f4f0a22404f98036b021159543fb5778d9c1d4c3badf8766fb2733197e5256d54454c62c462a4a43783e25
@@ -1,3 +1,11 @@
1
+ ## v0.3.4
2
+ * Default column widths when no output is available
3
+ * Display stack tags on `describe` command
4
+ * Fix apply stack reference to access via hash
5
+ * Validate stack is in `:create_complete` state when checking successful creation
6
+ * Fix path prompting (#5 thanks @JonathanSerafini)
7
+ * Update minimum CLI lib dependency to provide correct configuration merging (#4)
8
+
1
9
  ## v0.3.2
2
10
  * Validate stack name prior to discovery on apply
3
11
  * Update configuration usage to allow runtime modification
@@ -75,7 +75,7 @@ module Sfn
75
75
  poll_stack(stack.name)
76
76
  stack = provider.connection.stacks.get(name)
77
77
 
78
- if(stack.reload.success?)
78
+ if(stack.reload.state == :create_complete)
79
79
  ui.info "Stack create complete: #{ui.color('SUCCESS', :green)}"
80
80
  namespace.const_get(:Describe).new({:outputs => true}, [name]).execute!
81
81
  else
@@ -9,7 +9,7 @@ module Sfn
9
9
 
10
10
  # information available
11
11
  unless(defined?(AVAILABLE_DISPLAYS))
12
- AVAILABLE_DISPLAYS = [:resources, :outputs]
12
+ AVAILABLE_DISPLAYS = [:resources, :outputs, :tags]
13
13
  end
14
14
 
15
15
  # Run the stack describe action
@@ -77,6 +77,20 @@ module Sfn
77
77
  end
78
78
  end
79
79
 
80
+ # Display tags
81
+ #
82
+ # @param stack [Miasma::Models::Orchestration::Stack]
83
+ def tags(stack)
84
+ ui.info "Tags for stack: #{ui.color(stack.name, :bold)}"
85
+ unless(stack.tags.empty?)
86
+ stack.tags.each do |key, value|
87
+ ui.info [' ', ui.color("#{key}:", :bold), value].join(' ')
88
+ end
89
+ else
90
+ ui.info " #{ui.color('No tags found')}"
91
+ end
92
+ end
93
+
80
94
  # @return [Array<String>] default attributes
81
95
  def default_attributes
82
96
  %w(updated logical_id type status status_reason)
@@ -14,7 +14,7 @@ module Sfn
14
14
  stacks = get_stacks
15
15
  row(:header => true) do
16
16
  allowed_attributes.each do |attr|
17
- column attr.split('_').map(&:capitalize).join(' '), :width => stacks.map{|s| s[attr].to_s.length}.max + 2
17
+ column attr.split('_').map(&:capitalize).join(' '), :width => (stacks.map{|s| s[attr].to_s.length}.max || 20) + 2
18
18
  end
19
19
  end
20
20
  get_stacks.each do |stack|
@@ -74,7 +74,7 @@ module Sfn
74
74
  # @param action [String] create or update
75
75
  # @return [TrueClass]
76
76
  def unpack_nesting(name, file, action)
77
- config.apply_stacks ||= []
77
+ config[:apply_stacks] ||= []
78
78
  stack_count = 0
79
79
  file['Resources'].each do |stack_resource_name, stack_resource|
80
80
 
@@ -14,6 +14,11 @@ module Sfn
14
14
  :description => 'Display stack outputs'
15
15
  )
16
16
 
17
+ attribute(
18
+ :tags, [TrueClass, FalseClass],
19
+ :description => 'Display stack tags'
20
+ )
21
+
17
22
  end
18
23
  end
19
24
  end
@@ -79,7 +79,7 @@ module Sfn
79
79
  end
80
80
  end
81
81
  ui.info "#{output.join("\n")}\n"
82
- response = ask_question('Enter selection: ').to_i
82
+ response = ui.ask_question('Enter selection: ').to_i
83
83
  unless(valid[response])
84
84
  ui.fatal 'How about using a real value'
85
85
  exit 1
@@ -1,4 +1,4 @@
1
1
  module Sfn
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.3.2')
3
+ VERSION = Gem::Version.new('0.3.4')
4
4
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = 'SparkleFormation CLI'
11
11
  s.license = 'Apache-2.0'
12
12
  s.require_path = 'lib'
13
- s.add_dependency 'bogo-cli', '~> 0.1.12'
13
+ s.add_dependency 'bogo-cli', '~> 0.1.14'
14
14
  s.add_dependency 'miasma'
15
15
  s.add_dependency 'net-ssh'
16
16
  s.add_dependency 'sparkle_formation', '>= 0.2.8'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-07 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogo-cli
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.12
19
+ version: 0.1.14
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.12
26
+ version: 0.1.14
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: miasma
29
29
  requirement: !ruby/object:Gem::Requirement