nugrant 1.0.0 → 1.0.1
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.
- data/.travis.yml +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +3 -3
- data/README.md +34 -6
- data/lib/nugrant/vagrant/v1/command/parameters.rb +2 -1
- data/lib/nugrant/vagrant/v1/command/root.rb +1 -0
- data/lib/nugrant/vagrant/v2/command/parameters.rb +2 -5
- data/lib/nugrant/version.rb +1 -1
- data/test/resources/Vagrantfile.v1.empty +2 -0
- data/test/resources/Vagrantfile.v1.fake +1 -1
- data/test/resources/Vagrantfile.v2.empty +4 -0
- data/test/resources/Vagrantfile.v2.fake +2 -0
- data/test/resources/Vagrantfile.v2.real +2 -0
- metadata +8 -4
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 1.0.1 (April 9th, 2013)
|
2
|
+
|
3
|
+
* Fixed a crash when `user` config value is `nil` preventing `vagrant user parameters`
|
4
|
+
from working as expected. [GH-4](https://github.com/maoueh/nugrant/issues/4)
|
5
|
+
* Fixed a bug preventing the version from being printed when doing `vagrant user -v`.
|
6
|
+
|
1
7
|
# 1.0.0 (March 21th, 2013)
|
2
8
|
|
3
9
|
* For now on, this gem will follow semantic versioning.
|
data/Gemfile
CHANGED
@@ -5,13 +5,13 @@ gemspec
|
|
5
5
|
group :development do
|
6
6
|
vagrant_dependencies = {
|
7
7
|
'v1' => {
|
8
|
-
'home' => "
|
8
|
+
'home' => "~/.vagrant.d.v1",
|
9
9
|
'gem' => Proc.new do
|
10
10
|
gem "vagrant", "~> 1.0.5"
|
11
11
|
end,
|
12
12
|
},
|
13
13
|
'v2' => {
|
14
|
-
'home' => "
|
14
|
+
'home' => "~/.vagrant.d",
|
15
15
|
'gem' => Proc.new do
|
16
16
|
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
|
17
17
|
end,
|
@@ -21,7 +21,7 @@ group :development do
|
|
21
21
|
vagrant_plugin_version = ENV['VAGRANT_PLUGIN_VERSION'] || "v2"
|
22
22
|
vagrant_dependency = vagrant_dependencies[vagrant_plugin_version]
|
23
23
|
|
24
|
-
ENV['VAGRANT_HOME'] = vagrant_dependency['home']
|
24
|
+
ENV['VAGRANT_HOME'] = File.expand_path(vagrant_dependency['home'])
|
25
25
|
|
26
26
|
vagrant_dependency['gem'].call()
|
27
27
|
end
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ If you would like to use Nugrant as a library, simply reference
|
|
17
17
|
it as a dependency of your application. Probably by adding it to
|
18
18
|
your `Gemfile` or your `.gemspec` file.
|
19
19
|
|
20
|
-
nugrant ~> 0.0
|
20
|
+
nugrant ~> 1.0.0
|
21
21
|
|
22
22
|
### Vagrant
|
23
23
|
|
@@ -25,22 +25,50 @@ If you would like to use Nugrant as a Vagrant plugin, the
|
|
25
25
|
detailed installation steps are provided below. Without a
|
26
26
|
doubt, you need Vagrant installed for those steps to work ;)
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
First of all, Vagrant's plugin system is very well done and
|
29
|
+
Nugrant supports version `v1` (1.0.z branch, like 1.0.7) and
|
30
|
+
`v2` (1.y.z branch, like 1.1.3). However, the installation
|
31
|
+
procedure between the two versions is different.
|
32
|
+
|
33
|
+
To know which version you currently have installed, type
|
34
|
+
`vagrant -v` in a terminal.
|
35
|
+
|
36
|
+
#### Version 1.0.z (latest version tested 1.0.7)
|
37
|
+
|
38
|
+
In this version, there is two different ways to install Nugrant.
|
39
|
+
You can install it via Vagrant or directly via the system gem
|
40
|
+
container.
|
30
41
|
|
31
42
|
When you install via Vagrant, the main benefit is that
|
32
43
|
it's decoupled from other system gems. There is less
|
33
44
|
chance for this gem's dependencies, even if they are minimal,
|
34
45
|
to clash with gems already installed on your system. This is the
|
35
|
-
recommended installation method. To install, simply run
|
46
|
+
recommended installation method. To install, simply run in
|
47
|
+
a terminal:
|
36
48
|
|
37
49
|
> vagrant gem install nugrant
|
38
50
|
|
39
|
-
If you prefer to install the gem in
|
40
|
-
please use this command instead:
|
51
|
+
If you prefer to install the gem in via the system gem
|
52
|
+
container, please use this command instead:
|
41
53
|
|
42
54
|
> gem install nugrant
|
43
55
|
|
56
|
+
#### Version 1.y.z (latest version tested 1.1.3)
|
57
|
+
|
58
|
+
In those versions, probably until 2.y.z is out, there
|
59
|
+
is a new way to install and register plugin with the Vagrant
|
60
|
+
environment.
|
61
|
+
|
62
|
+
To install when using one of this versions, simply run in a
|
63
|
+
terminal:
|
64
|
+
|
65
|
+
> vagrant plugin install nugrant
|
66
|
+
|
67
|
+
Since the plugin system has been completely rewritten in those
|
68
|
+
versions, it is not possible anymore to make the plugin available
|
69
|
+
within Vagrant when installing Nugrant in the system
|
70
|
+
gem container.
|
71
|
+
|
44
72
|
## Usage
|
45
73
|
|
46
74
|
Whether used as a library or a Vagrant plugin, Nugrant has some
|
@@ -60,7 +60,8 @@ module Nugrant
|
|
60
60
|
|
61
61
|
@logger.debug("'Parameters' each target VM...")
|
62
62
|
with_target_vms(arguments) do |vm|
|
63
|
-
|
63
|
+
config = vm.config.keys[:user]
|
64
|
+
parameters = config ? config.parameters : Nugrant::Parameters.new()
|
64
65
|
|
65
66
|
@env.ui.info("# Vm '#{vm.name}'", :prefix => false)
|
66
67
|
|
@@ -60,7 +60,8 @@ module Nugrant
|
|
60
60
|
|
61
61
|
@logger.debug("'Parameters' each target VM...")
|
62
62
|
with_target_vms(arguments) do |vm|
|
63
|
-
|
63
|
+
config = vm.config.user
|
64
|
+
parameters = config ? config.parameters : Nugrant::Parameters.new()
|
64
65
|
|
65
66
|
@env.ui.info("# Vm '#{vm.name}'", :prefix => false)
|
66
67
|
|
@@ -126,10 +127,6 @@ module Nugrant
|
|
126
127
|
@env.ui.info(" #{kind.capitalize} Parameters", :prefix => false)
|
127
128
|
@env.ui.info(" " + "-" * length, :prefix => false)
|
128
129
|
end
|
129
|
-
|
130
|
-
def compute_header_length(string)
|
131
|
-
|
132
|
-
end
|
133
130
|
end
|
134
131
|
end
|
135
132
|
end
|
data/lib/nugrant/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nugrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: deep_merge
|
@@ -87,8 +87,10 @@ files:
|
|
87
87
|
- test/lib/nugrant/test_parameters_bag.rb
|
88
88
|
- test/resources/.vagrantuser
|
89
89
|
- test/resources/README.md
|
90
|
+
- test/resources/Vagrantfile.v1.empty
|
90
91
|
- test/resources/Vagrantfile.v1.fake
|
91
92
|
- test/resources/Vagrantfile.v1.real
|
93
|
+
- test/resources/Vagrantfile.v2.empty
|
92
94
|
- test/resources/Vagrantfile.v2.fake
|
93
95
|
- test/resources/Vagrantfile.v2.real
|
94
96
|
- test/resources/json/params_boolean.json
|
@@ -135,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
137
|
version: '0'
|
136
138
|
segments:
|
137
139
|
- 0
|
138
|
-
hash: -
|
140
|
+
hash: -217736077
|
139
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
142
|
none: false
|
141
143
|
requirements:
|
@@ -144,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
146
|
version: '0'
|
145
147
|
segments:
|
146
148
|
- 0
|
147
|
-
hash: -
|
149
|
+
hash: -217736077
|
148
150
|
requirements: []
|
149
151
|
rubyforge_project:
|
150
152
|
rubygems_version: 1.8.24
|
@@ -157,8 +159,10 @@ test_files:
|
|
157
159
|
- test/lib/nugrant/test_parameters_bag.rb
|
158
160
|
- test/resources/.vagrantuser
|
159
161
|
- test/resources/README.md
|
162
|
+
- test/resources/Vagrantfile.v1.empty
|
160
163
|
- test/resources/Vagrantfile.v1.fake
|
161
164
|
- test/resources/Vagrantfile.v1.real
|
165
|
+
- test/resources/Vagrantfile.v2.empty
|
162
166
|
- test/resources/Vagrantfile.v2.fake
|
163
167
|
- test/resources/Vagrantfile.v2.real
|
164
168
|
- test/resources/json/params_boolean.json
|