tailstack 0.0.7 → 0.0.8
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 +4 -4
- data/bin/tailstack +10 -4
- 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: a2f223b84a359ab1c7191c33a6d12fbdae46336a
|
4
|
+
data.tar.gz: fcd3db01a7b8dd65264c5bffbd0dadecbc895a3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '049498d2ba31a81b6293bf367dc6f445449852c195981f2da2d68c17402b9890be6c8bd075505898010b8c0b79fd5a8b6b0927704c81c35c796d94a8c5f139c9'
|
7
|
+
data.tar.gz: 895113c8d97711cc404cf7af98c1306c3aa2c0f6dde9a859759996368fcf3a53e11615bbddd1c28241b0400ce9405479df0d7022ada68388c3876f6ed5483c3e
|
data/bin/tailstack
CHANGED
@@ -13,6 +13,8 @@ OptionParser.new do |opts|
|
|
13
13
|
opts.on('-l', '--list', 'Lists stacks in environtment and exits'){ |o| options[:list] = o }
|
14
14
|
opts.on('-o', '--outputs', 'Combine with --list also list outputs'){ |o| options[:outputs] = o }
|
15
15
|
opts.on('-d', '--parms', 'Combine with --list also list parameters'){ |o| options[:parms] = o }
|
16
|
+
opts.on('-g', '--get_output OUTPUT', 'Prints out the parameter and exits'){ |o| options[:get_out] = o }
|
17
|
+
opts.on('-v', '--verbose', 'Up the verbosity'){ |o| options[:verbose] = o }
|
16
18
|
end.parse!
|
17
19
|
|
18
20
|
using_env_creds = true
|
@@ -27,7 +29,7 @@ if !options.key?(:region)
|
|
27
29
|
File.read(File.expand_path('~/.aws/config')).each_line do |line|
|
28
30
|
if found_profile
|
29
31
|
options[:region] = line.split('=').last.strip
|
30
|
-
puts "Using region #{options[:region]}"
|
32
|
+
puts "Using region #{options[:region]}" if options.key? :verbose
|
31
33
|
break;
|
32
34
|
end
|
33
35
|
if line.match("#{options[:profile]}\\]")
|
@@ -140,7 +142,7 @@ def print_list(cfn, options)
|
|
140
142
|
cfn.describe_stacks.to_h[:stacks].each do |s|
|
141
143
|
next if options.key?(:stack) && options[:stack] != s[:stack_name]
|
142
144
|
next if status_map[s[:stack_id]] == 'DELETE_COMPLETE'
|
143
|
-
puts "#{s[:stack_name].bold} - #{s[:description].cyan}"
|
145
|
+
puts "#{s[:stack_name].bold} - #{s[:description].cyan}" unless options.key? :get_out
|
144
146
|
if options.key?(:parms) && s[:parameters]
|
145
147
|
puts " #{"Parameters:".green}"
|
146
148
|
s[:parameters].each do |parm|
|
@@ -148,9 +150,13 @@ def print_list(cfn, options)
|
|
148
150
|
end
|
149
151
|
end
|
150
152
|
if options.key?(:outputs) && s[:outputs]
|
151
|
-
puts " #{"Outputs:".magenta}"
|
153
|
+
puts " #{"Outputs:".magenta}" unless options.key? :get_out
|
152
154
|
s[:outputs].each do |output|
|
153
|
-
|
155
|
+
if options.key?(:get_out) && output[:output_key] == options[:get_out]
|
156
|
+
puts output[:output_value]
|
157
|
+
exit 0
|
158
|
+
end
|
159
|
+
puts " #{output[:output_key].brown}: #{output[:output_value].gray}" unless options.key? :get_out
|
154
160
|
end
|
155
161
|
end
|
156
162
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Fruzza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|