rails_env_config 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/rails_env_config.rb +21 -0
- data/lib/rails_env_config/railtie.rb +7 -0
- metadata +49 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 49780c5c9523005665c66a9349a59f887b5ccb72
|
4
|
+
data.tar.gz: dd796940f1c528d195fb033fc7ae2eae6bff7300
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e3092ca702d57de379b06a3d930e51c2701dca6ff153db9e6c0e553b8cbcb4cc455ab698c09d5b5708aaf7e07515f68e62bc2f29372ea9026f0b27ce0965e5d9
|
7
|
+
data.tar.gz: aa0444151e5494efddc4d4f2038b9262d43463b6c37afeb62fc8857457d30afef0017f8f40b5c27d89f486f867b5af9a70559d194cae98c27c218df01f9b997b
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'rails_env_config/railtie'
|
3
|
+
|
4
|
+
module RailsEnvConfig
|
5
|
+
|
6
|
+
#
|
7
|
+
# Load some environment variables from a given path
|
8
|
+
#
|
9
|
+
def self.load(path)
|
10
|
+
if File.exist?(path)
|
11
|
+
YAML.load(File.open(path)).each do |key, value|
|
12
|
+
ENV[key.to_s] = value
|
13
|
+
end
|
14
|
+
$stderr.puts "=> Loaded local environment variables from #{path}"
|
15
|
+
true
|
16
|
+
else
|
17
|
+
false
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_env_config
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Cooke
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-11 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Loads the complete contents of config/environment.yml into ENV when a
|
14
|
+
Rails application starts.
|
15
|
+
email:
|
16
|
+
- adam@atechmedia.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- lib/rails_env_config.rb
|
22
|
+
- lib/rails_env_config/railtie.rb
|
23
|
+
homepage: http://adamcooke.io
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.2.2
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: A library to allow custom local environment variables to be loaded into a
|
47
|
+
Rails application.
|
48
|
+
test_files: []
|
49
|
+
has_rdoc:
|