Skip to content
Extraits de code Groupes Projets
Valider 37fb2bfd rédigé par Raphael's avatar Raphael
Parcourir les fichiers

Don't require a facebook yml

parent 6723a511
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -116,7 +116,6 @@ GEM ...@@ -116,7 +116,6 @@ GEM
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.3) selenium-webdriver (>= 0.0.3)
columnize (0.3.1)
crack (0.1.8) crack (0.1.8)
cucumber (0.9.0) cucumber (0.9.0)
builder (~> 2.1.2) builder (~> 2.1.2)
...@@ -152,7 +151,6 @@ GEM ...@@ -152,7 +151,6 @@ GEM
i18n (0.4.1) i18n (0.4.1)
json (1.4.6) json (1.4.6)
json_pure (1.4.6) json_pure (1.4.6)
linecache (0.43)
mail (2.2.6.1) mail (2.2.6.1)
activesupport (>= 2.3.6) activesupport (>= 2.3.6)
mime-types mime-types
...@@ -201,7 +199,6 @@ GEM ...@@ -201,7 +199,6 @@ GEM
rake (>= 0.8.4) rake (>= 0.8.4)
thor (~> 0.14.0) thor (~> 0.14.0)
rake (0.8.7) rake (0.8.7)
redgreen (1.2.2)
rest-client (1.6.1) rest-client (1.6.1)
mime-types (>= 1.16) mime-types (>= 1.16)
rspec (2.0.0.beta.22) rspec (2.0.0.beta.22)
...@@ -217,11 +214,6 @@ GEM ...@@ -217,11 +214,6 @@ GEM
rspec-rails (2.0.0.beta.17) rspec-rails (2.0.0.beta.17)
rspec (>= 2.0.0.beta.14) rspec (>= 2.0.0.beta.14)
webrat (>= 0.7.0) webrat (>= 0.7.0)
ruby-debug (0.10.3)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.3.0)
ruby-debug-base (0.10.3)
linecache (>= 0.3)
rubyzip (0.9.4) rubyzip (0.9.4)
selenium-webdriver (0.0.28) selenium-webdriver (0.0.28)
ffi (>= 0.6.1) ffi (>= 0.6.1)
...@@ -278,11 +270,9 @@ DEPENDENCIES ...@@ -278,11 +270,9 @@ DEPENDENCIES
pubsubhubbub pubsubhubbub
rails (= 3.0.0) rails (= 3.0.0)
redfinger! redfinger!
redgreen
roxml! roxml!
rspec (>= 2.0.0.beta.17) rspec (>= 2.0.0.beta.17)
rspec-rails (= 2.0.0.beta.17) rspec-rails (= 2.0.0.beta.17)
ruby-debug
sprinkle! sprinkle!
thin thin
webmock webmock
......
...@@ -5,19 +5,20 @@ ...@@ -5,19 +5,20 @@
%h2 Services %h2 Services
%h3 Facebook - if FACEBOOK
%p %h3 Facebook
- if @logged_in %p
= connected_fb_as(@access_token) - if @logged_in
= connected_fb_as(@access_token)
%p
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") %p
- @fb_friends[:data].each do |friend| - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) - @fb_friends[:data].each do |friend|
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
= link_to "Disconnect from Facebook", services_destroy_path = link_to "Disconnect from Facebook", services_destroy_path
- else - else
= link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url = link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url
#content_bottom #content_bottom
.back .back
......
...@@ -7,13 +7,15 @@ require File.expand_path('../application', __FILE__) ...@@ -7,13 +7,15 @@ require File.expand_path('../application', __FILE__)
Haml::Template.options[:format] = :html5 Haml::Template.options[:format] = :html5
Haml::Template.options[:escape_html] = true Haml::Template.options[:escape_html] = true
# Load facebook connection application credentials if File.exists?(File.expand_path("./config/fb_config.yml"))
fb_config = YAML::load(File.open(File.expand_path("./config/fb_config.yml"))) # Load facebook connection application credentials
FB_API_KEY = fb_config['fb_api_key'] fb_config = YAML::load(File.open(File.expand_path("./config/fb_config.yml")))
FB_SECRET = fb_config['fb_secret'] FB_API_KEY = fb_config['fb_api_key']
FB_APP_ID = fb_config['fb_app_id'] FB_SECRET = fb_config['fb_secret']
HOST = fb_config['host'] FB_APP_ID = fb_config['fb_app_id']
HOST = fb_config['host']
FACEBOOK = true
end
# Initialize the rails application # Initialize the rails application
Diaspora::Application.initialize! Diaspora::Application.initialize!
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter