vagrant-scp-sync 0.5.12 → 0.5.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/vagrant-scp-sync/action/scp_sync.rb +9 -14
- data/lib/vagrant-scp-sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11e117ab4ab00e45911fd5b03030c4d533109adb73eac10cf0de89e813ba6485
|
4
|
+
data.tar.gz: 29f64a74a37a7fe640b22d8b16a481aa08b67a57322e5f6822d9b6e52eac4790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c1f8ad98eed1f467d3d263e918527d5f326a11561be2ed0224a866aae72eb258b4fa90e91ab1831055672ac5030448860fb11913db8b18558988f68697b64d5
|
7
|
+
data.tar.gz: 19080ca8a5a4f742f41882cd4fbee4d58e67dcfae5320c2a35a527e7e883f6c8ebbda2421a5d6a85732e7c10c5f8d22ae3c7e316c8a6f41712ca442720426436
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.5.14](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.13...v0.5.14) (2024-12-23)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* single file sync - lint ([c81fd34](https://github.com/STARTcloud/vagrant-scp-sync/commit/c81fd346a8ac76dba78244c18c0a7779baadbcf1))
|
9
|
+
* single file sync - lint ([cdeada6](https://github.com/STARTcloud/vagrant-scp-sync/commit/cdeada62478832d464b4baf73cc5c87eea58901c))
|
10
|
+
|
11
|
+
## [0.5.13](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.12...v0.5.13) (2024-12-23)
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* single file sync ([e827137](https://github.com/STARTcloud/vagrant-scp-sync/commit/e827137d3b5c64a1e226188ee29b04c205b8a855))
|
17
|
+
* single file sync - lint ([7b6d0cf](https://github.com/STARTcloud/vagrant-scp-sync/commit/7b6d0cf504ce0bf93f8e1ed0470b8755721ff23b))
|
18
|
+
|
3
19
|
## [0.5.12](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.11...v0.5.12) (2024-11-20)
|
4
20
|
|
5
21
|
|
@@ -12,8 +12,6 @@ module VagrantPlugins
|
|
12
12
|
raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
|
13
13
|
|
14
14
|
source_files = expand_path(opts[:map], machine)
|
15
|
-
has_trailing_slash_source = opts[:map].end_with?('/')
|
16
|
-
sync_source_files = append_wildcard(source_files, has_trailing_slash_source)
|
17
15
|
target_files = expand_path(opts[:to], machine)
|
18
16
|
|
19
17
|
opts[:owner] ||= ssh_info[:username]
|
@@ -25,16 +23,18 @@ module VagrantPlugins
|
|
25
23
|
delete = scp_opts.include?('--delete')
|
26
24
|
|
27
25
|
if opts[:direction] == :upload || opts[:direction].nil?
|
28
|
-
source =
|
26
|
+
source = source_files
|
29
27
|
target = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{target_files}"
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
target_dir = File.dirname(target_files)
|
29
|
+
make_dir = build_ssh_command(ssh_opts, "sudo mkdir -p #{target_dir}", ssh_info)
|
30
|
+
change_ownership = build_ssh_command(ssh_opts, "sudo chown -R #{opts[:owner]}:#{opts[:group]} #{target_dir}", ssh_info)
|
31
|
+
change_permissions = build_ssh_command(ssh_opts, "sudo chmod 777 #{target_dir}", ssh_info)
|
33
32
|
remove_dir = build_ssh_command(ssh_opts, "sudo rm -rf #{target_files}", ssh_info)
|
34
33
|
elsif opts[:direction] == :download
|
35
|
-
source = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{
|
34
|
+
source = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{source_files}"
|
36
35
|
target = target_files
|
37
|
-
|
36
|
+
target_dir = File.dirname(target_files)
|
37
|
+
make_dir = target_dir == '.' ? nil : "mkdir -p #{target_dir}"
|
38
38
|
end
|
39
39
|
|
40
40
|
synchronize = build_scp_command(scp_path, ssh_opts, source, target)
|
@@ -50,10 +50,6 @@ module VagrantPlugins
|
|
50
50
|
Vagrant::Util::Platform.fs_real_path(expanded_path).to_s
|
51
51
|
end
|
52
52
|
|
53
|
-
def self.append_wildcard(path, has_trailing_slash)
|
54
|
-
has_trailing_slash ? "#{path}/*" : path
|
55
|
-
end
|
56
|
-
|
57
53
|
def self.build_ssh_options(ssh_info)
|
58
54
|
opts = %w[
|
59
55
|
-o StrictHostKeyChecking=no
|
@@ -102,8 +98,7 @@ module VagrantPlugins
|
|
102
98
|
stderr: stderr
|
103
99
|
end
|
104
100
|
|
105
|
-
private_class_method :expand_path, :
|
106
|
-
:build_ssh_command, :build_scp_command, :execute_command, :raise_scp_error
|
101
|
+
private_class_method :expand_path, :build_ssh_options, :build_scp_options, :build_ssh_command, :build_scp_command, :execute_command, :raise_scp_error
|
107
102
|
end
|
108
103
|
end
|
109
104
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-scp-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Gilbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|