kitchen-sync 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +9 -0
- data/lib/kitchen-sync/version.rb +1 -1
- data/lib/kitchen/transport/sftp.rb +9 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba5198731d1dd70eb8db2ceef6d7840c142d32e1
|
4
|
+
data.tar.gz: c97d2770874f52912239bc74bc2aca14d04af937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cb717358878edbf818963330b8a920ca3f98fcaed7575c0d2c185cb174433c6502554c9d353f04f6b6f2d5d5ed61a29a90fb6603fc62a655b0c9360c099546d
|
7
|
+
data.tar.gz: 5c8c7c0d131d8906d4269a149c38a7081fea54b586b6d8b6ff49ade103155b44c26b6053dcb990d14a6728cc577685081458555dd183b7a3c98279c88c12dbf7
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -25,6 +25,15 @@ The default mode uses SFTP for file transfers, as well as a helper script to
|
|
25
25
|
avoid recopying files that are already present on the test host. If SFTP is
|
26
26
|
disabled, this will automatically fall back to the SCP mode.
|
27
27
|
|
28
|
+
By default this will use the Chef omnibus Ruby, you can customize the path to
|
29
|
+
Ruby via `ruby_path`:
|
30
|
+
|
31
|
+
```
|
32
|
+
transport:
|
33
|
+
name: sftp
|
34
|
+
ruby_path: /usr/bin/ruby
|
35
|
+
```
|
36
|
+
|
28
37
|
### `rsync`
|
29
38
|
|
30
39
|
The Rsync mode is based on the work done by [Mikhail Bautin](https://github.com/test-kitchen/test-kitchen/pull/359).
|
data/lib/kitchen-sync/version.rb
CHANGED
@@ -32,6 +32,8 @@ module Kitchen
|
|
32
32
|
CHECKSUMS_REMOTE_PATH = "/tmp/checksums-#{CHECKSUMS_HASH}.rb" # This won't work on Windows targets
|
33
33
|
MAX_TRANSFERS = 64
|
34
34
|
|
35
|
+
default_config :ruby_path, '/opt/chef/embedded/bin/ruby'
|
36
|
+
|
35
37
|
# Copy-pasta from Ssh#create_new_connection because I need the SFTP
|
36
38
|
# connection class.
|
37
39
|
# Tracked in https://github.com/test-kitchen/test-kitchen/pull/726
|
@@ -42,10 +44,15 @@ module Kitchen
|
|
42
44
|
end
|
43
45
|
|
44
46
|
@connection_options = options
|
45
|
-
@connection = self.class::Connection.new(options, &block)
|
47
|
+
@connection = self.class::Connection.new(config, options, &block)
|
46
48
|
end
|
47
49
|
|
48
50
|
class Connection < Ssh::Connection
|
51
|
+
def initialize(config, options, &block)
|
52
|
+
@config = config
|
53
|
+
super(options, &block)
|
54
|
+
end
|
55
|
+
|
49
56
|
# Wrap Ssh::Connection#close to also shut down the SFTP connection.
|
50
57
|
def close
|
51
58
|
if @sftp_session
|
@@ -100,7 +107,7 @@ module Kitchen
|
|
100
107
|
# Get checksums for existing files on the remote side.
|
101
108
|
logger.debug("[SFTP] Slow path upload from #{local} to #{remote}")
|
102
109
|
copy_checksums_script!
|
103
|
-
checksum_cmd = "
|
110
|
+
checksum_cmd = "#{@config[:ruby_path]} #{CHECKSUMS_REMOTE_PATH} #{remote}"
|
104
111
|
logger.debug("[SFTP] Running #{checksum_cmd}")
|
105
112
|
checksums = JSON.parse(session.exec!(checksum_cmd))
|
106
113
|
# Sync files that have changed.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.6.
|
109
|
+
rubygems_version: 2.6.11
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Improved file transfers for for test-kitchen
|