docker-rainbow 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docker-rainbow.gemspec +4 -0
- data/lib/docker/rainbow.rb +6 -2
- data/lib/docker/rainbow/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec1e30d24a17b1620a2ee428f23fce9a0423a8f8
|
4
|
+
data.tar.gz: 2c64a0647059e1841eccc4f9f83af5ee37580241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04ccc3f3edda3c92eec78b67517c4dd200e57aa81882a33166a72aa04e0c60b900efc762eda38b29690f0d021f5a1f35e48cb57da273331ac70abce0c52fa960
|
7
|
+
data.tar.gz: cae9a47cf701f8a3eb933753879cd333275f31d184286635582c72929a54b94bfa53b6944e24b952166cff2dff753a8e89434f51dac60e8addf83e991b413787
|
data/docker-rainbow.gemspec
CHANGED
@@ -18,6 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
# We use ActiveSupport core_ext, which works pretty much the same way from
|
22
|
+
# 2.0.0 onward...
|
23
|
+
spec.add_dependency "activesupport", "> 2.0"
|
24
|
+
|
21
25
|
spec.add_development_dependency "bundler", "~> 1.10"
|
22
26
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
27
|
spec.add_development_dependency "rspec"
|
data/lib/docker/rainbow.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'set'
|
2
2
|
|
3
|
+
require 'active_support/core_ext/object'
|
4
|
+
|
3
5
|
require 'docker/rainbow/version'
|
4
6
|
|
5
7
|
module Docker
|
@@ -68,8 +70,10 @@ module Docker
|
|
68
70
|
# @param [Boolean] gc if true rm dead containers with conflicting names
|
69
71
|
# @param [Boolean] reuse if true, ignore conflicts with running containers
|
70
72
|
def name_containers(image, cmd:nil, count:1, gc:true, reuse:false)
|
73
|
+
raise ArgumentError, "count must be > 0" unless count > 0
|
74
|
+
|
71
75
|
prefix = "#{@color}_#{base_name(image)}"
|
72
|
-
prefix = "#{prefix}_#{cmd_suffix(cmd)}" if cmd
|
76
|
+
prefix = "#{prefix}_#{cmd_suffix(cmd)}" if cmd.present?
|
73
77
|
|
74
78
|
result = []
|
75
79
|
if count == 1
|
@@ -84,7 +88,7 @@ module Docker
|
|
84
88
|
|
85
89
|
unless reuse
|
86
90
|
in_use = find_in_use(result)
|
87
|
-
raise Conflict.new(in_use) if in_use.
|
91
|
+
raise Conflict.new(in_use) if in_use.present?
|
88
92
|
end
|
89
93
|
|
90
94
|
result
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-rainbow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Spataro
|
@@ -10,6 +10,20 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|