ec2ssh 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- schop (1.0.0)
4
+ ec2ssh (1.0.2)
5
5
  highline (~> 1.6)
6
6
  ktheory-right_aws (~> 2.0.3)
7
7
  thor (~> 0.14.6)
@@ -19,7 +19,7 @@ PLATFORMS
19
19
  ruby
20
20
 
21
21
  DEPENDENCIES
22
+ ec2ssh!
22
23
  highline (~> 1.6)
23
24
  ktheory-right_aws (~> 2.0.3)
24
- schop!
25
25
  thor (~> 0.14.6)
data/lib/ec2ssh/hosts.rb CHANGED
@@ -26,8 +26,9 @@ module Ec2ssh
26
26
  instance_names[tag[:resource_id]] = tag[:value]
27
27
  end
28
28
  ec2.describe_instances.map do |instance|
29
- instance_name = instance_names[instance[:aws_instance_id]]
30
- instance_name ? {:host => "#{instance_name}.#{region}", :dns_name => instance[:dns_name]} : nil
29
+ instance_name = instance_names[instance[:aws_instance_id]] or next nil
30
+ dns_name = instance[:dns_name] or next nil
31
+ instance_name.empty? || dns_name.empty? ? nil : {:host => "#{instance_name}.#{region}", :dns_name => dns_name}
31
32
  end.compact
32
33
  end
33
34
  end
@@ -1,3 +1,3 @@
1
1
  module Ec2ssh
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2ssh
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - mirakui
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-05 00:00:00 +09:00
18
+ date: 2011-01-07 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency