specinfra 2.10.4 → 2.11.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 +4 -0
- data/lib/specinfra/backend/ssh.rb +16 -8
- 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: 5f3d2e29c23332edd854c392a4f387a9f208e890
|
4
|
+
data.tar.gz: 45fa4dee5d7f55637bc88b814529e0e8c7707ae7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d27096006e2273c9e1599964e608c821c5c0877d88383d1bbe68166f4bc84f4d194e3799b05944bf858658bfa37103d3e67d4bdfaa04fcbeda766ecc62a92b9b
|
7
|
+
data.tar.gz: 51f2385e6445e672753f5e46129608e45741c5f8d55db2e247fff2b7c6b395a7a1a298b78ae934bf4d03b1a2e816ec252cf5c9d17141f3dd8c6d95ec4b1486a0
|
@@ -24,14 +24,11 @@ module Specinfra::Backend
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def send_file(from, to)
|
27
|
-
|
28
|
-
|
29
|
-
end
|
27
|
+
scp_upload!(from, to)
|
28
|
+
end
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
scp.upload!(from, tmp)
|
34
|
-
run_command(Specinfra.command.get(:move_file, tmp, to))
|
30
|
+
def send_directory(from, to)
|
31
|
+
scp_upload!(from, to, :recursive => true)
|
35
32
|
end
|
36
33
|
|
37
34
|
def build_command(cmd)
|
@@ -84,7 +81,18 @@ module Specinfra::Backend
|
|
84
81
|
end
|
85
82
|
Net::SCP.new(ssh)
|
86
83
|
end
|
87
|
-
|
84
|
+
|
85
|
+
def scp_upload!(from, to, opt={})
|
86
|
+
if Specinfra.configuration.scp.nil?
|
87
|
+
Specinfra.configuration.scp = create_scp
|
88
|
+
end
|
89
|
+
|
90
|
+
tmp = File.join('/tmp', File.basename(to))
|
91
|
+
scp = Specinfra.configuration.scp
|
92
|
+
scp.upload!(from, tmp, opt)
|
93
|
+
run_command(Specinfra.command.get(:move_file, tmp, to))
|
94
|
+
end
|
95
|
+
|
88
96
|
def ssh_exec!(command)
|
89
97
|
stdout_data = ''
|
90
98
|
stderr_data = ''
|
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.
|
4
|
+
version: 2.11.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: 2014-12-
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|