stax 0.0.22 → 0.0.23

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
  SHA256:
3
- metadata.gz: 76cc04f561d9cc7f1a82d2d768a252ba93aeee3f6b512a074524c85dbc810ee2
4
- data.tar.gz: f9e8b79e837d2ca714d4db200cadf738b07834088eda001d1f352dba8aa19e27
3
+ metadata.gz: ee967601a71eb9b736404783e6200e3f18322a24ba1314b0bae288398b9d0b16
4
+ data.tar.gz: 9c22a416c4731d196734c92e365ee187fbee491bf7cbb8ee8015f2e76f655ab9
5
5
  SHA512:
6
- metadata.gz: '02290aeff597ef846b35649a59a6526277916ffb64e6b4ff15fc0265f8bf84cb49366375776041039d453b59aca441236d47a639c038a7bca12ac7b734430782'
7
- data.tar.gz: 4601de9bce205f2fb3ccc0a51c89de050f11a6c4107bef175c349cd4748b4fc3c2ad09fc26c02c4df84b0ab5dacb9fb2f65e145b0c48058a3be73719a22821ad
6
+ metadata.gz: e0546f69bd73770304d2fed1ca1d914407d4ca1f83a71da3ac8ac5d7cf7465c17e8d62fd661f0cc4f49663949d3206b4e1883d21e35fb4ab6ef0f61adb6c9071
7
+ data.tar.gz: b2990d6e91472feee663c6f5c6f2fa06eab9a3186c9c8619a3834822531d3dcddd353a33a63869690f764ab6fc5602bc1fce2f2af1391c6ddae887ccdfe4514b
data/lib/stax/aws/cfn.rb CHANGED
@@ -35,9 +35,7 @@ module Stax
35
35
  end
36
36
 
37
37
  def stacks
38
- paginate(:stack_summaries) do |token|
39
- client.list_stacks(stack_status_filter: STATUSES, next_token: token)
40
- end
38
+ client.list_stacks(stack_status_filter: STATUSES).map(&:stack_summaries).flatten
41
39
  end
42
40
 
43
41
  def template(name)
@@ -45,9 +43,7 @@ module Stax
45
43
  end
46
44
 
47
45
  def resources(name)
48
- paginate(:stack_resource_summaries) do |token|
49
- client.list_stack_resources(stack_name: name, next_token: token)
50
- end
46
+ client.list_stack_resources(stack_name: name).map(&:stack_resource_summaries).flatten
51
47
  end
52
48
 
53
49
  def resources_by_type(name, type)
@@ -57,9 +53,7 @@ module Stax
57
53
  end
58
54
 
59
55
  def events(name)
60
- paginate(:stack_events) do |token|
61
- client.describe_stack_events(stack_name: name, next_token: token)
62
- end
56
+ client.describe_stack_events(stack_name: name).map(&:stack_events).flatten
63
57
  end
64
58
 
65
59
  def id(name, id)
data/lib/stax/cli/ls.rb CHANGED
@@ -3,10 +3,11 @@ module Stax
3
3
 
4
4
  no_commands do
5
5
  def ls_staxfile_stacks
6
+ stacks = Aws::Cfn.stacks.each_with_object({}) { |s, h| h[s.stack_name] = s }
6
7
  print_table Stax.stack_list.map { |id|
7
8
  name = stack(id).stack_name
8
- if (s = Aws::Cfn.describe(name))
9
- [s.stack_name, s.creation_time, color(s.stack_status, Aws::Cfn::COLORS), s.description]
9
+ if (s = stacks[name])
10
+ [s.stack_name, s.creation_time, color(s.stack_status, Aws::Cfn::COLORS), s.template_description]
10
11
  else
11
12
  options[:existing] ? nil : [name, '-']
12
13
  end
data/lib/stax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stax
2
- VERSION = '0.0.22'
2
+ VERSION = '0.0.23'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-08 00:00:00.000000000 Z
11
+ date: 2019-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler