nugrant 1.2.0 → 1.3.0
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 +9 -9
- data/.gitignore +1 -0
- data/CHANGELOG.md +35 -2
- data/README.md +109 -2
- data/lib/nugrant/bag.rb +7 -3
- data/lib/nugrant/helper/bag.rb +12 -14
- data/lib/nugrant/helper/env.rb +232 -0
- data/lib/nugrant/vagrant/v1/command/env.rb +73 -0
- data/lib/nugrant/vagrant/v1/command/parameters.rb +13 -13
- data/lib/nugrant/vagrant/v1/command/root.rb +7 -2
- data/lib/nugrant/vagrant/v2/command/env.rb +73 -0
- data/lib/nugrant/vagrant/v2/command/parameters.rb +1 -1
- data/lib/nugrant/vagrant/v2/command/root.rb +7 -2
- data/lib/nugrant/version.rb +1 -1
- data/nugrant.gemspec +3 -2
- data/test/lib/nugrant/helper/test_env.rb +150 -0
- data/test/lib/nugrant/helper/test_stack.rb +2 -2
- data/test/lib/nugrant/test_bag.rb +7 -7
- data/test/lib/nugrant/test_config.rb +123 -120
- data/test/lib/nugrant/test_parameters.rb +199 -177
- data/test/resources/json/params_user_nil_values.json +9 -0
- data/test/resources/vagrantfiles/v2.defaults_null_values_in_vagrantuser +25 -0
- data/test/resources/yml/params_user_nil_values.yml +5 -0
- metadata +25 -51
@@ -0,0 +1,25 @@
|
|
1
|
+
# Source from https://github.com/maoueh/nugrant/issues/12#issuecomment-27054150
|
2
|
+
# but slightly modified
|
3
|
+
Vagrant.require_plugin('nugrant')
|
4
|
+
|
5
|
+
Vagrant.configure('2') do |config|
|
6
|
+
config.user.defaults = {
|
7
|
+
"host" => {
|
8
|
+
"rails_server_port" => 3000,
|
9
|
+
"apps_folder" => "../../rails-apps/" },
|
10
|
+
"plugins" => {
|
11
|
+
"vagrant_cachier" => {
|
12
|
+
"enabled" => false
|
13
|
+
}
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
puts "Host Rails Server Port: #{config.user.host.rails_server_port}"
|
18
|
+
puts "Host App Folder: #{config.user.host.apps_folder}"
|
19
|
+
puts "Gitconfig Name: #{config.user.gitconfig.name}"
|
20
|
+
puts "Gitconfig Email: #{config.user.gitconfig.email}"
|
21
|
+
|
22
|
+
if config.user.plugins.vagrant_cachier.enabled
|
23
|
+
puts "Vagrant Cachier is Enabled!"
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nugrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthieu Vachon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 5.0.8
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 5.0.8
|
41
55
|
description: ! " Nugrant is a library to easily handle parameters that need to
|
42
56
|
be\n injected into an application via different sources (system, user,\n project,
|
43
57
|
defaults).\n\n Nugrant can also be directly used as a Vagrant plugin. By activating\n
|
@@ -66,14 +80,17 @@ files:
|
|
66
80
|
- lib/nugrant/bag.rb
|
67
81
|
- lib/nugrant/config.rb
|
68
82
|
- lib/nugrant/helper/bag.rb
|
83
|
+
- lib/nugrant/helper/env.rb
|
69
84
|
- lib/nugrant/helper/stack.rb
|
70
85
|
- lib/nugrant/helper/yaml.rb
|
71
86
|
- lib/nugrant/parameters.rb
|
72
87
|
- lib/nugrant/vagrant/errors.rb
|
88
|
+
- lib/nugrant/vagrant/v1/command/env.rb
|
73
89
|
- lib/nugrant/vagrant/v1/command/parameters.rb
|
74
90
|
- lib/nugrant/vagrant/v1/command/root.rb
|
75
91
|
- lib/nugrant/vagrant/v1/config/user.rb
|
76
92
|
- lib/nugrant/vagrant/v1/plugin.rb
|
93
|
+
- lib/nugrant/vagrant/v2/command/env.rb
|
77
94
|
- lib/nugrant/vagrant/v2/command/parameters.rb
|
78
95
|
- lib/nugrant/vagrant/v2/command/root.rb
|
79
96
|
- lib/nugrant/vagrant/v2/config/user.rb
|
@@ -82,6 +99,7 @@ files:
|
|
82
99
|
- lib/vagrant_init.rb
|
83
100
|
- locales/en.yml
|
84
101
|
- nugrant.gemspec
|
102
|
+
- test/lib/nugrant/helper/test_env.rb
|
85
103
|
- test/lib/nugrant/helper/test_stack.rb
|
86
104
|
- test/lib/nugrant/test_bag.rb
|
87
105
|
- test/lib/nugrant/test_config.rb
|
@@ -103,6 +121,7 @@ files:
|
|
103
121
|
- test/resources/json/params_unix_eol.json
|
104
122
|
- test/resources/json/params_user_1.json
|
105
123
|
- test/resources/json/params_user_2.json
|
124
|
+
- test/resources/json/params_user_nil_values.json
|
106
125
|
- test/resources/json/params_windows_eol.json
|
107
126
|
- test/resources/vagrantfiles/v1.defaults_mixed_string_symbols
|
108
127
|
- test/resources/vagrantfiles/v1.defaults_using_string
|
@@ -112,6 +131,7 @@ files:
|
|
112
131
|
- test/resources/vagrantfiles/v1.missing_parameter
|
113
132
|
- test/resources/vagrantfiles/v1.real
|
114
133
|
- test/resources/vagrantfiles/v2.defaults_mixed_string_symbols
|
134
|
+
- test/resources/vagrantfiles/v2.defaults_null_values_in_vagrantuser
|
115
135
|
- test/resources/vagrantfiles/v2.defaults_using_string
|
116
136
|
- test/resources/vagrantfiles/v2.defaults_using_symbol
|
117
137
|
- test/resources/vagrantfiles/v2.empty
|
@@ -133,6 +153,7 @@ files:
|
|
133
153
|
- test/resources/yml/params_unix_eol.yml
|
134
154
|
- test/resources/yml/params_user_1.yml
|
135
155
|
- test/resources/yml/params_user_2.yml
|
156
|
+
- test/resources/yml/params_user_nil_values.yml
|
136
157
|
- test/resources/yml/params_windows_eol.yml
|
137
158
|
homepage: https://github.com/maoueh/nugrant
|
138
159
|
licenses: []
|
@@ -153,60 +174,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
174
|
version: '0'
|
154
175
|
requirements: []
|
155
176
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
177
|
+
rubygems_version: 2.1.11
|
157
178
|
signing_key:
|
158
179
|
specification_version: 4
|
159
180
|
summary: Library to handle user specific parameters from various location.
|
160
181
|
test_files:
|
182
|
+
- test/lib/nugrant/helper/test_env.rb
|
161
183
|
- test/lib/nugrant/helper/test_stack.rb
|
162
184
|
- test/lib/nugrant/test_bag.rb
|
163
185
|
- test/lib/nugrant/test_config.rb
|
164
186
|
- test/lib/nugrant/test_parameters.rb
|
165
|
-
- test/resources/.vagrantuser
|
166
|
-
- test/resources/README.md
|
167
|
-
- test/resources/json/params_array.json
|
168
|
-
- test/resources/json/params_boolean.json
|
169
|
-
- test/resources/json/params_combinations.json
|
170
|
-
- test/resources/json/params_defaults_at_root.json
|
171
|
-
- test/resources/json/params_defaults_not_at_root.json
|
172
|
-
- test/resources/json/params_empty.json
|
173
|
-
- test/resources/json/params_list.json
|
174
|
-
- test/resources/json/params_project_1.json
|
175
|
-
- test/resources/json/params_project_2.json
|
176
|
-
- test/resources/json/params_simple.json
|
177
|
-
- test/resources/json/params_system_1.json
|
178
|
-
- test/resources/json/params_system_2.json
|
179
|
-
- test/resources/json/params_unix_eol.json
|
180
|
-
- test/resources/json/params_user_1.json
|
181
|
-
- test/resources/json/params_user_2.json
|
182
|
-
- test/resources/json/params_windows_eol.json
|
183
|
-
- test/resources/vagrantfiles/v1.defaults_mixed_string_symbols
|
184
|
-
- test/resources/vagrantfiles/v1.defaults_using_string
|
185
|
-
- test/resources/vagrantfiles/v1.defaults_using_symbol
|
186
|
-
- test/resources/vagrantfiles/v1.empty
|
187
|
-
- test/resources/vagrantfiles/v1.fake
|
188
|
-
- test/resources/vagrantfiles/v1.missing_parameter
|
189
|
-
- test/resources/vagrantfiles/v1.real
|
190
|
-
- test/resources/vagrantfiles/v2.defaults_mixed_string_symbols
|
191
|
-
- test/resources/vagrantfiles/v2.defaults_using_string
|
192
|
-
- test/resources/vagrantfiles/v2.defaults_using_symbol
|
193
|
-
- test/resources/vagrantfiles/v2.empty
|
194
|
-
- test/resources/vagrantfiles/v2.fake
|
195
|
-
- test/resources/vagrantfiles/v2.missing_parameter
|
196
|
-
- test/resources/vagrantfiles/v2.real
|
197
|
-
- test/resources/yml/params_array.yml
|
198
|
-
- test/resources/yml/params_boolean.yml
|
199
|
-
- test/resources/yml/params_combinations.yml
|
200
|
-
- test/resources/yml/params_defaults_at_root.yml
|
201
|
-
- test/resources/yml/params_defaults_not_at_root.yml
|
202
|
-
- test/resources/yml/params_empty.yml
|
203
|
-
- test/resources/yml/params_list.yml
|
204
|
-
- test/resources/yml/params_project_1.yml
|
205
|
-
- test/resources/yml/params_project_2.yml
|
206
|
-
- test/resources/yml/params_simple.yml
|
207
|
-
- test/resources/yml/params_system_1.yml
|
208
|
-
- test/resources/yml/params_system_2.yml
|
209
|
-
- test/resources/yml/params_unix_eol.yml
|
210
|
-
- test/resources/yml/params_user_1.yml
|
211
|
-
- test/resources/yml/params_user_2.yml
|
212
|
-
- test/resources/yml/params_windows_eol.yml
|