vagrant-env 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: afa95c44d31ef5fef6c40c939e67a479ef75fd2a
4
- data.tar.gz: 995ac12f8280661ddb405bf60e87af7e8cd9981f
3
+ metadata.gz: 4f120fac69cdf0a7cf3a55b1fde562ed5f89b90e
4
+ data.tar.gz: 75c406247f0893176eec510c2cec959e348a8d11
5
5
  SHA512:
6
- metadata.gz: 8899051415412397c6c085bc90acbd2c223e6a1394a96ed148263b376560a9069ef4f097b298e3a161ff0880f6e7ae0ba7b253298eb2bda1f135522d83852d2d
7
- data.tar.gz: d2a465e6a057cfccbd3e19c8a961aa33ce9193c6f8d47781b4562f9590368218113682d16c31e4989f430a2c4fe90030082a89a17274752a040668a9b827fe67
6
+ metadata.gz: 3bd43830a7c256b5fd6bc34da0f01024150fef242614bcfd9af8e80a160a27010450db69bbae447786aa56fcf8eb8af9b4c263d88e1f2689587598fa7dae3aee
7
+ data.tar.gz: 297157b168fc41f157440eb7fbf05fbd2d1bf5278e64c65f678e6b5edc02f2ce1ef2b593cb023f072ee1e8b874bc12ef3a2ab9047b6db39567ab3a9e77549f83
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vagrant ENV Plugin
2
2
 
3
- This is a [Vagrant](http://www.vagrantup.com) plugin to load environment variables from .env into ENV
3
+ This is a [Vagrant](http://www.vagrantup.com) plugin to load environment variables from .env into ENV. For more on how and why we use this plugin, please see http://kn0t.ch/vagrant-env-intro
4
4
 
5
5
  ## Usage
6
6
 
@@ -3,11 +3,33 @@ require 'dotenv'
3
3
  module VagrantPlugins
4
4
  module Env
5
5
  class Config < Vagrant.plugin("2", :config)
6
- attr_accessor :enable
7
- def initialize
8
- @enable = UNSET_VALUE
9
- Dotenv.load
6
+
7
+ # Simple interface:
8
+ # config.env.enable __FILE__
9
+ def enable(vagrantfile = nil)
10
+ if vagrantfile
11
+ load File.dirname(vagrantfile) + '/.env'
12
+ else
13
+ # The default is .env in the current directory - but that may not be
14
+ # the same directory that the Vagrantfile is in
15
+ # https://github.com/gosuri/vagrant-env/issues/2
16
+ load
17
+ end
18
+ end
19
+
20
+ # Lower-level methods - proxy to Dotenv:
21
+ def load(*filenames)
22
+ Dotenv::load *filenames
23
+ end
24
+
25
+ def load!(*filenames)
26
+ Dotenv::load! *filenames
27
+ end
28
+
29
+ def overload(*filenames)
30
+ Dotenv::overload *filenames
10
31
  end
32
+
11
33
  end
12
34
  end
13
35
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Env
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-env
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
  - Greg Osuri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-31 00:00:00.000000000 Z
11
+ date: 2015-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.9'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.6'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.6'
41
41
  description: Vagrant plugin to load environment variables from .env into ENV
@@ -62,17 +62,17 @@ require_paths:
62
62
  - lib
63
63
  required_ruby_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - '>='
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 2.4.1
75
+ rubygems_version: 2.4.7
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Vagrant plugin to load environment variables from .env into ENV