docker-spec 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker/spec/docker.rb +0 -7
- data/lib/docker/spec/version.rb +1 -1
- data/lib/docker/spec.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a3856ad41980d720cbfffc99157f1e87520265d
|
4
|
+
data.tar.gz: cdcc2657a028eb1cd7ddbcd795964f17194695a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f081358fa6a6db4f470edb731f0490d061cc9d11b0fb711806168f3e5a72e68e9921ec4ab7cd770fad7785e1685c492056453c402d1bb12721a48757ab22878e
|
7
|
+
data.tar.gz: a7c7d8333780c2d9afd8d7fccbc6370eb4cf0b21ad0a44bafb2d0115507e9feeefa6010f08100d5e87481f5b6d09f36b3dc3c7246572f803ff5f03ad418bcaa0
|
data/lib/docker/spec/docker.rb
CHANGED
@@ -5,13 +5,6 @@ module Docker
|
|
5
5
|
before(:all) do
|
6
6
|
@container = DockerSpec.instance.container
|
7
7
|
@image = @container.info["Image"]
|
8
|
-
@config = DockerSpec.instance.config
|
9
|
-
@lock = File.join('/tmp', @config[:account] + '-' + @config[:name] + '.lock')
|
10
|
-
@f = File.open(@lock, 'w')
|
11
|
-
if (not @f.flock(File::LOCK_EX | File::LOCK_NB))
|
12
|
-
puts "INFO: Another build is already running"
|
13
|
-
end
|
14
|
-
@f.flock(File::LOCK_EX)
|
15
8
|
end
|
16
9
|
|
17
10
|
it 'should be available' do
|
data/lib/docker/spec/version.rb
CHANGED
data/lib/docker/spec.rb
CHANGED
@@ -31,11 +31,22 @@ class DockerSpec
|
|
31
31
|
@test_failed = false
|
32
32
|
|
33
33
|
load_config
|
34
|
+
flock
|
34
35
|
build_root if @config[:build_root]
|
35
36
|
build_docker_image if @config[:build_image]
|
36
37
|
rspec_configure
|
37
38
|
end
|
38
39
|
|
40
|
+
def flock
|
41
|
+
@config = DockerSpec.instance.config
|
42
|
+
@lock = File.join('/tmp', @config[:account] + '-' + @config[:name] + '.lock')
|
43
|
+
@f = File.open(@lock, 'w')
|
44
|
+
if (not @f.flock(File::LOCK_EX | File::LOCK_NB))
|
45
|
+
puts "INFO: Another build is already running"
|
46
|
+
end
|
47
|
+
@f.flock(File::LOCK_EX)
|
48
|
+
end
|
49
|
+
|
39
50
|
def push
|
40
51
|
@config[:push_container] = get_config(:push_container, 'DOCKER_SPEC_PUSH_CONTAINER',
|
41
52
|
'Push new tag? ')
|