ec2-ssh 1.0.1 → 1.0.2

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: c4a8cbe419bf1a45f6e32e01a1d4ba9cb192a895
4
- data.tar.gz: 158753292a848f88511fd5f579d04f3626311251
3
+ metadata.gz: 987c004d8dac2ca4e6b4f20c3bf0d1d079c7c136
4
+ data.tar.gz: 741ecc46e8f800b86d894897a2ad1cfc88733dab
5
5
  SHA512:
6
- metadata.gz: e507425bf577899eccb6868198457ad189eb7f15585e92d51fb09380e2f039e41f59d741c4f4b5e54cc300c03ecad97fb5f59f0b19b1ecad4789c7aa855300ca
7
- data.tar.gz: 6c1372931fe51e79e7d59fb9c67c9f39b1a45e41dc51a71d6e8eb39058427a88504cc719f9c8d9ae32cb97bc24621003db0ba42f7cfb73a7e3cb3bfbde15ea1e
6
+ metadata.gz: 10eb625aa0e1417c00359b28c9dbb93dd037bc612fbb7bdeb8bd7f8bba6c6a1d2d6e0f94727288e5b7a9592be6911c0c5d3cabf8a7b4c125c494150971d0913d
7
+ data.tar.gz: 52d2e44474cc5b74ef08e3a23b0ac444e3e522b5bf729cf76ad6c73e9896beee6d183995e67fd1ae391526a6dcdac7d3191a1287db31b0b008c4ab62c3a84790
data/lib/ec2-ssh.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Ec2Ssh
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  ABOUT = "ec2-ssh v#{VERSION} (c) #{Time.now.strftime("2015-%Y")} @innovia"
4
4
 
5
5
  $:.unshift File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib]))
data/lib/ec2-ssh/aws.rb CHANGED
@@ -13,7 +13,7 @@ module Ec2Ssh::Cli::Aws
13
13
 
14
14
  def get_auto_scale_groups
15
15
  say "Fetching AutoScale Groups - please wait..."
16
- @as_groups = @as.describe_auto_scaling_groups.auto_scaling_groups
16
+ @as_groups = @as.describe_auto_scaling_groups({max_records: 100}).auto_scaling_groups
17
17
 
18
18
  as_group_names = @as_groups.inject([]) {|acc, asg| acc << asg.auto_scaling_group_name; acc }
19
19
 
data/lib/ec2-ssh/cli.rb CHANGED
@@ -26,7 +26,7 @@ class Ec2Ssh::Cli < Thor
26
26
  method_option :groups, :aliases => 'g', :desc => 'run in groups'
27
27
  method_option :groups_limit, :aliases => 'l', :desc => 'limit', :type => :numeric
28
28
  method_option :wait, :aliases => 'w', :desc => 'wait', :type => :numeric
29
- method_option :as, :desc => 'get autoscale groups'
29
+ method_option :as, :desc => 'filter by autoscale groups'
30
30
  method_option :tag_key, :desc => 'tag key to filter instances by', :default => 'Name'
31
31
  method_option :tag_value, :desc => 'tag value to filter instances by'
32
32
  method_option :terminal, :aliases => 't', :desc => 'open terminal tabs for all servers'
@@ -39,8 +39,12 @@ class Ec2Ssh::Cli < Thor
39
39
 
40
40
  if options[:as]
41
41
  get_auto_scale_groups
42
- else options[:tag_value]
42
+ elsif options[:tag_value]
43
43
  get_instances(options[:tag_key].chomp, options[:tag_value].chomp)
44
+ else
45
+ say "No value provided for filtering instances", color = :red
46
+ Ec2Ssh::Cli.start(%w{help connect})
47
+ exit
44
48
  end
45
49
 
46
50
  if options[:terminal]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ami Mahloof
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2015-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor