这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in vagrant-env.gemspec
# Specify your gem's dependencies in vagrant-readenv.gemspec
gemspec

group :development do
Expand All @@ -9,5 +9,5 @@ group :development do
end

group :plugins do
gem "vagrant-env", path: "."
gem "vagrant-readenv", path: "."
end
6 changes: 0 additions & 6 deletions lib/vagrant-env.rb

This file was deleted.

6 changes: 6 additions & 0 deletions lib/vagrant-readenv.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
require "dotenv"
require "vagrant-readenv/plugin"

module VagrantPlugins
module ReadEnv; end
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'dotenv'

module VagrantPlugins
module Env
module ReadEnv
class Config < Vagrant.plugin("2", :config)

# Simple interface:
Expand Down
8 changes: 4 additions & 4 deletions lib/vagrant-env/plugin.rb → lib/vagrant-readenv/plugin.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
begin
require "vagrant"
rescue LoadError
raise "The Vagrant ENV plugin must be run within Vagrant."
raise "The Vagrant READENV plugin must be run within Vagrant."
end

# This is a sanity check to make sure no one is attempting to install
# this into an early Vagrant version.
if Vagrant::VERSION < "1.2.0"
raise "The Vagrant ENV plugin is only compatible with Vagrant 1.2+"
raise "The Vagrant READENV plugin is only compatible with Vagrant 1.2+"
end

module VagrantPlugins
module Env
module ReadEnv
class Plugin < Vagrant.plugin("2")
name "ENV"
name "READENV"
description <<-DESC
Vagrant plugin to load environment variables from .env into ENV
DESC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module Env
module ReadEnv
VERSION = "0.0.3"
end
end
8 changes: 4 additions & 4 deletions vagrant-env.gemspec → vagrant-readenv.gemspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'vagrant-env/version'
require 'vagrant-readenv/version'

Gem::Specification.new do |spec|
spec.name = "vagrant-env"
spec.name = "vagrant-readenv"
spec.version = VagrantPlugins::Env::VERSION
spec.authors = ["Greg Osuri"]
spec.email = ["greg@overclock.io"]
spec.summary = %q{Vagrant plugin to load environment variables from .env into ENV}
spec.description = %q{Vagrant plugin to load environment variables from .env into ENV}
spec.homepage = "http://github.com/gosuri/vagrant-env"
spec.homepage = "http://github.com/groovenectar/vagrant-readenv"
spec.license = "MIT"
spec.files = %w(README.md LICENSE.txt
vagrant-env.gemspec
Expand All @@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
lib/vagrant-env/config.rb
lib/vagrant-env/plugin.rb)
spec.require_paths = ["lib"]
spec.add_runtime_dependency "dotenv", "~> 0.9"
spec.add_runtime_dependency "dotenv", "~> 2.5"
spec.add_development_dependency "bundler", "~> 1.6"
end