vagrant-configuration 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 178d64d5dc8c6b39ecebbb9be1f78a709cd0af49
4
- data.tar.gz: b6a91772ff40a4f25876e5e07faf81ff79b71e10
3
+ metadata.gz: d1e96cb3a8d9f2aff0a633e2e6c36b34de13a9b3
4
+ data.tar.gz: 83aab89d0daaeb1cc30b41ff90c15b51d2a0014f
5
5
  SHA512:
6
- metadata.gz: aed07fe2fd45d89d5cb2433e00d6e39baa1da8fe7c339b975d2f29bc1152c026bba02d1fcd29da3cde35dc57ab85432b93d9e9acf3e722fc2a0e27f9152c692c
7
- data.tar.gz: 551749a97df54ce53820c61e830770174d3ccd1424c9f67553d182c43eb0804fbc5e4192fd921456568779667d2d099e8013e8954344a6d361b49228ef6e9a83
6
+ metadata.gz: 3cdc85fc8a2157dfcdae01add90e0e79ee745983506f336f691eca891d974896111e72d075e3d2a4f04bc48c78e83cf311dacd7483306af782621cc4573ba867
7
+ data.tar.gz: 71f5278d73c38d6ecfe6ae98eaf806c31307c901bff002fdf262a2327b39aabaa8f6cd7ce3ec80c7addab2888ea84f7325234ddb6232fc8f140e344626381404
@@ -1,19 +1,23 @@
1
1
  require 'configuration'
2
-
2
+ C = Configuration
3
3
  module VagrantPlugins
4
4
  module Configuration
5
5
  class Config < Vagrant.plugin("2", :config)
6
6
  def initialize
7
- if File.exists? "#{ENV['HOME']}/.vagrant.rb"
7
+ if File.exist? "#{ENV['HOME']}/.vagrant.rb"
8
8
  require "#{ENV['HOME']}/.vagrant.rb"
9
- @conf = Configuration.for 'vagrant'
9
+ @conf = C.for 'vagrant'
10
10
  end
11
11
  end
12
12
 
13
13
  def method_missing(method_id)
14
14
  env = ENV[method_id.to_s.upcase]
15
15
  return env if env
16
- res = @conf.send(method_id) if @conf
16
+ begin
17
+ res = @conf.send(method_id) if @conf
18
+ rescue
19
+ puts "#{method_id} not found in #{ENV['HOME']}/.vagrant.rb"
20
+ end
17
21
  return res if res
18
22
  raise Exception.new("no configuration entry or environment variable was found for #{method_id}")
19
23
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Configuration
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-configuration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronen Narkis