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'))))
|
if Rails.env !=~ /production/
|
||||||
APP_CONFIG.each do |key, value|
|
APP_CONFIG = HashWithIndifferentAccess.new(YAML.load(File.open(File.join(Rails.root, 'config', 'config.yml'))))
|
||||||
ENV[key] = value
|
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
|
end
|
||||||
@@ -185,10 +185,10 @@ Devise.setup do |config|
|
|||||||
|
|
||||||
# Facebook-Setting for Heroku
|
# Facebook-Setting for Heroku
|
||||||
if Rails.env =~ /production/
|
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'}}}
|
{:scope => 'email, offline_access', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
|
||||||
else
|
else
|
||||||
config.omniauth :facebook, ENV['facebook']['app_id'], ENV['facebook']['secret']
|
config.omniauth :facebook, ENV['facebook_app_id'], ENV['facebook_secret']
|
||||||
end
|
end
|
||||||
|
|
||||||
config.omniauth :open_id, OpenID::Store::Filesystem.new('/tmp')
|
config.omniauth :open_id, OpenID::Store::Filesystem.new('/tmp')
|
||||||
|
|||||||
Reference in New Issue
Block a user