vagrant-scp-sync 0.5.13 → 0.5.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d7890574cfeac17cfa54d6e859a59843468dc9b92ad3b794db653fab88621cf
4
- data.tar.gz: 590f3b065e047e2dc238b5435e786e3f6f3e6e2008fe098e3d57ebfc69af845a
3
+ metadata.gz: 11e117ab4ab00e45911fd5b03030c4d533109adb73eac10cf0de89e813ba6485
4
+ data.tar.gz: 29f64a74a37a7fe640b22d8b16a481aa08b67a57322e5f6822d9b6e52eac4790
5
5
  SHA512:
6
- metadata.gz: 40988d02a76d1b48976ab8d1059160893abdfec4b03bc4d4b99a5d2735435c8bb7b253d6626b0036473ea3f2bd13de437329ca5da003b9649c9bf72d1cac686d
7
- data.tar.gz: 918b1764a4dbb4ce9ffd71bf70446528b347b0402620b8215547ddb68aece4e20e956b952be38bc00a6cbf79a77b692a468a2f294e974472c4625f3712d59ed3
6
+ metadata.gz: 2c1f8ad98eed1f467d3d263e918527d5f326a11561be2ed0224a866aae72eb258b4fa90e91ab1831055672ac5030448860fb11913db8b18558988f68697b64d5
7
+ data.tar.gz: 19080ca8a5a4f742f41882cd4fbee4d58e67dcfae5320c2a35a527e7e883f6c8ebbda2421a5d6a85732e7c10c5f8d22ae3c7e316c8a6f41712ca442720426436
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## [0.5.13](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.12...v0.5.13) (2024-12-23)
4
12
 
5
13
 
@@ -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,24 +23,18 @@ module VagrantPlugins
25
23
  delete = scp_opts.include?('--delete')
26
24
 
27
25
  if opts[:direction] == :upload || opts[:direction].nil?
28
- source = sync_source_files
26
+ source = source_files
29
27
  target = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{target_files}"
30
- make_dir = build_ssh_command(ssh_opts, "sudo mkdir -p #{target_files}", ssh_info)
31
- change_ownership = build_ssh_command(ssh_opts, "sudo chown -R #{opts[:owner]}:#{opts[:group]} #{target_files}", ssh_info)
32
- change_permissions = build_ssh_command(ssh_opts, "sudo chmod 777 #{target_files}", ssh_info)
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]}:#{sync_source_files}"
34
+ source = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{source_files}"
36
35
  target = target_files
37
-
38
- # For directory sync or explicit directory target (ends with slash), create the full path
39
- if has_trailing_slash_source || target.end_with?('/')
40
- make_dir = "mkdir -p #{target}"
41
- else
42
- # For file targets, only create the parent directory if it's not '.'
43
- parent_dir = File.dirname(target)
44
- make_dir = parent_dir == '.' ? nil : "mkdir -p #{parent_dir}"
45
- end
36
+ target_dir = File.dirname(target_files)
37
+ make_dir = target_dir == '.' ? nil : "mkdir -p #{target_dir}"
46
38
  end
47
39
 
48
40
  synchronize = build_scp_command(scp_path, ssh_opts, source, target)
@@ -58,10 +50,6 @@ module VagrantPlugins
58
50
  Vagrant::Util::Platform.fs_real_path(expanded_path).to_s
59
51
  end
60
52
 
61
- def self.append_wildcard(path, has_trailing_slash)
62
- has_trailing_slash ? "#{path}/*" : path
63
- end
64
-
65
53
  def self.build_ssh_options(ssh_info)
66
54
  opts = %w[
67
55
  -o StrictHostKeyChecking=no
@@ -110,8 +98,7 @@ module VagrantPlugins
110
98
  stderr: stderr
111
99
  end
112
100
 
113
- private_class_method :expand_path, :append_wildcard, :build_ssh_options, :build_scp_options,
114
- :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
115
102
  end
116
103
  end
117
104
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Vagrant
4
4
  module ScpSync
5
- VERSION = '0.5.13'
5
+ VERSION = '0.5.14'
6
6
  NAME = 'vagrant-scp-sync'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-scp-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Gilbert