changed settings for the env variables
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.open(File.join(Rails.root, 'config', 'config.yml'))))
|
||||
APP_CONFIG.each do |key, value|
|
||||
if Rails.env !=~ /production/
|
||||
APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.open(File.join(Rails.root, 'config', 'config.yml'))))
|
||||
APP_CONFIG.each do |key, value|
|
||||
if value.is_a?(Hash)
|
||||
value.each do |k,v|
|
||||
ENV["#{key}_#{k}"] = v
|
||||
end
|
||||
else
|
||||
ENV[key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -185,10 +185,10 @@ Devise.setup do |config|
|
||||
|
||||
# Facebook-Setting for Heroku
|
||||
if Rails.env =~ /production/
|
||||
config.omniauth :facebook, ENV['facebook']['app_id'], ENV['facebook']['secret']
|
||||
config.omniauth :facebook, ENV['facebook_app_id'], ENV['facebook_secret']
|
||||
{:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
|
||||
else
|
||||
config.omniauth :facebook, ENV['facebook']['app_id'], ENV['facebook']['secret']
|
||||
config.omniauth :facebook, ENV['facebook_app_id'], ENV['facebook_secret']
|
||||
end
|
||||
|
||||
config.omniauth :open_id, OpenID::Store::Filesystem.new('/tmp')
|
||||
|
||||
Reference in New Issue
Block a user