vagrant-save 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +11 -11
- data/README.md +73 -73
- data/lib/vagrant-save/command.rb +5 -3
- data/lib/vagrant-save/uploader.rb +3 -3
- data/lib/vagrant-save/version.rb +1 -1
- data/vagrant-save.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbb70882ed147e983a61e4a8d71ff3792fb11acc
|
4
|
+
data.tar.gz: 9cbb2b2f60f2e7a47a75fa7684f0fbd80bd90902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5436eab73dd9ee675c626c4ea42606c644c6a22973d124e36766107e328a853f3794716d46705bd365fce0a69ddcc0151949161f4b8defbf43bfa0bcbbe0ab72
|
7
|
+
data.tar.gz: dd836c4a22a466800e93bd8f202f61cfc56a3f7fb05ad855b38cb05d09dce3bd86ef83e4447e39551d6addcc547e858413ec97d449e1cf330ff9032201a46ec2
|
data/Gemfile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
group :development do
|
4
|
-
gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
|
5
|
-
end
|
6
|
-
|
7
|
-
gem 'vagrant-export', '>= 0.3.4', git: 'https://github.com/trenker/vagrant-export.git'
|
8
|
-
|
9
|
-
group :plugins do
|
10
|
-
gem 'vagrant-save', path: '.'
|
11
|
-
end
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :development do
|
4
|
+
gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
|
5
|
+
end
|
6
|
+
|
7
|
+
gem 'vagrant-export', '>= 0.3.4', git: 'https://github.com/trenker/vagrant-export.git'
|
8
|
+
|
9
|
+
group :plugins do
|
10
|
+
gem 'vagrant-save', path: '.'
|
11
|
+
end
|
data/README.md
CHANGED
@@ -1,73 +1,73 @@
|
|
1
|
-
# vagrant-save
|
2
|
-
|
3
|
-
This is a simple plugin to export boxes into .box files using [vagrant-export](https://github.com/trenker/vagrant-export) and pushes that file to a [boxserver](https://github.com/trenker/boxserver) instance.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Like with any other vagrant plugin:
|
8
|
-
|
9
|
-
```bash
|
10
|
-
vagrant plugin install vagrant-save
|
11
|
-
```
|
12
|
-
|
13
|
-
## Usage
|
14
|
-
|
15
|
-
Have a [boxserver](https://github.com/trenker/boxserver) instance running and set the property `config.vm.box_server_url` to its address in your vagrant file. So your `Vagrantfile` contains the following statements:
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
Vagrant.configure("2") do |config|
|
19
|
-
# This must be set
|
20
|
-
config.vm.box_server_url = "http://localhost:8001"
|
21
|
-
end
|
22
|
-
```
|
23
|
-
|
24
|
-
Then just run
|
25
|
-
|
26
|
-
```bash
|
27
|
-
vagrant save
|
28
|
-
```
|
29
|
-
|
30
|
-
to release a new version of your box.
|
31
|
-
|
32
|
-
By default, it increases the bugfix version number by one. So an installed 1.0.0 becomes 1.0.1. You can specify the version yourself using the parameter `-v|--version`, like this:
|
33
|
-
|
34
|
-
```bash
|
35
|
-
vagrant save -v 1.2.0
|
36
|
-
```
|
37
|
-
|
38
|
-
The parameter must always have all three digits and must be greater than the installed version.
|
39
|
-
|
40
|
-
You may want to clean up the boxserver by deleting old versions. The `-k|--keep` parameter sets how many versions to keep. The versions are sorted in descending order, older than the newest X will be deleted:
|
41
|
-
|
42
|
-
```bash
|
43
|
-
# Keeping the last six versions
|
44
|
-
vagrant save -k 6
|
45
|
-
|
46
|
-
# Keeping all versions
|
47
|
-
# Does not need to be written, as it is the default setting
|
48
|
-
vagrant save -k 0
|
49
|
-
```
|
50
|
-
|
51
|
-
## License
|
52
|
-
|
53
|
-
The MIT License (MIT)
|
54
|
-
|
55
|
-
Copyright (c) 2014 Georg Großberger
|
56
|
-
|
57
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
58
|
-
of this software and associated documentation files (the "Software"), to deal
|
59
|
-
in the Software without restriction, including without limitation the rights
|
60
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
61
|
-
copies of the Software, and to permit persons to whom the Software is
|
62
|
-
furnished to do so, subject to the following conditions:
|
63
|
-
|
64
|
-
The above copyright notice and this permission notice shall be included in
|
65
|
-
all copies or substantial portions of the Software.
|
66
|
-
|
67
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
68
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
69
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
70
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
71
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
72
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
73
|
-
THE SOFTWARE.
|
1
|
+
# vagrant-save
|
2
|
+
|
3
|
+
This is a simple plugin to export boxes into .box files using [vagrant-export](https://github.com/trenker/vagrant-export) and pushes that file to a [boxserver](https://github.com/trenker/boxserver) instance.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Like with any other vagrant plugin:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
vagrant plugin install vagrant-save
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Have a [boxserver](https://github.com/trenker/boxserver) instance running and set the property `config.vm.box_server_url` to its address in your vagrant file. So your `Vagrantfile` contains the following statements:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
Vagrant.configure("2") do |config|
|
19
|
+
# This must be set
|
20
|
+
config.vm.box_server_url = "http://localhost:8001"
|
21
|
+
end
|
22
|
+
```
|
23
|
+
|
24
|
+
Then just run
|
25
|
+
|
26
|
+
```bash
|
27
|
+
vagrant save
|
28
|
+
```
|
29
|
+
|
30
|
+
to release a new version of your box.
|
31
|
+
|
32
|
+
By default, it increases the bugfix version number by one. So an installed 1.0.0 becomes 1.0.1. You can specify the version yourself using the parameter `-v|--version`, like this:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
vagrant save -v 1.2.0
|
36
|
+
```
|
37
|
+
|
38
|
+
The parameter must always have all three digits and must be greater than the installed version.
|
39
|
+
|
40
|
+
You may want to clean up the boxserver by deleting old versions. The `-k|--keep` parameter sets how many versions to keep. The versions are sorted in descending order, older than the newest X will be deleted:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
# Keeping the last six versions
|
44
|
+
vagrant save -k 6
|
45
|
+
|
46
|
+
# Keeping all versions
|
47
|
+
# Does not need to be written, as it is the default setting
|
48
|
+
vagrant save -k 0
|
49
|
+
```
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
The MIT License (MIT)
|
54
|
+
|
55
|
+
Copyright (c) 2014 Georg Großberger
|
56
|
+
|
57
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
58
|
+
of this software and associated documentation files (the "Software"), to deal
|
59
|
+
in the Software without restriction, including without limitation the rights
|
60
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
61
|
+
copies of the Software, and to permit persons to whom the Software is
|
62
|
+
furnished to do so, subject to the following conditions:
|
63
|
+
|
64
|
+
The above copyright notice and this permission notice shall be included in
|
65
|
+
all copies or substantial portions of the Software.
|
66
|
+
|
67
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
68
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
69
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
70
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
71
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
72
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
73
|
+
THE SOFTWARE.
|
data/lib/vagrant-save/command.rb
CHANGED
@@ -66,10 +66,12 @@ module VagrantPlugins
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
ex = VagrantPlugins::Export::Exporter.new(
|
70
|
-
file = ex.
|
69
|
+
ex = VagrantPlugins::Export::Exporter.new(@env, @logger, machine)
|
70
|
+
file = ex.target_box
|
71
|
+
box_created = false
|
71
72
|
|
72
73
|
unless File.file?(file)
|
74
|
+
box_created = true
|
73
75
|
ex.handle(false, false)
|
74
76
|
end
|
75
77
|
|
@@ -88,7 +90,7 @@ module VagrantPlugins
|
|
88
90
|
providers: provider_name
|
89
91
|
)
|
90
92
|
|
91
|
-
FileUtils.remove(file)
|
93
|
+
FileUtils.remove(file) if box_created
|
92
94
|
|
93
95
|
if options[:keep] && options[:keep] > 1
|
94
96
|
up.clean(machine, options[:keep])
|
@@ -57,14 +57,14 @@ module VagrantPlugins
|
|
57
57
|
while true
|
58
58
|
break if connection.finished?
|
59
59
|
|
60
|
-
@env.ui.info('.', new_line: false)
|
61
|
-
i++
|
62
|
-
|
63
60
|
if i > 40
|
64
61
|
@env.ui.clear_line
|
65
62
|
i = 0
|
66
63
|
end
|
67
64
|
|
65
|
+
@env.ui.info('.', new_line: false)
|
66
|
+
i += 1
|
67
|
+
|
68
68
|
sleep 1
|
69
69
|
end
|
70
70
|
|
data/lib/vagrant-save/version.rb
CHANGED
data/vagrant-save.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-save
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Grossberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vagrant-export
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.4
|
20
20
|
type: :runtime
|
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: 0.
|
26
|
+
version: 0.3.4
|
27
27
|
description: Export boxes to a boxserver on a remote machine using HTTP/PUT
|
28
28
|
email: contact@grossberger-ge.org
|
29
29
|
executables: []
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.
|
63
|
+
rubygems_version: 2.4.6
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Export boxes to a boxserver
|