docker-spoon 0.4.0 → 0.5.0
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/Gemfile.lock +1 -1
- data/lib/spoon.rb +6 -5
- data/lib/spoon/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/spoon.rb
CHANGED
@@ -135,13 +135,14 @@ module Spoon
|
|
135
135
|
def self.instance_list
|
136
136
|
docker_url
|
137
137
|
puts "List of available spoon containers:"
|
138
|
-
container_list = get_all_containers.
|
138
|
+
container_list = get_all_containers.select { |c| c.info["Names"].first.to_s.start_with? "/#{options[:prefix]}" }
|
139
|
+
.sort { |c1, c2| c1.info["Names"].first.to_s <=> c2.info["Names"].first.to_s }
|
140
|
+
max_width_container_name = remove_prefix(container_list.max_by {|c| c.info["Names"].first.to_s.length }.info["Names"].first.to_s)
|
141
|
+
max_name_width = max_width_container_name.length
|
139
142
|
container_list.each do |container|
|
140
143
|
name = container.info["Names"].first.to_s
|
141
|
-
|
142
|
-
|
143
|
-
puts "#{remove_prefix(name)} [ #{running} ]".rjust(40) + " " + Rainbow(image_name(container)).yellow
|
144
|
-
end
|
144
|
+
running = is_running?(container) ? Rainbow("Running").green : Rainbow("Stopped").red
|
145
|
+
puts "#{remove_prefix(name)} [ #{running} ]".rjust(max_name_width + 22) + " " + Rainbow(image_name(container)).yellow
|
145
146
|
end
|
146
147
|
end
|
147
148
|
|
data/lib/spoon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-spoon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|