vagrant-scp 0.5.7 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +8 -7
- data/lib/vagrant/scp/commands/scp.rb +11 -2
- data/lib/vagrant/scp/version.rb +1 -1
- data/vagrant-scp.gemspec +3 -3
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df188ae6f299559786afcf799c99ee23f77010538f96d496ed0871006dedd5ec
|
4
|
+
data.tar.gz: b10ab56b55235b0c99c11b6d3663d8f35cfca5bd0c84d5520a523b339646457f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e478cb9254926da3eb9d65f6630408510343ff1f9c4b13301561ad906036d9bba199644628def3284ccf7af8b7aa4cc773a8c920cb0012ad5fe4c7868895931b
|
7
|
+
data.tar.gz: fc96757ab88b04308fa646aa9f8731da3f962a90827cdcd330fe5839b30ac207eab0c05cf939c478bfb9bdccab0dd8117598b36569def7ff2548371336eef405
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Vagrant::Scp
|
2
2
|
|
3
|
-
Copy files to a Vagrant
|
3
|
+
Copy files to a Vagrant guest via SCP.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,7 +10,7 @@ You need to install the plugin, like so
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
If you have just a single Vagrant
|
13
|
+
If you have just a single Vagrant guest, you can copy files over like this:
|
14
14
|
|
15
15
|
vagrant scp <some_local_file_or_dir> <somewhere_on_the_vm>
|
16
16
|
|
@@ -18,21 +18,22 @@ If you have multiple VMs, you can specify it.
|
|
18
18
|
|
19
19
|
vagrant scp <some_local_file_or_dir> [vm_name]:<somewhere_on_the_vm>
|
20
20
|
|
21
|
-
Copying files out of the
|
21
|
+
Copying files out of the guest works in the same fashion
|
22
22
|
|
23
23
|
vagrant scp [vm_name]:<somewhere_on_the_vm> <some_local_file_or_dir>
|
24
24
|
|
25
|
-
|
25
|
+
If source is a directory it will be copied recursively.
|
26
|
+
|
26
27
|
|
27
28
|
## Examples
|
28
29
|
|
29
|
-
If you have just one
|
30
|
+
If you have just one guest, you can copy files to it like this:
|
30
31
|
|
31
32
|
vagrant scp file_on_host.txt :file_on_vm.txt
|
32
33
|
|
33
|
-
And from the
|
34
|
+
And from the guest like this:
|
34
35
|
|
35
36
|
vagrant scp :file_on_vm.txt file_on_host.txt
|
36
37
|
|
37
38
|
## Vagrant version
|
38
|
-
We
|
39
|
+
We require Vagrant v1.7 or newer. If you are running older version (check with `vagrant --version`), install recent version directly from [vendor site](https://www.vagrantup.com/).
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pathname'
|
1
2
|
|
2
3
|
module VagrantPlugins
|
3
4
|
module Scp
|
@@ -51,7 +52,8 @@ module VagrantPlugins
|
|
51
52
|
def parse_args
|
52
53
|
opts = OptionParser.new do |o|
|
53
54
|
o.banner = "Usage: vagrant scp <local_path> [vm_name]:<remote_path> \n"
|
54
|
-
o.banner += " vagrant scp [vm_name]:<remote_path> <local_path>"
|
55
|
+
o.banner += " vagrant scp [vm_name]:<remote_path> <local_path> \n"
|
56
|
+
o.banner += "Directories will be copied recursively."
|
55
57
|
o.separator ""
|
56
58
|
o.separator "Options:"
|
57
59
|
o.separator ""
|
@@ -77,7 +79,11 @@ module VagrantPlugins
|
|
77
79
|
end
|
78
80
|
|
79
81
|
def target_files
|
80
|
-
|
82
|
+
if target_location_specified?
|
83
|
+
format_file_path(@file_2)
|
84
|
+
else
|
85
|
+
Pathname.new(source_files).basename
|
86
|
+
end
|
81
87
|
end
|
82
88
|
|
83
89
|
def format_file_path(filepath)
|
@@ -88,6 +94,9 @@ module VagrantPlugins
|
|
88
94
|
end
|
89
95
|
end
|
90
96
|
|
97
|
+
def target_location_specified?
|
98
|
+
!@file_2.end_with?(':')
|
99
|
+
end
|
91
100
|
end
|
92
101
|
|
93
102
|
end
|
data/lib/vagrant/scp/version.rb
CHANGED
data/vagrant-scp.gemspec
CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "
|
22
|
-
spec.add_development_dependency "rake", "
|
21
|
+
spec.add_development_dependency "bundler", ">= 2.2.10"
|
22
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
23
23
|
spec.add_runtime_dependency 'log4r', "~> 1.1"
|
24
|
-
spec.add_runtime_dependency 'net-scp', "
|
24
|
+
spec.add_runtime_dependency 'net-scp', ">= 1.1"
|
25
25
|
|
26
26
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-scp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Invernizzi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.10
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.10
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: log4r
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: net-scp
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.1'
|
69
69
|
description: Copy files to a Vagrant VM via SCP.
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.4.6
|
106
|
+
rubygems_version: 3.1.2
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: Copy files to a Vagrant VM via SCP.
|