cap-ec2 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +4 -0
- data/lib/cap-ec2/status-table.rb +28 -15
- data/lib/cap-ec2/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
data/lib/cap-ec2/status-table.rb
CHANGED
@@ -9,14 +9,14 @@ module CapEC2
|
|
9
9
|
|
10
10
|
def header_row
|
11
11
|
[
|
12
|
-
"Num"
|
13
|
-
"Name"
|
14
|
-
"ID"
|
15
|
-
"Type"
|
16
|
-
"DNS"
|
17
|
-
"Zone"
|
18
|
-
"Roles"
|
19
|
-
"Stages"
|
12
|
+
bold("Num"),
|
13
|
+
bold("Name"),
|
14
|
+
bold("ID"),
|
15
|
+
bold("Type"),
|
16
|
+
bold("DNS"),
|
17
|
+
bold("Zone"),
|
18
|
+
bold("Roles"),
|
19
|
+
bold("Stages")
|
20
20
|
]
|
21
21
|
end
|
22
22
|
|
@@ -38,15 +38,28 @@ module CapEC2
|
|
38
38
|
def instance_to_row(instance, index)
|
39
39
|
[
|
40
40
|
sprintf("%02d:", index),
|
41
|
-
(instance.tags["Name"] || '')
|
42
|
-
instance.id
|
43
|
-
instance.instance_type
|
44
|
-
CapEC2::Utils.contact_point(instance)
|
45
|
-
instance.availability_zone
|
46
|
-
instance.tags[roles_tag]
|
47
|
-
instance.tags[stages_tag]
|
41
|
+
green(instance.tags["Name"] || ''),
|
42
|
+
red(instance.id),
|
43
|
+
cyan(instance.instance_type),
|
44
|
+
bold(blue(CapEC2::Utils.contact_point(instance))),
|
45
|
+
magenta(instance.availability_zone),
|
46
|
+
yellow(instance.tags[roles_tag]),
|
47
|
+
yellow(instance.tags[stages_tag])
|
48
48
|
]
|
49
49
|
end
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
(Colored::COLORS.keys + Colored::EXTRAS.keys).each do |format|
|
54
|
+
define_method(format) do |string|
|
55
|
+
if $stdout.tty?
|
56
|
+
string.__send__(format)
|
57
|
+
else
|
58
|
+
string
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
50
63
|
end
|
51
64
|
end
|
52
65
|
|
data/lib/cap-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-07-
|
13
|
+
date: 2014-07-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
segments:
|
147
147
|
- 0
|
148
|
-
hash:
|
148
|
+
hash: 2024231783545522986
|
149
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
150
|
none: false
|
151
151
|
requirements:
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
segments:
|
156
156
|
- 0
|
157
|
-
hash:
|
157
|
+
hash: 2024231783545522986
|
158
158
|
requirements: []
|
159
159
|
rubyforge_project:
|
160
160
|
rubygems_version: 1.8.23
|