specinfra 2.67.0 → 2.67.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f21b316e6c4687959bdb8e9e344b981a5a5d1cd
4
- data.tar.gz: f99ea92c64c15337c0e2c2d9d43142b94fb66395
3
+ metadata.gz: 7f1a7862cc881615ce10f40c8b4b8f05efd981c1
4
+ data.tar.gz: 65e53ff41e53463cde4558ba62ec66be6e085708
5
5
  SHA512:
6
- metadata.gz: 85e43b80d970d78bccfb61e216895c43c6499b980958beaf7f0f21b248729442e22e53882902d9b2e889f430c5bb6b59b0b82cd67202f8ed649927ba9bf0140c
7
- data.tar.gz: 4931fa261622ffeacaf7bbd3d7426b3b39169838d3ac409506ddbf88d2d939086a20f6d8c90baa75000aa99a003f72ec13f3572c0caf6d7ec32dc026b1fd2e96
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
- cmd = add_pre_command(cmd)
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(['/bin/sh', '-c', cmd], opts)
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
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.67.0"
2
+ VERSION = "2.67.1"
3
3
  end
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.0
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-13 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp