kitchen-transport-express 1.3.0 → 1.3.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kitchen/transport/express/archiver.rb +21 -10
- data/lib/kitchen/transport/express/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23840e5574cc8a84acfcb87e24a3a4f6c26ea1174a3c5c2bc8390d3fc23843b6
|
4
|
+
data.tar.gz: eb2165a04339df078065117b00af095b8cba4903d0c5d03233cedfc5b3ac6a8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8257d47351212661fd997b9b3397cdcc63f5f998352fd96362cd6d21092aba753943349db7c31688a705acbbec2582e4754f31b2dc57938b5771c3a726bb95f5
|
7
|
+
data.tar.gz: a3d90892108b59c591f965debb21bb38de8a6eab34f397703660ee5866c7c9a5158bb5a1e90974788d0c41ee8829c95a9457409ab8f4dca62c9b650a17cf2d2a
|
data/CHANGELOG.md
CHANGED
@@ -30,16 +30,17 @@ module Kitchen
|
|
30
30
|
def archive(path)
|
31
31
|
archive_basename = ::File.basename(path) + ".tgz"
|
32
32
|
archive_full_name = ::File.join(::File.dirname(path), archive_basename)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
create_archive(path, archive_full_name)
|
33
|
+
files = all_files(path)
|
34
|
+
logger.debug("[#{Express::LOG_PREFIX}] #{path} contains #{files.size} files.")
|
35
|
+
create_archive(path, files, archive_full_name)
|
37
36
|
archive_full_name
|
38
37
|
end
|
39
38
|
|
40
39
|
# Extracts the archive on the remote host.
|
41
40
|
#
|
42
|
-
# @param session [Net::SSH::Connection::Session]
|
41
|
+
# @param session [Net::SSH::Connection::Session] the SSH session used to connect to the remote host and execute the extract and cleanup commands.
|
42
|
+
# @param local [String] the directory in the local sandbox that is being processed.
|
43
|
+
# @param remote [String] the remote directory (kitchen_root).
|
43
44
|
def extract(session, local, remote)
|
44
45
|
return unless local.match(/.*\.tgz/)
|
45
46
|
|
@@ -54,15 +55,25 @@ module Kitchen
|
|
54
55
|
|
55
56
|
private
|
56
57
|
|
58
|
+
# Creates a list of all files that are in the directory to be archived.
|
59
|
+
#
|
60
|
+
# @param path [String] the path to the directory that will be archived.
|
61
|
+
# @return [Array] an array of all files to be archived.
|
62
|
+
# @api private
|
63
|
+
def all_files(path)
|
64
|
+
Dir.glob(File.join(path, "/**/*"), File::FNM_DOTMATCH).reject { |f| %w{. ..}.include? File.basename(f) }
|
65
|
+
end
|
66
|
+
|
57
67
|
# Creats a archive of the directory provided.
|
58
68
|
#
|
59
69
|
# @param path [String] the path to the directory that will be archived.
|
70
|
+
# @param files [Array] the array of all files that will be archived.
|
60
71
|
# @param archive_path [String] the fully qualified path to the archive that will be created.
|
61
72
|
# @api private
|
62
|
-
def create_archive(path, archive_path)
|
73
|
+
def create_archive(path, files, archive_path)
|
63
74
|
Archive.write_open_filename(archive_path, Archive::COMPRESSION_GZIP,
|
64
75
|
Archive::FORMAT_TAR_PAX_RESTRICTED) do |tar|
|
65
|
-
write_content(tar, path)
|
76
|
+
write_content(tar, path, files)
|
66
77
|
end
|
67
78
|
end
|
68
79
|
|
@@ -70,10 +81,10 @@ module Kitchen
|
|
70
81
|
#
|
71
82
|
# @param tar [Archive::Writer] the instance of the archive class.
|
72
83
|
# @param path [String] the path to the directory that will be archived.
|
84
|
+
# @param files [Array] the array of all files that will be archived.
|
73
85
|
# @api private
|
74
|
-
def write_content(tar, path)
|
75
|
-
|
76
|
-
all_files.each do |f|
|
86
|
+
def write_content(tar, path, files)
|
87
|
+
files.each do |f|
|
77
88
|
if File.file? f
|
78
89
|
tar.new_entry do |e|
|
79
90
|
entry(e, f, path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-transport-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Steele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.3.
|
183
|
+
rubygems_version: 3.3.27
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: Skip the long lines in Kitchen Transport!
|