vagrant-rsync 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/command.rb +13 -7
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzBkZGNkNDM2NmMxOGRjNTEyNGViNWE4NzVmOWE1YTBhMDdhMzgxMg==
4
+ YmZhNjg4ODYyZTVjNTM2YmY0YTBhOTA5ODE4MmY3NmE0ZWZlYzU5MQ==
5
5
  data.tar.gz: !binary |-
6
- OWFlMWUwNGEyNGExNTU1MTRlYTcxZWY5ZTAyYWQxZjA1MjExYzIxOQ==
6
+ MGNiMDI0M2E1Zjk3NjRhNzgyMWUxNzYzMmJiZjY1OTRjN2ZjNDQyYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NTJlOWIxYWZiMzNhNmRiZTg0Mzk4NGJlZTY0OTYyOWZmYjI5ZjhmMGE2MjI3
10
- MTVkMDYwYmU4NjY2OWRhNjgzOWMzYzU0MjhhODJhZjJiMjViOGVjYWU4OWUy
11
- YzBhMmIyNjliMDNhOTJkMjJiZjZiMzlhMDRkYTg3NGJiNDdjNzU=
9
+ NTdkNzI1ZmJmZDBkOTNkZmExMGVlYzAxZjc0MGVjYzQ5NmM0ZjE0Njc1NDhm
10
+ YzVlMjFkM2MyNmM2YThkZjY1MzI5OTYxMDlhNDgwOTVkMDA2ZWI1NzA4NTJm
11
+ ZDQ0NWIwNzU3YzE0MGM0YTFkODQwMjcyMDRiZmYwMDkxYmFlNmE=
12
12
  data.tar.gz: !binary |-
13
- N2RhZjZiOTEwOThiZGM2NzExYmJjOWEyNWEyMzkxZmFjYjhmYTQzNmE5NTFh
14
- ZTUzZGExMWI0ZDdjYTEzNWY2MDRiN2I2NzVjNDYxZGVlNTUxYmZjZDAzZjFk
15
- NDlkNTI0OGE2YzZkZmJlZGIwMjQ0ZTU1N2JmY2MwNmYyNjc0NmI=
13
+ YzU0YjZlYjhlYTY2NWQ0ODhkNGNkNjA2Y2RiNjU2ZjU2ZjRkMzlkYWJlNDAw
14
+ YWY1MThmNGIyOWZjYThjYjY4Mzc4MzZmZGI4MmE0NDdiYzkxYjg3ZWFmZDlj
15
+ MDNmYmJjM2RlNTI4NzcyMTViODU4NjVlYjc5OWJiYWFkYjIyMjk=
data/lib/command.rb CHANGED
@@ -30,16 +30,22 @@ module VagrantPlugins
30
30
  guestpath = data[:guestpath]
31
31
  ssh_info = vm.ssh_info
32
32
 
33
- ssh_options = "-p#{ssh_info[:port]} -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oIdentitiesOnly=yes -i#{ssh_info[:private_key_path]}"
34
- ssh_host = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"
33
+ rsync_options = "-aze --exclude #{vm.env.root_path}/.vagrant/ "
34
+ rsync_options << '-vvv' if options[:verbose]
35
35
 
36
- rsync_options = '-aze --exclude .vagrant/'
37
- rsync_options << 'vvv' if options[:verbose]
36
+ command = [
37
+ "rsync", "--verbose", "--archive", "-z",
38
+ "--exclude", ".vagrant/",
39
+ "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{ssh_info[:private_key_path]}'",
40
+ hostpath,
41
+ "#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
38
42
 
39
- command = 'rsync %s --delete %s -e "ssh %s" %s' % [rsync_options, hostpath, ssh_options, ssh_host]
40
- puts command if options[:verbose]
41
43
 
42
- r = Vagrant::Util::Subprocess.execute(command)
44
+ if options[:verbose]
45
+ puts command.join(" ")
46
+ end
47
+
48
+ r = Vagrant::Util::Subprocess.execute(*command)
43
49
  if r.exit_code != 0
44
50
  raise Errors::RsyncError,
45
51
  :guestpath => guestpath,
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module RSYNC
3
- VERSION = "0.0.3"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-rsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Cromie