Skip to content

Commit 7d0631c

Browse files
author
Noah Cantor
committed
Changing colors to be more readable. Also fixing a bug so that a nameless server no longer causes errors.
1 parent c21bb84 commit 7d0631c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
## 1.2.6 (May 16, 2012)
1+
## 1.2.9 (June 27, 2012)
2+
3+
Bugfixes:
4+
5+
- No longer throws an error when a server has no name.
6+
7+
## 1.2.8 (May 16, 2012)
28

39
Notes:
410

lib/capify-ec2.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ def initialize(ec2_config = "config/ec2.yml")
3434
def determine_regions()
3535
@ec2_config[:aws_params][:regions] || [@ec2_config[:aws_params][:region]]
3636
end
37-
37+
3838
def display_instances
3939
desired_instances.each_with_index do |instance, i|
40-
puts sprintf "%-11s: %-40s %-20s %-20s %-62s %-20s (%s) (%s)",
41-
i.to_s.magenta, instance.name, instance.id.red, instance.flavor_id.cyan,
42-
instance.contact_point.blue, instance.availability_zone.green, (instance.tags["Roles"] || "").yellow,
40+
puts sprintf "%02d: %-40s %-20s %-20s %-62s %-20s (%s) (%s)",
41+
i, (instance.name || "").green, instance.id.red, instance.flavor_id.cyan,
42+
instance.contact_point.blue, instance.availability_zone.magenta, (instance.tags["Roles"] || "").yellow,
4343
(instance.tags["Options"] || "").yellow
4444
end
4545
end

0 commit comments

Comments
 (0)