vagrant-configuration 0.0.2 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9fa797df7caf29590b9c501b57b8f0bd7edc64e
4
- data.tar.gz: c8fc4c5fdb6510f00d96a3e158e89a8f3696ccd1
3
+ metadata.gz: 178d64d5dc8c6b39ecebbb9be1f78a709cd0af49
4
+ data.tar.gz: b6a91772ff40a4f25876e5e07faf81ff79b71e10
5
5
  SHA512:
6
- metadata.gz: 556c3867bedbdea8a215ae112b290da8beafb5570873dbce6fea67301fffbffd43dbf4f56566e65dbf823fbfea9cffd311cd56aa5143e7102ee4923a7fd37dfe
7
- data.tar.gz: 1e07e2667c2be5bda77aae81d1500046b16d664893c8a6da76f8ce79f300cbc017b6eff0321ca229c030ccdd6d3603c99b3e8697a9689c731f6c8b1e12c00e94
6
+ metadata.gz: aed07fe2fd45d89d5cb2433e00d6e39baa1da8fe7c339b975d2f29bc1152c026bba02d1fcd29da3cde35dc57ab85432b93d9e9acf3e722fc2a0e27f9152c692c
7
+ data.tar.gz: 551749a97df54ce53820c61e830770174d3ccd1424c9f67553d182c43eb0804fbc5e4192fd921456568779667d2d099e8013e8954344a6d361b49228ef6e9a83
@@ -1,18 +1,21 @@
1
1
  require 'configuration'
2
2
 
3
- require "#{ENV['HOME']}/.vagrant.rb"
4
- C = Configuration.for 'vagrant'
5
-
6
3
  module VagrantPlugins
7
4
  module Configuration
8
5
  class Config < Vagrant.plugin("2", :config)
6
+ def initialize
7
+ if File.exists? "#{ENV['HOME']}/.vagrant.rb"
8
+ require "#{ENV['HOME']}/.vagrant.rb"
9
+ @conf = Configuration.for 'vagrant'
10
+ end
11
+ end
9
12
 
10
13
  def method_missing(method_id)
11
14
  env = ENV[method_id.to_s.upcase]
12
- conf = C.send(method_id)
13
15
  return env if env
14
- return conf if conf
15
- raise Exception.new("no configuration entry was found for #{method_id}")
16
+ res = @conf.send(method_id) if @conf
17
+ return res if res
18
+ raise Exception.new("no configuration entry or environment variable was found for #{method_id}")
16
19
  end
17
20
  end
18
21
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Configuration
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ronen Narkis