specinfra 2.50.4 → 2.51.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.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/exec.rb +7 -1
- data/lib/specinfra/configuration.rb +1 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/backend/exec/build_command_spec.rb +14 -0
- 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: 52e2b0c52dbef5e2bd95f8ca26db95c6b2f9f189
|
|
4
|
+
data.tar.gz: f0edda0089b55411b7ba841837af2987482676df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5434491e5f9f713a7e9f2416bdffb6f685454c69fe331e7423bf0cda0de758d080571a43763f1f7d909aa989d60a54d58030f4446990015cb1ac58195a6fc87b
|
|
7
|
+
data.tar.gz: ffa28b948c261dbaf4d9e239c5b710c74e62c407869e5580f93bbd8aa4fdd4c22a1e10e318f111d3e97039c7f6defdcf026058cbd16630beecfc5a991ba22e7b
|
|
@@ -32,7 +32,13 @@ module Specinfra
|
|
|
32
32
|
def build_command(cmd)
|
|
33
33
|
shell = get_config(:shell) || '/bin/sh'
|
|
34
34
|
cmd = cmd.shelljoin if cmd.is_a?(Array)
|
|
35
|
-
|
|
35
|
+
shell = shell.shellescape
|
|
36
|
+
|
|
37
|
+
if get_config(:interactive_shell)
|
|
38
|
+
shell << " -i"
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
cmd = "#{shell} -c #{cmd.to_s.shellescape}"
|
|
36
42
|
|
|
37
43
|
path = get_config(:path)
|
|
38
44
|
if path
|
data/lib/specinfra/version.rb
CHANGED
|
@@ -46,6 +46,20 @@ describe Specinfra::Backend::Exec do
|
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
context 'with an interactive shell' do
|
|
50
|
+
before do
|
|
51
|
+
RSpec.configure {|c| c.interactive_shell = true }
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
after do
|
|
55
|
+
RSpec.configure {|c| c.interactive_shell = nil }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it 'should emulate an interactive shell' do
|
|
59
|
+
expect(Specinfra.backend.build_command('test -f /etc/passwd')).to eq '/bin/sh -i -c test\ -f\ /etc/passwd'
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
49
63
|
context 'with custom path' do
|
|
50
64
|
before do
|
|
51
65
|
RSpec.configure {|c| c.path = '/opt/bin:/opt/foo/bin:$PATH' }
|
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.
|
|
4
|
+
version: 2.51.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gosuke Miyashita
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-scp
|