vagrant-dotvm 0.35.1 → 0.36.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-dotvm/config/invalidconfigerror.rb +1 -0
- data/lib/vagrant-dotvm/dotvm.rb +21 -12
- data/lib/vagrant-dotvm/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8778abd0fffaad0ecf7e19bd9f0161bf4e936d06
|
4
|
+
data.tar.gz: 7e108b5794e48293442d5368f77ea5c5356bb0d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4039d0bd6379ec0a7ad09897e9284cd91227f8d0f0892e8c78160cd8ffe66a454d32e3d466b9f057b1c2447f429d3c16e34b8d893b75be3bcd10beffe3d859a
|
7
|
+
data.tar.gz: 694570ceb77c4e7a80645f7c7c4351350d23ce79efb37b9498a8a49a4b3c301ee9b11790c1f367f5510fa4c78bd3cd859f54a1a5e66a29a78b87ff29a9d9017b
|
data/lib/vagrant-dotvm/dotvm.rb
CHANGED
@@ -7,10 +7,16 @@ module VagrantPlugins
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def inject(vc)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
begin
|
11
|
+
init_instance
|
12
|
+
load_options
|
13
|
+
load_projects
|
14
|
+
Injector::Instance.inject @instance, vc
|
15
|
+
rescue VagrantPlugins::Dotvm::Config::InvalidConfigError => e
|
16
|
+
raise Vagrant::Errors::VagrantError.new, "DotVM: #{e.file}: #{e.message}"
|
17
|
+
rescue Psych::SyntaxError => e
|
18
|
+
raise Vagrant::Errors::VagrantError.new, "DotVM: #{e.file}: Syntax error, line #{e.line}, #{e.problem}"
|
19
|
+
end
|
14
20
|
end
|
15
21
|
|
16
22
|
private
|
@@ -19,7 +25,7 @@ module VagrantPlugins
|
|
19
25
|
result = {}
|
20
26
|
|
21
27
|
Dir[path].each do |fname|
|
22
|
-
yaml = YAML.
|
28
|
+
yaml = YAML.load_file(fname) || {}
|
23
29
|
yaml.each do |name, value|
|
24
30
|
fail "Variable #{name} already exists." if result.key? name
|
25
31
|
result[name] = value
|
@@ -38,7 +44,7 @@ module VagrantPlugins
|
|
38
44
|
def load_options
|
39
45
|
Dir["#{@path}/options/*.yaml"].each do |file|
|
40
46
|
@instance.options = Replacer.new
|
41
|
-
.on(YAML.
|
47
|
+
.on(YAML.load_file(file) || {})
|
42
48
|
.using(@instance.variables)
|
43
49
|
.result
|
44
50
|
end
|
@@ -64,18 +70,21 @@ module VagrantPlugins
|
|
64
70
|
)
|
65
71
|
|
66
72
|
Dir["#{dir}/machines/*.yaml"].each do |file|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
.result
|
73
|
+
yaml = Replacer.new
|
74
|
+
.on(YAML.load_file(file) || [])
|
75
|
+
.using(@instance.variables.merge(project.variables))
|
76
|
+
.result
|
72
77
|
|
78
|
+
begin
|
73
79
|
yaml.each do |machine_yaml|
|
74
80
|
machine = project.new_machine
|
75
81
|
machine.populate machine_yaml
|
76
82
|
end
|
77
83
|
rescue VagrantPlugins::Dotvm::Config::InvalidConfigError => e
|
78
|
-
|
84
|
+
# add filename to exception so we can display
|
85
|
+
# nice error message later.
|
86
|
+
e.file = file
|
87
|
+
raise e
|
79
88
|
end
|
80
89
|
end
|
81
90
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-dotvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.36.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Magosa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,9 +103,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- - "
|
106
|
+
- - ">"
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
108
|
+
version: 1.3.1
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
111
|
rubygems_version: 2.4.5.1
|