vagrant-scp-sync 0.5.27 → 0.5.28

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: b57515d717378b1daf432022a6c9b288503e116b08645bb0ddaa89a14719c295
4
- data.tar.gz: 5c26d7d94fd7dbafc95efe661617d27c7b4ddbf345b537af7c20a4ef354a2d7c
3
+ metadata.gz: bf6209e986838ed0df71e3def682be412a7c9bc67272bcd82761533dd4dc9a17
4
+ data.tar.gz: b09da588cf177e7b102414f5c1984ad3f5082d8dbc54af7717efb5cfb10444f5
5
5
  SHA512:
6
- metadata.gz: 90334be946bf82fea5f69fa97f3070e75dec9ee07baa8829d86b995c32bc0138077a956fe065cd69dbac04a3b2f94b3cb565d5f327b0b3709a9ea23082168b2c
7
- data.tar.gz: 19d2079b97289af6d5366367d58b299fd10a9263603f89e167e34b32652e1cabe58c8c8687c5b5a689f60a5e87697cae56fe662aa90d7f3081fc6a18adf652a8
6
+ metadata.gz: bbdc62a90063f5c4592826cb26c98848d88de8adfbce15249d329c07a5d62211b3091a6a5adf807faba350f042463f3c31a4b0023febabef7fb7eacf6a87ea4c
7
+ data.tar.gz: 8521432666f398a5fedea53cd5c8043ea16b0ca8c63890dd8fa6d077c334efb209db02fbf70a00d3f18258b00fe8f9b2515c7626ceb0f671fdee8ada9683fa75
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.28](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.27...v0.5.28) (2025-01-15)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that - making rubocop happy ([08d661f](https://github.com/STARTcloud/vagrant-scp-sync/commit/08d661f6a63e894d9f012d4969e99053c259dde1))
9
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that - making rubocop happy ([9a305a1](https://github.com/STARTcloud/vagrant-scp-sync/commit/9a305a16fe0bf43cf61c16260ad2e04c79663deb))
10
+
3
11
  ## [0.5.27](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.26...v0.5.27) (2025-01-15)
4
12
 
5
13
 
@@ -42,8 +42,9 @@ module VagrantPlugins
42
42
 
43
43
  if opts[:direction] == :upload || opts[:direction].nil?
44
44
  # For upload direction
45
- target_check = build_ssh_command(ssh_opts, "test -e '#{target_files}' && echo 'EXISTS' || echo 'NOT_EXISTS'", ssh_info)
46
- target_type_check = build_ssh_command(ssh_opts, "test -d '#{target_files}' && echo 'DIR' || echo 'FILE'", ssh_info)
45
+ target_path = opts[:to]
46
+ target_check = build_ssh_command(ssh_opts, "test -e '#{target_path}' && echo 'EXISTS' || echo 'NOT_EXISTS'", ssh_info)
47
+ target_type_check = build_ssh_command(ssh_opts, "test -d '#{target_path}' && echo 'DIR' || echo 'FILE'", ssh_info)
47
48
 
48
49
  # Check if target exists and its type
49
50
  target_exists = execute_command_with_output(machine, target_check).strip == 'EXISTS'
@@ -57,22 +58,22 @@ module VagrantPlugins
57
58
  end
58
59
 
59
60
  # Determine target path based on existence and trailing slash
60
- target_base = "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{target_files}'"
61
+ target_base = "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{target_path}'"
61
62
  target = if target_exists && target_is_dir && !has_trailing_slash_target
62
63
  # If target exists as directory but no trailing slash, put source inside it
63
- "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{target_files}/#{File.basename(source_files)}'"
64
+ "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{target_path}/#{File.basename(source_files)}'"
64
65
  else
65
66
  target_base
66
67
  end
67
68
 
68
69
  # Prepare remote target directory with proper permissions
69
- target_dir = target_files
70
- target_dir = File.dirname(target_files) unless target_is_dir || has_trailing_slash_target
70
+ target_dir = target_path
71
+ target_dir = File.dirname(target_path) unless target_is_dir || has_trailing_slash_target
71
72
 
72
73
  make_dir = build_ssh_command(ssh_opts, "sudo mkdir -p '#{target_dir}'", ssh_info)
73
74
  change_ownership = build_ssh_command(ssh_opts, "sudo chown -R #{opts[:owner]}:#{opts[:group]} '#{target_dir}'", ssh_info)
74
75
  change_permissions = build_ssh_command(ssh_opts, "sudo chmod -R 777 '#{target_dir}'", ssh_info)
75
- remove_dir = build_ssh_command(ssh_opts, "sudo rm -rf '#{target_files}'", ssh_info) if delete
76
+ remove_dir = build_ssh_command(ssh_opts, "sudo rm -rf '#{target_path}'", ssh_info) if delete
76
77
 
77
78
  elsif opts[:direction] == :download
78
79
  # For download direction
@@ -115,6 +116,8 @@ module VagrantPlugins
115
116
  end
116
117
 
117
118
  def self.build_scp_command(scp_path, ssh_opts, source, target)
119
+ # Quote the scp path if it contains spaces
120
+ scp_path = "'#{scp_path}'" if scp_path.include?(' ')
118
121
  [scp_path, '-r', *ssh_opts, source, target].join(' ')
119
122
  end
120
123
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Vagrant
4
4
  module ScpSync
5
- VERSION = '0.5.27'
5
+ VERSION = '0.5.28'
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.27
4
+ version: 0.5.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Gilbert