exportr 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -1
- data/lib/exportr/base.rb +3 -2
- data/lib/exportr/railtie.rb +2 -2
- data/lib/exportr/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -61,7 +61,13 @@ You can use flags longform *e.g.* `--add, --remove, --clear, --list` or shorhand
|
|
61
61
|
### FYI
|
62
62
|
|
63
63
|
You'll need to restart your webserver for the changes to take effect.
|
64
|
+
|
65
|
+
### New Updates!
|
66
|
+
|
67
|
+
Exportr now supports system configuration files for production deployments of rails apps. By default, exportr will load the YAML file in /etc/#{application_name}_#{rails_env}.yml. The prefix, '/etc', can be overridden by setting the environment variable EXPORTR_PREFIX.
|
68
|
+
|
69
|
+
Make sure the file is readable by your web process.
|
64
70
|
|
65
71
|
### License
|
66
72
|
|
67
|
-
Exportr © 2012 by Richard Calahan and contributors at [All Day
|
73
|
+
Exportr © 2012 by Richard Calahan and contributors at [All Day Every Day](http://alldayeveryday.com). It is licensed under the MIT license. See the include LICENSE file for details.
|
data/lib/exportr/base.rb
CHANGED
@@ -28,8 +28,9 @@ module Exportr
|
|
28
28
|
File.expand_path(CONFIG_FILE, rails_root)
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
32
|
-
|
31
|
+
def system_config_file
|
32
|
+
prefix = ENV['EXPORTR_PREFIX'] || SYSTEM_FILE_PATH
|
33
|
+
"#{prefix}/#{Rails.application.class.to_s.split('::')[0].downcase}_#{ENV['RAILS_ENV'] || 'development'}.yml"
|
33
34
|
end
|
34
35
|
|
35
36
|
end
|
data/lib/exportr/railtie.rb
CHANGED
@@ -6,14 +6,14 @@ module Exportr
|
|
6
6
|
|
7
7
|
extend Exportr::Base
|
8
8
|
|
9
|
-
config.
|
9
|
+
config.before_configuration do
|
10
10
|
|
11
11
|
if File.exists? config_file
|
12
12
|
config = YAML.load(File.open(config_file))
|
13
13
|
config.each_pair { |key,value| ENV[key] = value } if config
|
14
14
|
end
|
15
15
|
|
16
|
-
if File.exists?
|
16
|
+
if File.exists? system_config_file
|
17
17
|
config = YAML.load(File.open(system_env_file))
|
18
18
|
config.each_pair { |key,value| ENV[key] = value } if config
|
19
19
|
end
|
data/lib/exportr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exportr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Helps manage rails application specific environment variables for multiple
|
15
15
|
apps in development.
|