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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 287b06064bf43d1929be703bf94162da9410405e
4
- data.tar.gz: af7afbcc9e86a6b49a8f707d30f36f72a69f0c51
3
+ metadata.gz: 2c6950075ca1b4ad501344c4add8c6c7e74d29e0
4
+ data.tar.gz: acc310530d8e8893ab49a708aceb326de2343bee
5
5
  SHA512:
6
- metadata.gz: 34468725fcb5025f66a3f07465c23c1a2339954f1437354867c9c6d4593715a053d79bccad4d38fa13a113cbee0988d33259931504c3911cd7b8c93b901dc13d
7
- data.tar.gz: f3d75bd63a8a9bae881e44f11bfc7d718e90a508dbb398eec0a79801a4a79ff3abaa3d551e8b1701e1e08f2139587d650ba39a9fd3692cb91262a7299f4cddbf
6
+ metadata.gz: 02b440a566c7ea4f9935e33e7da004cbcd7bf0d1edde2d8a5876a7e205d55d3827637aae3b2fabdbfa75f6dbe58250af7e187bc3bec96e0691e54e79d547db4d
7
+ data.tar.gz: 4ddc971eeee49292e4cb82edd514157947b1b78ac5646b3e8591def786293c85fd90bed7f620853b262af7abc862c8747e142785d4fc2915cc20f819195024c7
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
3
+ gemspec name: 'env_bang'
4
4
 
5
5
  group :metrics do
6
6
  gem 'coveralls', require: false
data/Rakefile CHANGED
@@ -1,7 +1,16 @@
1
1
  #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
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
@@ -1,3 +1,3 @@
1
1
  class ENV_BANG
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.5"
3
3
  end
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.3
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-09 00:00:00.000000000 Z
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