env_bang 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Rakefile +10 -1
- data/env_bang-rails.gemspec +20 -0
- data/lib/env_bang-rails.rb +17 -0
- data/lib/env_bang/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c6950075ca1b4ad501344c4add8c6c7e74d29e0
|
4
|
+
data.tar.gz: acc310530d8e8893ab49a708aceb326de2343bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02b440a566c7ea4f9935e33e7da004cbcd7bf0d1edde2d8a5876a7e205d55d3827637aae3b2fabdbfa75f6dbe58250af7e187bc3bec96e0691e54e79d547db4d
|
7
|
+
data.tar.gz: 4ddc971eeee49292e4cb82edd514157947b1b78ac5646b3e8591def786293c85fd90bed7f620853b262af7abc862c8747e142785d4fc2915cc20f819195024c7
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
#!/usr/bin/env rake
|
2
|
-
require "bundler/
|
2
|
+
require "bundler/gem_helper"
|
3
3
|
require 'rake/testtask'
|
4
4
|
|
5
|
+
namespace 'dotenv' do
|
6
|
+
Bundler::GemHelper.install_tasks :name => 'env_bang'
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace 'dotenv-rails' do
|
10
|
+
Bundler::GemHelper.install_tasks :name => 'env_bang-rails'
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'Run all tests'
|
5
14
|
Rake::TestTask.new do |t|
|
6
15
|
t.test_files = FileList['test/*_test.rb']
|
7
16
|
t.verbose = true
|
@@ -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 'env_bang/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "env_bang-rails"
|
8
|
+
spec.version = ENV_BANG::VERSION
|
9
|
+
spec.authors = ["Jonathan Camenisch"]
|
10
|
+
spec.email = ["jonathan@camenisch.net"]
|
11
|
+
spec.summary = %q{Use ENV! in Rails}
|
12
|
+
spec.description = %q{ENV! provides a thin wrapper around ENV to encourage central, self-documenting configuration and helpful error message.}
|
13
|
+
spec.homepage = "https://github.com/jcamenisch/ENV_BANG"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = %w[lib/env_bang-rails.rb]
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_dependency 'env_bang', ENV_BANG::VERSION
|
20
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'env_bang'
|
2
|
+
|
3
|
+
class ENV_BANG
|
4
|
+
class Railtie < Rails::Railtie
|
5
|
+
def env_rb_file
|
6
|
+
File.join(Rails.root, 'config/env.rb')
|
7
|
+
end
|
8
|
+
|
9
|
+
config.before_configuration do
|
10
|
+
if File.exists?(env_rb_file)
|
11
|
+
load env_rb_file
|
12
|
+
else
|
13
|
+
Rails.logger.warn "ENV! could not find your environment variable configuration. Please create #{env_rb_file} to set set up environment variables at Rails boot."
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/env_bang/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: env_bang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Camenisch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -52,7 +52,9 @@ files:
|
|
52
52
|
- LICENSE.txt
|
53
53
|
- README.md
|
54
54
|
- Rakefile
|
55
|
+
- env_bang-rails.gemspec
|
55
56
|
- env_bang.gemspec
|
57
|
+
- lib/env_bang-rails.rb
|
56
58
|
- lib/env_bang.rb
|
57
59
|
- lib/env_bang/version.rb
|
58
60
|
- test/env_bang_test.rb
|