vagrant-zscp 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: d179ea21dd718545fd86aaa090f968866acfd088
4
- data.tar.gz: 5dc67de587231d971d8e6e191d99ee6d22419fdd
3
+ metadata.gz: 98b0306ce377fd7732e122c431adf2b4cd39704b
4
+ data.tar.gz: 6d18d1ac0f8f679cd5b0a07fe0d7cb15f57dea1e
5
5
  SHA512:
6
- metadata.gz: 9ae6f4c8863c24d7b0a415bbe4e5d94b7ed047c5c8a76caf8b99166ab637d68dca2ba904981e553c15a7fe1ed27b668f74fcfb7d7283f87f080033b8557af160
7
- data.tar.gz: 629cc40a3e340a7a2f4553d56f5989cfa7ea360011bcfb01103273bfa83ec80f2878d6ff8d66164963385b8582934c63915502cd023dc2788f29602dc6b40db9
6
+ metadata.gz: 7d5370aab4f6c94a1377805ca55d634f83e221c0780955311b6a0bebfd3c3dbe95066d265da45f747731ccc24f8568d14e868f27a69ba1f8969c23a8cb676cae
7
+ data.tar.gz: fc1b28a0ed5821f098fab2813dfb5a5be3faff8eb9aa926897ae345095292ef637ffd1b27445935d829a88afd982df891b2dc2b254f485f535b7ac485a92d8ba
@@ -11,6 +11,7 @@ module Vagrant
11
11
 
12
12
  def self.scp(machine, ssh_info, opts)
13
13
  guestpath = opts[:guestpath]
14
+ guestpath += "/" if !guestpath.end_with?("/")
14
15
  hostpath = File.expand_path(opts[:hostpath], machine.env.root_path)
15
16
  hostpath = Vagrant::Util::Platform.fs_real_path(hostpath).to_s
16
17
  hostpath += "/" if !hostpath.end_with?("/")
@@ -25,11 +26,12 @@ module Vagrant
25
26
  host = ssh_info[:host]
26
27
 
27
28
  machine.ui.info("Sending #{hostpath} to #{guestpath}")
28
- remotely_execute(ssh_info, "sudo mkdir -p #{guestpath}; sudo chown #{username}:$(id -gn #{username}) #{guestpath}")
29
+ remotely_execute(ssh_info, "sudo mkdir -p #{guestpath} 2> /dev/null; sudo chown #{username}:$(id -gn #{username}) #{guestpath}")
29
30
 
30
- temp_file = `mktemp -t 'temp.XXXX.tar.gz'`.strip
31
+ temp_file = `mktemp -t 'temp.tar.gz' 2> /dev/null || mktemp -t 'temp.tar.gz.XXXX'`.strip
32
+ temp_file_name = Pathname.new(temp_file).basename
31
33
  machine.ui.info("Compressing #{hostpath} into #{temp_file}")
32
- system("tar -czhf #{temp_file} -C #{hostpath} #{included_files}")
34
+ `tar -czhf #{temp_file} -C #{hostpath} #{included_files}`
33
35
 
34
36
  machine.ui.info("Copying #{temp_file} to #{guestpath}")
35
37
  command = [
@@ -42,10 +44,9 @@ module Vagrant
42
44
  "#{temp_file}",
43
45
  "#{username}@#{host}:#{guestpath}"
44
46
  ].join(' ')
45
- system(command)
47
+ `#{command}`
46
48
 
47
- machine.ui.info("Extracting remotely #{guestpath}/temp.*.tar.gz")
48
- remotely_execute(ssh_info, "tar -xzf #{guestpath}/temp.*.tar.gz -C #{guestpath}; rm #{guestpath}/temp.*.tar.gz")
49
+ remotely_execute(ssh_info, "tar -xzf #{guestpath}#{temp_file_name} -C #{guestpath}; rm #{guestpath}#{temp_file_name}")
49
50
  machine.ui.info("#{guestpath} synchronised")
50
51
  end
51
52
 
@@ -60,7 +61,7 @@ module Vagrant
60
61
  "#{ssh_info[:username]}@#{ssh_info[:host]}",
61
62
  "'#{command}'"
62
63
  ].join(' ')
63
- system(ssh_command)
64
+ `#{ssh_command}`
64
65
  end
65
66
  end
66
67
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Zscp
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-zscp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Hebert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-23 00:00:00.000000000 Z
11
+ date: 2015-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler