vagrant-scp 0.5.3 → 0.5.4

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: 3f5e91d3b3bfd069036b1ff7e56680541948fcce
4
- data.tar.gz: 9a36c99d99290aea2efd26dd1b1c19181e34aeb1
3
+ metadata.gz: c94d03251e09000e8ae6cfb6b6ec6d2aa5970d0b
4
+ data.tar.gz: 61fdd2a2dc70a5ef98c1d6bf83037b8350ed7ae4
5
5
  SHA512:
6
- metadata.gz: bce9dc351807cdde5e7a6152056a6a8ec217a26a8a51ce969ab64c50c87d3337dd754fbd7eb7764799c3472a3e9f499daff8107f810bcbdbb92c18221507bddd
7
- data.tar.gz: ebc0bbf403458bf75f75be81b90f178d819a83a818366416624b9e5fa7497ed43fd186f2ec875bb528fffcfcdea60921af2d62265cbee777a7c617a2b5b4aae1
6
+ metadata.gz: a69f24db5e46b9fdf324c7224d1940f9d94e08dd55437466633ab5526548c3e411457face8cb8b39115b6b77af9783a4db082666a9fad7405716c8f9372fd532
7
+ data.tar.gz: ebb14738abc8d484262909e73ebeeef5d102e5a44e80afdb495e0c0c93e1789a4bf280f8aa068d6ea858797c194b9833bf556d48d497546f3d44861f7dbd35ec
@@ -1,4 +1,3 @@
1
- require 'net/scp'
2
1
 
3
2
  module VagrantPlugins
4
3
  module Scp
@@ -17,24 +16,25 @@ module VagrantPlugins
17
16
  with_target_vms(host) do |machine|
18
17
  @ssh_info = machine.ssh_info
19
18
  raise Vagrant::Errors::SSHNotReady if @ssh_info.nil?
20
- current_file = nil
21
- Net::SCP.send(
22
- net_ssh_command,
23
- @ssh_info[:host],
24
- @ssh_info[:username],
25
- source_files,
26
- target_files,
27
- :recursive => true,
28
- :ssh => {
29
- :port => @ssh_info[:port],
30
- :keys => @ssh_info[:private_key_path],
31
- :verbose => 2}
32
- ) do |_, name, sent, total|
33
- message = "\r#{name}: #{(sent*100.0/total).round(3)}%"
34
- message = "\n{message}" unless current_file == name
35
- STDOUT.write message
36
- current_file = name
19
+ user_at_host = "#{@ssh_info[:username]}@#{@ssh_info[:host]}"
20
+ if net_ssh_command == :upload!
21
+ target = "#{user_at_host}:#{target_files}"
22
+ source = source_files
23
+ else
24
+ target = target_files
25
+ source = "#{user_at_host}:#{source_files}"
37
26
  end
27
+ command = [
28
+ "scp",
29
+ "-r",
30
+ "-o StrictHostKeyChecking=no",
31
+ "-o UserKnownHostsFile=/dev/null",
32
+ "-o port=#{@ssh_info[:port]}",
33
+ "-i '#{@ssh_info[:private_key_path][0]}'",
34
+ source,
35
+ target
36
+ ].join(' ')
37
+ system(command)
38
38
  end
39
39
  end
40
40
 
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Scp
3
- VERSION = "0.5.3"
3
+ VERSION = "0.5.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-scp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Invernizzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-06 00:00:00.000000000 Z
11
+ date: 2015-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler