ec2ctl 0.7.1 → 0.7.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: be9dd566ef5630b318d99e4834870b3a213e8aa8
4
- data.tar.gz: 1978d32839a8df8168990262e39470031e9c2085
3
+ metadata.gz: 6230cac68306db4d9e5a726fd446be5fe246093e
4
+ data.tar.gz: 0128c5c3941070c395a0b4d3e7edd65a95668fd7
5
5
  SHA512:
6
- metadata.gz: d2248fd2fd203ef10b914c7099a99932c2c24215e2bb020133a8e5e010474bb48ba4d8f1dd18e872cf91ed986295c13adb0095c6c0881ea5b721825a8778be1c
7
- data.tar.gz: 0c73e1a13a95204a8cc5f81582984eb2df9f7c35dff056cdd9d31adf85c16bbcd31e7c1387eb318983109a2823481a81deaff210abc5adffb94504d6e841c9fa
6
+ metadata.gz: af1ef883b234c012421bc27a794faa4fa4de46da3203f3054e8f4d47e0b27857c5e2922168672923da5470af1e8df3a055b17b948b199f3ed95aefaa1a5d9fc9
7
+ data.tar.gz: bfe6e666c37433d5664b4ed3e1d7fe0e1474c4f3abe4799dce6f579e1049ccb702a4b4790d8840c1e426a9ea7459ae376d4997e43bd9dc10c7c017ea0534186e
data/lib/ec2ctl/cli.rb CHANGED
@@ -28,7 +28,7 @@ module EC2Ctl
28
28
 
29
29
  c.action do |args, options|
30
30
  options.default(
31
- attributes: "id,tag:Name,instance_type,private_ip_address,public_ip_address,state",
31
+ attributes: "id,tag:Name,instance_type,private_ip_address,public_ip_address,state.name",
32
32
  format: "table",
33
33
  order: "tag:Name",
34
34
  )
data/lib/ec2ctl/client.rb CHANGED
@@ -12,10 +12,10 @@ module EC2Ctl
12
12
  acc[attribute] = case attribute
13
13
  when /\Atag:/i
14
14
  instance.tags.find {|tag| tag.key == attribute.split(":").last}.value
15
- when "state"
16
- instance.state.name
17
15
  else
18
- instance.send attribute.intern
16
+ attribute.split(".").map(&:intern).inject instance do |acc, method|
17
+ acc.send method
18
+ end
19
19
  end
20
20
 
21
21
  acc
@@ -1,3 +1,3 @@
1
1
  module EC2Ctl
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2ctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - y13i
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-06 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander