awful 0.0.53 → 0.0.54

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: 36753e59ef159b9d7324d78ecba2678a44c231ee
4
- data.tar.gz: 1d9fa838a6078bafb5b926a6c4be5c74c17b7a59
3
+ metadata.gz: 224ca11d5105f088200d1934aa706cb2efea2b7e
4
+ data.tar.gz: aa9b1247d4fcaeed7d6a19c38a9f3fae935c02a8
5
5
  SHA512:
6
- metadata.gz: a58985a2a470ffe7bffccdf01f167264c6736cb9d2562191fccd02f6bb4ef0b691ff2d5bb3603a655e6ce8ce7070326a100296599e767c083383e221c0759d78
7
- data.tar.gz: 9bf66255c04821000a9d6dd7964f6acad4d901ccf42ac99b7e923f08ff0d3151d05e056dd4a4626df38458a35d918d0430e538f796e01b7194e29c00725188b3
6
+ metadata.gz: dda428258e10bdaf181bc41c42243ee6661ab4e00dd1094ae7250c41652158be6efd3513a7ca6485a512ac353b26a1e4d31e060ec23053c2236d0502cf7abc7a
7
+ data.tar.gz: eaf7fb32203c5dc76686d2bb2df19644875a2d9b21d317d76939666ceb60be6c436553b63761f633489d312e420af9f8ede9a5a025a1667aede900ec36b42bd2
@@ -109,9 +109,9 @@ module Awful
109
109
  end
110
110
  end
111
111
 
112
- def tag_name(thing)
112
+ def tag_name(thing, default = nil)
113
113
  tn = thing.tags.find { |tag| tag.key == 'Name' }
114
- tn && tn.value
114
+ tn ? tn.value : default
115
115
  end
116
116
 
117
117
  ## return id for instance by name
@@ -27,11 +27,12 @@ module Awful
27
27
  def ls(name = /./)
28
28
  fields = if options[:long]
29
29
  ->(a) { [
30
- a.auto_scaling_group_name,
31
- a.launch_configuration_name,
30
+ tag_name(a, '-')[0,40],
31
+ a.auto_scaling_group_name[0,40],
32
+ a.launch_configuration_name[0,40],
32
33
  "#{a.instances.length}/#{a.desired_capacity}",
33
34
  "#{a.min_size}-#{a.max_size}",
34
- a.availability_zones.sort.join(','),
35
+ a.availability_zones.map{ |az| az[-1,1] }.sort.join(','),
35
36
  a.created_time
36
37
  ] }
37
38
  else
@@ -39,7 +40,7 @@ module Awful
39
40
  end
40
41
 
41
42
  autoscaling.describe_auto_scaling_groups.map(&:auto_scaling_groups).flatten.select do |asg|
42
- asg.auto_scaling_group_name.match(name)
43
+ asg.auto_scaling_group_name.match(name) or tag_name(asg, '').match(name)
43
44
  end.map do |asg|
44
45
  fields.call(asg)
45
46
  end.tap do |list|
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = "0.0.53"
2
+ VERSION = "0.0.54"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.53
4
+ version: 0.0.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister