specinfra 2.67.0 → 2.67.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/docker.rb +9 -10
- data/lib/specinfra/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f1a7862cc881615ce10f40c8b4b8f05efd981c1
|
4
|
+
data.tar.gz: 65e53ff41e53463cde4558ba62ec66be6e085708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c044489735f08b4bc84a2ca490a10593817bff06f4398955bb33983ee1c5c839f91231508f34875cec4581a4a3873a96ab8c23081e1db2736b4b52cda563b2de
|
7
|
+
data.tar.gz: c23210434a283d203c454e1b3105d2581237bd665ff2c98abe2553b55b7b82d91027bf73672e9f26e432e35bfdae7f4c35bba205ae02cb45756b01f652305ba6
|
@@ -27,18 +27,10 @@ module Specinfra
|
|
27
27
|
|
28
28
|
def run_command(cmd, opts={})
|
29
29
|
cmd = build_command(cmd)
|
30
|
-
|
30
|
+
run_pre_command(opts)
|
31
31
|
docker_run!(cmd, opts)
|
32
32
|
end
|
33
33
|
|
34
|
-
def build_command(cmd)
|
35
|
-
cmd
|
36
|
-
end
|
37
|
-
|
38
|
-
def add_pre_command(cmd)
|
39
|
-
cmd
|
40
|
-
end
|
41
|
-
|
42
34
|
def send_file(from, to)
|
43
35
|
if @base_image
|
44
36
|
@images << commit_container if @container
|
@@ -95,7 +87,7 @@ module Specinfra
|
|
95
87
|
|
96
88
|
def docker_run!(cmd, opts={})
|
97
89
|
opts.merge!(get_config(:docker_container_exec_options) || {})
|
98
|
-
stdout, stderr, status = @container.exec(
|
90
|
+
stdout, stderr, status = @container.exec(cmd.shellsplit, opts)
|
99
91
|
|
100
92
|
CommandResult.new :stdout => stdout.join, :stderr => stderr.join,
|
101
93
|
:exit_status => status
|
@@ -115,6 +107,13 @@ module Specinfra
|
|
115
107
|
::Docker::Image.create('fromImage' => name)
|
116
108
|
end
|
117
109
|
end
|
110
|
+
|
111
|
+
def run_pre_command(opts)
|
112
|
+
if get_config(:pre_command)
|
113
|
+
cmd = build_command(get_config(:pre_command))
|
114
|
+
docker_run!(cmd, opts)
|
115
|
+
end
|
116
|
+
end
|
118
117
|
end
|
119
118
|
end
|
120
119
|
end
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.67.
|
4
|
+
version: 2.67.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|