vbuilder 0.2.0 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/helper.rb +4 -0
- data/lib/vbuilder/generator/attributes/virtualbox.yaml +8 -0
- data/lib/vbuilder/generator/provider.rb +8 -5
- data/lib/vbuilder/templates/master.erb +1 -1
- data/lib/vbuilder/templates/providers/virtualbox.erb +21 -0
- data/lib/vbuilder/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: 8479d5df508eff4eac537751e5ddd4a66f17ec66
|
4
|
+
data.tar.gz: 332a723e7f9d8659e67867fafee29f320987b6f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4156f0f12f351a3414b47aa12e3e81e5e7677b5d4ea6abf94d97ecf7556f16d9d83a5cada2fb3768a4dc11aeba308d44654825c081336c881e290c73d6b09a68
|
7
|
+
data.tar.gz: 898ab69486976a086021371f7bb9706985be2b85a830bca4f1d04f676419539764a6c88fb4aecf2bd8bfb6148c7b2d7dd77f324fa662256c7681cb8825eb9baa
|
data/lib/helper.rb
CHANGED
@@ -55,6 +55,10 @@ class Vbuilder
|
|
55
55
|
attributes[key] = cli.ask("#{key}: ", Integer)
|
56
56
|
when Float
|
57
57
|
attributes[key] = cli.ask("#{key}: ", Float)
|
58
|
+
when TrueClass
|
59
|
+
attributes[key] = cli.ask("#{key} - (true or false): ")
|
60
|
+
when FalseClass
|
61
|
+
attributes[key] = cli.ask("#{key} - (true or false): ")
|
58
62
|
else
|
59
63
|
puts attributes[key].class
|
60
64
|
end
|
@@ -25,14 +25,17 @@ class Vbuilder
|
|
25
25
|
|
26
26
|
def check_dependencies
|
27
27
|
installed = `vagrant plugin list`
|
28
|
-
@meta[:dependencies].
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
if @meta[:dependencies].count > 0
|
29
|
+
@meta[:dependencies].each do |dependency|
|
30
|
+
if !installed.include? dependency
|
31
|
+
puts "Unmet dependency"
|
32
|
+
puts "Missing plugin '#{dependency}'"
|
33
|
+
exit 1
|
34
|
+
end
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
38
|
+
|
36
39
|
end
|
37
40
|
end
|
38
41
|
end
|
@@ -15,7 +15,7 @@ Vagrant.configure(2) do |config|
|
|
15
15
|
config.vm.box = "<%= @vm_box %>"
|
16
16
|
# config.ssh.username = "user"
|
17
17
|
# config.ssh.pty = true
|
18
|
-
|
18
|
+
<%= render @meta[:provider] %>
|
19
19
|
# Disable automatic box update checking. If you disable this, then
|
20
20
|
# boxes will only be checked for updates when the user runs
|
21
21
|
# `vagrant box outdated`. This is not recommended.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
config.vm.provider :virtualbox do |v|
|
2
|
+
v.name = "<%= @name %>"
|
3
|
+
v.gui = <%= @gui %>
|
4
|
+
v.linked_clone = <%= @linked_clone %>
|
5
|
+
|
6
|
+
# Vagrant exposes a way to call any command against VBoxManage just prior to booting the machine.
|
7
|
+
# More documentation here https://docs.vagrantup.com/v2/virtualbox/configuration.html
|
8
|
+
# Multiple customize directives can be used.
|
9
|
+
# v.customize []
|
10
|
+
|
11
|
+
# There are some convenience shortcuts for memory and CPU settings
|
12
|
+
# v.memory = 1024
|
13
|
+
# v.cpus = 2
|
14
|
+
end
|
15
|
+
|
16
|
+
# More docs about virtualbox networking with vagrant here https://docs.vagrantup.com/v2/virtualbox/networking.html
|
17
|
+
# The VirtualBox provider supports using the private network as a VirtualBox internal network.
|
18
|
+
# By default, private networks are host-only networks, because those are the easiest to work with.
|
19
|
+
# However, internal networks can be enabled as well.
|
20
|
+
# config.vm.network "private_network", ip: "192.168.50.4",
|
21
|
+
# virtualbox__intnet: true
|
data/lib/vbuilder/version.rb
CHANGED