lib/confidential/railtie.rb in confidential-0.0.8 vs lib/confidential/railtie.rb in confidential-3.0.0.0
- old
+ new
@@ -1,11 +1,13 @@
module Confidential
class Railtie < Rails::Railtie
config.before_configuration do
- confidential_file = Rails.root.join('config', 'confidential.yml')
- if File.exist?(confidential_file) and envs = YAML.load(File.read(confidential_file))
- envs.each { |key, value| ENV[key] = value }
+ path = Rails.root.join('config/confidential.yml')
+ if File.exist?(path) && envs = YAML.load(File.read(path))
+ envs.each do |key, value|
+ ENV[key] = value
+ end
end
end
end
end