vagrant-save 0.2.5 → 0.2.6

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: 237450af49c88796ae3d73d286ffef88f95b38f2
4
- data.tar.gz: d95f646382d587681b5cc42a6decfd45b3920628
3
+ metadata.gz: 7010292589cb6518cd03465ce38d51046da2d3ac
4
+ data.tar.gz: 8344af243ce9131dc4c6e0385d8a0318b408a345
5
5
  SHA512:
6
- metadata.gz: b9bbfc397212f33647bd4415ae8dafb39ad048fdbce8ed5882cb7d52a54caefa5ec85d82ec07aa754661e9c4cfb3414182e3aa2c84636c875223edf842eab714
7
- data.tar.gz: 62b6f6190ad1b2dba152db139128a3351121bb945e8ae0f8f1c4d40810605576b6b8c1e1902704a044f140eb5580ca1db3122b59b9819ed76ce50e905fe3fd9f
6
+ metadata.gz: d9286f323ff4c4bfe6e7ea0a7345dc00713d43f37632071304262bb80f7a2f7505b702723d4fba0a2e0dcfa211b8694e26e173de1b0b2e63ff7e7996676b0510
7
+ data.tar.gz: 07fedfbc0e783917f02b9e2a7f824def950d6abc7a0db7aa2d9e4a71a3d7e2b29358e50d8049a7fad6b69772dea4fae53eadabd571bc6cd99e9c27008eb849ce
@@ -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 |c|
26
- options[:version] = c.to_s
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 |c|
30
- options[:keep] = c.to_i
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: machine.provider_name.to_s
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
- @env.ui.info('Uploading now')
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
- @env.ui.info('Upload successful')
59
+ machine.ui.info('Upload successful')
60
60
 
61
- 0
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
- @env.ui.info('Cleaning up old versions')
68
+ machine.ui.info('Cleaning up old versions')
69
69
 
70
70
  data_url = make_url(machine)
71
71
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module VagrantPlugins
7
7
  module Save
8
- VERSION = '0.2.5'
8
+ VERSION = '0.2.6'
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-save
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Grossberger