awful 0.0.97 → 0.0.98

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: 28878967d14a135cefd7f0e86a944f7ad07e952f
4
- data.tar.gz: a2a5338d03a3ed242291fad9ba8ee8296e196c47
3
+ metadata.gz: d8b4b3f169f2594157d6dc35073d3484b9ba8e0e
4
+ data.tar.gz: e82ad34e48dfca330c7707416e88b5d40422251a
5
5
  SHA512:
6
- metadata.gz: 4369243c373d98172a2e422842cffddbce68c9b4b16c354e75f99c3014f16d288c2a2699d2f633ccb60d4eee01b3c251afda1c76bc1a485d3740d64429c2f391
7
- data.tar.gz: 0f07458ce1c5a7bdca2db42ade953a4ceca9596c113b2025e4eb1a13f3bab93a3ad02dfd561dde60eba9c8ae18505593eb12b2ec028c1759bef5e2f584745a1c
6
+ metadata.gz: b963f227b191703a938091e02e04bd1cb5cb7d51aa9b30bfb827ce578f7a521d33dbedc69fa49b762db070ab8ab80a5b20b725db4cf0c5f94941b9083c694dfc
7
+ data.tar.gz: 32a5ddb9c3ba493b3278c99ba43d1addec2e9f27fb4beb91a3c0337fc0c60243af7972f6548d6ab4d682e9cb82b9d27672dc8433ea613ec4c050f225acf3c1a2
data/lib/awful/ec2.rb CHANGED
@@ -28,6 +28,7 @@ module Awful
28
28
  method_option :stack, aliases: '-s', type: :string, default: nil, desc: 'Filter by given stack'
29
29
  method_option :resource, aliases: '-r', type: :string, default: nil, desc: 'Filter by given stack resource logical id'
30
30
  method_option :autoscaling, aliases: '-a', type: :string, default: nil, desc: 'Filter by given autoscaling group'
31
+ method_option :state, aliases: '-S', type: :string, default: nil, desc: 'Filter by given state name'
31
32
  def ls(name = nil)
32
33
  params = {instance_ids: [], filters: []}
33
34
 
@@ -46,6 +47,7 @@ module Awful
46
47
  params[:filters] << {name: 'tag:aws:cloudformation:stack-name', values: [options[:stack]]} if options[:stack]
47
48
  params[:filters] << {name: 'tag:aws:cloudformation:logical-id', values: [options[:resource]]} if options[:resource]
48
49
  params[:filters] << {name: 'tag:aws:autoscaling:groupName', values: [options[:autoscaling]]} if options[:autoscaling]
50
+ params[:filters] << {name: 'instance-state-name', values: [options[:state]]} if options[:state]
49
51
 
50
52
  ## get list of instances
51
53
  instances = ec2.describe_instances(params.reject{ |k,v| v.empty? }).reservations.map(&:instances).flatten
data/lib/awful/elb.rb CHANGED
@@ -31,9 +31,9 @@ module Awful
31
31
  if options[:long]
32
32
  print_table elbs.map { |e|
33
33
  [e.load_balancer_name, e.instances.length, e.availability_zones.join(','), e.dns_name]
34
- }
34
+ }.sort
35
35
  else
36
- puts elbs.map(&:load_balancer_name)
36
+ puts elbs.map(&:load_balancer_name).sort
37
37
  end
38
38
  end
39
39
  end
data/lib/awful/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.97'
2
+ VERSION = '0.0.98'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.97
4
+ version: 0.0.98
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-15 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler