Permalink
Browse files

Added figaro gem for fb config

  • Loading branch information...
1 parent 00e5741 commit aac676889e155fb81093ab60609ccbd283a8c57d @eweiser committed Jan 7, 2013
Showing with 8 additions and 4 deletions.
  1. +3 −0 .gitignore
  2. +1 −0 Gemfile
  3. +3 −0 Gemfile.lock
  4. +1 −4 config/initializers/devise.rb
View
3 .gitignore
@@ -24,3 +24,6 @@ doc/
# Ignore the file holding the facebook app key & secret
/config/facebook.yaml
+
+# Ignore application configuration
+/config/application.yml
View
1 Gemfile
@@ -54,3 +54,4 @@ gem 'ransack'
gem 'simple_form'
gem 'resque', "~> 1.22.0", require: "resque/server"
gem 'thin'
+gem 'figaro'
View
3 Gemfile.lock
@@ -54,6 +54,8 @@ GEM
multi_json (~> 1.0)
faraday (0.8.4)
multipart-post (~> 1.1)
+ figaro (0.5.0)
+ rails (~> 3.0)
hashie (1.2.0)
hike (1.2.1)
httpauth (0.2.0)
@@ -177,6 +179,7 @@ DEPENDENCIES
chosen-rails
coffee-rails (~> 3.2.1)
devise
+ figaro
jquery-rails
nokogiri
omniauth-facebook
View
5 config/initializers/devise.rb
@@ -2,9 +2,6 @@
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
- # facebook app info
- FB_CONFIG = YAML.load_file(Rails.root + "config/facebook.yaml")[Rails.env]
-
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
@@ -208,7 +205,7 @@
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
- config.omniauth :facebook, FB_CONFIG['app_id'], FB_CONFIG['app_secret']
+ config.omniauth :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET']
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or

0 comments on commit aac6768

Please sign in to comment.