vagrant-save 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-save/command.rb +7 -8
- data/lib/vagrant-save/uploader.rb +4 -4
- data/lib/vagrant-save/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7010292589cb6518cd03465ce38d51046da2d3ac
|
4
|
+
data.tar.gz: 8344af243ce9131dc4c6e0385d8a0318b408a345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9286f323ff4c4bfe6e7ea0a7345dc00713d43f37632071304262bb80f7a2f7505b702723d4fba0a2e0dcfa211b8694e26e173de1b0b2e63ff7e7996676b0510
|
7
|
+
data.tar.gz: 07fedfbc0e783917f02b9e2a7f824def950d6abc7a0db7aa2d9e4a71a3d7e2b29358e50d8049a7fad6b69772dea4fae53eadabd571bc6cd99e9c27008eb849ce
|
data/lib/vagrant-save/command.rb
CHANGED
@@ -19,15 +19,15 @@ module VagrantPlugins
|
|
19
19
|
options[:keep] = 0
|
20
20
|
|
21
21
|
opts = OptionParser.new do |o|
|
22
|
-
o.banner = 'Usage: vagrant save [version]'
|
22
|
+
o.banner = 'Usage: vagrant save [-v|--version VERSION] [-k|--keep COUNT]'
|
23
23
|
o.separator ''
|
24
24
|
|
25
|
-
o.on('-v', '--version', 'Set the version of the uploaded box. Defaults to next bugfix version') do |
|
26
|
-
options[:version] =
|
25
|
+
o.on('-v', '--version', 'Set the version of the uploaded box. Defaults to next bugfix version') do |v|
|
26
|
+
options[:version] = v.to_s
|
27
27
|
end
|
28
28
|
|
29
|
-
o.on('-k', '--keep', 'Number of versions to keep, older will be removed. Must be >= 1. Defaults to 0.') do |
|
30
|
-
options[:keep] =
|
29
|
+
o.on('-k', '--keep', 'Number of versions to keep, older will be removed. Must be >= 1. Defaults to 0.') do |v|
|
30
|
+
options[:keep] = v.to_i
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -68,8 +68,7 @@ module VagrantPlugins
|
|
68
68
|
end
|
69
69
|
|
70
70
|
file = ex.handle(machine, false, false)
|
71
|
-
|
72
|
-
up.send(machine, file, version)
|
71
|
+
provider_name = up.send(machine, file, version)
|
73
72
|
|
74
73
|
@env.boxes.add(
|
75
74
|
file,
|
@@ -77,7 +76,7 @@ module VagrantPlugins
|
|
77
76
|
version,
|
78
77
|
force: true,
|
79
78
|
metadata_url: up.make_url(machine),
|
80
|
-
providers:
|
79
|
+
providers: provider_name
|
81
80
|
)
|
82
81
|
|
83
82
|
FileUtils.remove(file)
|
@@ -22,7 +22,7 @@ module VagrantPlugins
|
|
22
22
|
# @return int
|
23
23
|
def send(machine, file, version)
|
24
24
|
|
25
|
-
|
25
|
+
machine.ui.info('Uploading now')
|
26
26
|
|
27
27
|
@logger.debug("Preparing to send file #{file}")
|
28
28
|
|
@@ -56,16 +56,16 @@ module VagrantPlugins
|
|
56
56
|
|
57
57
|
raise VagrantPlugins::Save::Errors::UploadFailed unless res.http_header.status_code == 200
|
58
58
|
|
59
|
-
|
59
|
+
machine.ui.info('Upload successful')
|
60
60
|
|
61
|
-
|
61
|
+
provider
|
62
62
|
end
|
63
63
|
|
64
64
|
# @param [Vagrant::Machine] machine
|
65
65
|
# @param [int] keep
|
66
66
|
# @return int
|
67
67
|
def clean(machine, keep)
|
68
|
-
|
68
|
+
machine.ui.info('Cleaning up old versions')
|
69
69
|
|
70
70
|
data_url = make_url(machine)
|
71
71
|
|
data/lib/vagrant-save/version.rb
CHANGED