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 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 Everyday](http://alldayeveryday.com). It is licensed under the MIT license. See the include LICENSE file for details.
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 system_env_file
32
- "#{SYSTEM_FILE_PATH}/#{Rails.application.class.to_s.split('::')[0].downcase}_#{ENV['RAILS_ENV'] || 'development'}.yml"
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
@@ -6,14 +6,14 @@ module Exportr
6
6
 
7
7
  extend Exportr::Base
8
8
 
9
- config.before_initialize do
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? system_env_file
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
@@ -1,3 +1,3 @@
1
1
  module Exportr
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.9
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-02-22 00:00:00.000000000 Z
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.