sfn 0.3.6 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/sfn/command/create.rb +7 -3
- data/lib/sfn/command/inspect.rb +21 -19
- data/lib/sfn/command/update.rb +1 -1
- data/lib/sfn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd51de01219d49eab04ff9c65a559496d12af4e
|
4
|
+
data.tar.gz: 54531dc80ac6f15fe3c712449533e74ea6c2706f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8fd31d72271d235c0e2a267cb0f978a95a61f0182cdebfed3e2e763efaa6a4222ab62c02d75e4544b8556f9a6dd5d941f120ffab01aa7b2743cc5996eb977f9
|
7
|
+
data.tar.gz: 4355c6cd7c2c75537c3c120bf5a961e1cd46e6483c3101ba144b12e2bcd0d273458300d8b2e3def53f10712fd93cdf5e67ec6907d04133eea6341da4790df3a0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## v0.3.8
|
2
|
+
* Fix result output from `update` command (#9)
|
3
|
+
* Fix `inspect` command to properly support multiple attribute flags
|
4
|
+
* Only output JSON when using `--print-only` flag with `create` command (#10)
|
5
|
+
|
1
6
|
## v0.3.6
|
2
7
|
* Set options correctly on `sfn` executable (#7)
|
3
8
|
* Update cli library dependency to provide better error messages (#6)
|
data/lib/sfn/command/create.rb
CHANGED
@@ -24,7 +24,11 @@ module Sfn
|
|
24
24
|
file = load_template_file
|
25
25
|
nested_stacks_unpack = file.delete('sfn_nested_stack')
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
|
+
unless(config[:print_only])
|
29
|
+
ui.info "#{ui.color('Cloud Formation:', :bold)} #{ui.color('create', :green)}"
|
30
|
+
end
|
31
|
+
|
28
32
|
stack_info = "#{ui.color('Name:', :bold)} #{name}"
|
29
33
|
if(config[:path])
|
30
34
|
stack_info << " #{ui.color('Path:', :bold)} #{config[:file]}"
|
@@ -39,7 +43,7 @@ module Sfn
|
|
39
43
|
else
|
40
44
|
|
41
45
|
if(config[:print_only] && !config[:apply_stacks])
|
42
|
-
ui.
|
46
|
+
ui.puts _format_json(
|
43
47
|
translate_template(
|
44
48
|
Sfn::Utils::StackParameterScrubber.scrub!(file)
|
45
49
|
)
|
@@ -58,7 +62,7 @@ module Sfn
|
|
58
62
|
stack.template = Sfn::Utils::StackParameterScrubber.scrub!(stack.template)
|
59
63
|
|
60
64
|
if(config[:print_only])
|
61
|
-
ui.
|
65
|
+
ui.puts _format_json(translate_template(stack.template))
|
62
66
|
return
|
63
67
|
end
|
64
68
|
|
data/lib/sfn/command/inspect.rb
CHANGED
@@ -90,29 +90,31 @@ module Sfn
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def display_attribute(stack)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
args
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
if(
|
101
|
-
|
93
|
+
[config[:attribute]].flatten.compact.each do |stack_attribute|
|
94
|
+
attr = stack_attribute.split('.').inject(stack) do |memo, key|
|
95
|
+
args = key.scan(/\(([^)]*)\)/).flatten.first.to_s
|
96
|
+
if(args)
|
97
|
+
args = args.split(',').map{|a| a.to_i.to_s == a ? a.to_i : a}
|
98
|
+
key = key.split('(').first
|
99
|
+
end
|
100
|
+
if(memo.public_methods.include?(key.to_sym))
|
101
|
+
if(args.size == 1 && args.first.to_s.start_with?('&'))
|
102
|
+
memo.send(key, &args.first.slice(2, args.first.size).to_sym)
|
103
|
+
else
|
104
|
+
memo.send(*[key, args].flatten.compact)
|
105
|
+
end
|
102
106
|
else
|
103
|
-
memo.
|
107
|
+
raise NoMethodError.new "Invalid attribute requested! (#{memo.class}##{key})"
|
104
108
|
end
|
105
|
-
else
|
106
|
-
raise NoMethodError.new "Invalid attribute requested! (#{memo.class}##{key})"
|
107
109
|
end
|
110
|
+
ui.info " Attribute Lookup -> #{config[:attribute]}:"
|
111
|
+
ui.puts MultiJson.dump(
|
112
|
+
MultiJson.load(
|
113
|
+
MultiJson.dump(attr)
|
114
|
+
),
|
115
|
+
:pretty => true
|
116
|
+
)
|
108
117
|
end
|
109
|
-
ui.info " Attribute Lookup -> #{config[:attribute]}:"
|
110
|
-
ui.puts MultiJson.dump(
|
111
|
-
MultiJson.load(
|
112
|
-
MultiJson.dump(attr)
|
113
|
-
),
|
114
|
-
:pretty => true
|
115
|
-
)
|
116
118
|
end
|
117
119
|
|
118
120
|
def display_nodes(stack)
|
data/lib/sfn/command/update.rb
CHANGED
@@ -69,7 +69,7 @@ module Sfn
|
|
69
69
|
|
70
70
|
if(config[:poll])
|
71
71
|
poll_stack(stack.name)
|
72
|
-
if(stack.
|
72
|
+
if(stack.reload.state == :update_complete)
|
73
73
|
ui.info "Stack update complete: #{ui.color('SUCCESS', :green)}"
|
74
74
|
namespace.const_get(:Describe).new({:outputs => true}, [name]).execute!
|
75
75
|
else
|
data/lib/sfn/version.rb
CHANGED
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.
|
4
|
+
version: 0.3.8
|
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-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bogo-cli
|