knife-ec2 0.5.8 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,7 +71,7 @@ class Chef
71
71
  end
72
72
 
73
73
  def msg_pair(label, value, color=:cyan)
74
- if value && !value.empty?
74
+ if value && !value.to_s.empty?
75
75
  puts "#{ui.color(label, color)}: #{value}"
76
76
  end
77
77
  end
@@ -44,20 +44,21 @@ class Chef
44
44
  ]
45
45
  connection.servers.all.each do |server|
46
46
  server_list << server.id.to_s
47
- server_list << (server.public_ip_address == nil ? "" : server.public_ip_address)
48
- server_list << (server.private_ip_address == nil ? "" : server.private_ip_address)
49
- server_list << (server.flavor_id == nil ? "" : server.flavor_id)
50
- server_list << (server.image_id == nil ? "" : server.image_id)
51
- server_list << server.key_name
47
+ server_list << server.public_ip_address.to_s
48
+ server_list << server.private_ip_address.to_s
49
+ server_list << server.flavor_id.to_s
50
+ server_list << server.image_id.to_s
51
+ server_list << server.key_name.to_s
52
52
  server_list << server.groups.join(", ")
53
53
  server_list << begin
54
- case server.state.downcase
54
+ state = server.state.to_s.downcase
55
+ case state
55
56
  when 'shutting-down','terminated','stopping','stopped'
56
- ui.color(server.state.downcase, :red)
57
+ ui.color(state, :red)
57
58
  when 'pending'
58
- ui.color(server.state.downcase, :yellow)
59
+ ui.color(state, :yellow)
59
60
  else
60
- ui.color(server.state.downcase, :green)
61
+ ui.color(state, :green)
61
62
  end
62
63
  end
63
64
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Ec2
3
- VERSION = "0.5.8"
3
+ VERSION = "0.5.10"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: knife-ec2
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.8
5
+ version: 0.5.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Adam Jacob
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-08-15 00:00:00 -04:00
14
+ date: 2011-08-30 00:00:00 -04:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency