vagrant-configuration 0.0.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
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b0e7adccfa9555b1884c0ce2f9ab7c91bf0466ce
|
4
|
+
data.tar.gz: b4b71d4704ad5f0d95bd3546113c1ceabfff0024
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8287b33f69b77fa67c3515ce56b8ef386a925e6cd7946fd8eb094da94485237a2ed7b7f76750689fe2c309d9e456acc889033588cf203f2fea87b4fc2f06ef1e
|
7
|
+
data.tar.gz: 30d33ebe6597163fcaae18cfd98a89af4aa93db35e44c5ed90cfe968304e213ab5f4e0adbeed3e43f62875ebc6b1165dd7e4df71db543124d87c31d9159f81b3
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'configuration'
|
2
|
+
|
3
|
+
CC = Configuration
|
4
|
+
CC.path = ['.', ENV['HOME']]
|
5
|
+
CC.load('vagrant')
|
6
|
+
C = Configuration.for 'vagrant'
|
7
|
+
|
8
|
+
module VagrantPlugins
|
9
|
+
module Configuration
|
10
|
+
class Config < Vagrant.plugin("2", :config)
|
11
|
+
|
12
|
+
def method_missing(method_id)
|
13
|
+
env = ENV[method_id.to_s.upcase]
|
14
|
+
conf = C.send(method_id)
|
15
|
+
return env if env
|
16
|
+
return conf if conf
|
17
|
+
raise Exception.new("no configuration entry was found for #{method_id}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "The Vagrant ENV plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
# This is a sanity check to make sure no one is attempting to install
|
8
|
+
# this into an early Vagrant version.
|
9
|
+
if Vagrant::VERSION < "1.2.0"
|
10
|
+
raise "The Vagrant ENV plugin is only compatible with Vagrant 1.2+"
|
11
|
+
end
|
12
|
+
|
13
|
+
module VagrantPlugins
|
14
|
+
module Configuration
|
15
|
+
class Plugin < Vagrant.plugin("2")
|
16
|
+
name "Configuration"
|
17
|
+
description <<-DESC
|
18
|
+
Vagrant plugin to load configurations
|
19
|
+
DESC
|
20
|
+
|
21
|
+
config "configuration" do
|
22
|
+
require_relative "config"
|
23
|
+
Config
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vagrant-configuration/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vagrant-configuration"
|
8
|
+
spec.version = VagrantPlugins::Configuration::VERSION
|
9
|
+
spec.authors = ["Ronen Narkis"]
|
10
|
+
spec.email = ["narkisr@gmail.com"]
|
11
|
+
spec.summary = %q{Vagrant plugin to load configuration from user home or local folder}
|
12
|
+
spec.description = %q{Vagrant plugin to load configuration from user home or local folder}
|
13
|
+
spec.homepage = "http://github.com/narkisr/vagrant-configuration"
|
14
|
+
spec.license = "Apache V2"
|
15
|
+
spec.files = %w(vagrant-configuration.gemspec lib/vagrant-configuration.rb lib/vagrant-configuration/version.rb
|
16
|
+
lib/vagrant-configuration/config.rb lib/vagrant-configuration/plugin.rb)
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
spec.add_runtime_dependency "configuration", "~> 1.3.4"
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-configuration
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ronen Narkis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: configuration
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
41
|
+
description: Vagrant plugin to load configuration from user home or local folder
|
42
|
+
email:
|
43
|
+
- narkisr@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/vagrant-configuration.rb
|
49
|
+
- lib/vagrant-configuration/config.rb
|
50
|
+
- lib/vagrant-configuration/plugin.rb
|
51
|
+
- lib/vagrant-configuration/version.rb
|
52
|
+
- vagrant-configuration.gemspec
|
53
|
+
homepage: http://github.com/narkisr/vagrant-configuration
|
54
|
+
licenses:
|
55
|
+
- Apache V2
|
56
|
+
metadata: {}
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
requirements: []
|
72
|
+
rubyforge_project:
|
73
|
+
rubygems_version: 2.2.2
|
74
|
+
signing_key:
|
75
|
+
specification_version: 4
|
76
|
+
summary: Vagrant plugin to load configuration from user home or local folder
|
77
|
+
test_files: []
|