local-env 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,8 @@
1
+ local_env = YAML.load_file("#{Rails.root}/config/local-env.yml") rescue nil
2
+
3
+ if local_env
4
+ local_env = local_env[Rails.env] || local_env
5
+ local_env.each_pair do |key, value|
6
+ ENV[key] ||= value
7
+ end
8
+ end
data/lib/local-env.rb ADDED
@@ -0,0 +1,4 @@
1
+ module LocalEnv
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: local-env
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Ian Terrell
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-04-20 00:00:00 Z
19
+ dependencies: []
20
+
21
+ description: Ruby on Rails engine to easily add values to ENV from a configuration yaml file
22
+ email: ian.terrell@gmail.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - lib/local-env.rb
31
+ - config/initializers/local-env.rb
32
+ homepage: https://github.com/ianterrell/local-env
33
+ licenses: []
34
+
35
+ post_install_message:
36
+ rdoc_options: []
37
+
38
+ require_paths:
39
+ - lib
40
+ required_ruby_version: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ hash: 3
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ requirements: []
59
+
60
+ rubyforge_project:
61
+ rubygems_version: 1.7.2
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: This engine allows you to use ENV values locally through a yaml configuration file. This is useful for development environments that will eventually deploy to Heroku. The yaml file can be kept out of your source control repo easily.
65
+ test_files: []
66
+