vagrant-hiera 0.3.2 → 0.3.3
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/lib/vagrant-hiera/config.rb +7 -7
- data/lib/vagrant-hiera/version.rb +1 -1
- metadata +2 -2
data/lib/vagrant-hiera/config.rb
CHANGED
@@ -16,11 +16,11 @@ module VagrantHiera
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def config_path
|
19
|
-
File.expand_path(@config_path) rescue
|
19
|
+
File.expand_path(@config_path) rescue nil
|
20
20
|
end
|
21
21
|
|
22
22
|
def data_path
|
23
|
-
File.expand_path(@data_path) rescue
|
23
|
+
File.expand_path(@data_path) rescue nil
|
24
24
|
end
|
25
25
|
|
26
26
|
def set?
|
@@ -28,12 +28,12 @@ module VagrantHiera
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def validate(env, errors)
|
31
|
-
errors.add("Config path can not be empty") if config_path.
|
32
|
-
errors.add("Config file can not be empty") if config_file.
|
33
|
-
errors.add("Data path can not be empty") if data_path.
|
31
|
+
errors.add("Config path can not be empty.") if config_path.nil?
|
32
|
+
errors.add("Config file can not be empty.") if config_file.nil?
|
33
|
+
errors.add("Data path can not be empty.") if data_path.nil?
|
34
34
|
config = File.join("#{config_path}", "#{config_file}")
|
35
|
-
errors.add("#{config}
|
36
|
-
errors.add("#{data_path}
|
35
|
+
errors.add("Config file not found at '#{config}'.") unless File.exists?(config)
|
36
|
+
errors.add("Data directory not found at '#{data_path}'.") unless File.exists?("#{data_path}")
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hiera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
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: 2012-07-
|
12
|
+
date: 2012-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vagrant
|