From 82455981b8afae27b3d1b9499bfdf2e6de572a19 Mon Sep 17 00:00:00 2001 From: ilya Date: Tue, 5 Oct 2010 12:21:33 -0700 Subject: [PATCH 01/30] added fb_config to gitignore --- .gitignore | 1 + config/fb_config.yml.example | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 config/fb_config.yml.example diff --git a/.gitignore b/.gitignore index bd8338dc5..1fbfd2e04 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ bin/* nbproject config/initializers/secret_token.rb public/source.tar +config/fb_config.yml diff --git a/config/fb_config.yml.example b/config/fb_config.yml.example new file mode 100644 index 000000000..5bb145316 --- /dev/null +++ b/config/fb_config.yml.example @@ -0,0 +1,4 @@ +fb_api_key: {key} +fb_secret: {secret} +fb_app_id: {app_id} +host: http://localhost:3000/ From 85f71aa4aac76a24f1d97fa375588a05761d4871 Mon Sep 17 00:00:00 2001 From: ilya Date: Tue, 5 Oct 2010 12:38:20 -0700 Subject: [PATCH 02/30] added the deploy task to symlink the fb_config --- config/deploy.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/deploy.rb b/config/deploy.rb index 98d8971f7..66c642885 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -56,6 +56,11 @@ namespace :deploy do run "ln -s -f #{shared_path}/app_config.yml #{current_path}/config/app_config.yml" end + task :symlink_fb_config do + run "touch #{shared_path}/fb_config.yml" + run "ln -s -f #{shared_path}/fb_config.yml #{current_path}/config/fb_config.yml" + end + task :start do start_mongo start_thin @@ -152,4 +157,4 @@ namespace :db do end -after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config' +after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config', 'deploy:symlink_fb_config' From aed9125e93b6b43516a5f5c04173f28b3b721378 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 12:41:41 -0700 Subject: [PATCH 03/30] more querying through the current_user in controllers --- Gemfile.lock | 2 +- app/controllers/photos_controller.rb | 3 ++- app/controllers/users_controller.rb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8534f580a..44d386e33 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -258,7 +258,7 @@ DEPENDENCIES autotest bson (= 1.0.7) bson_ext (= 1.0.7) - bundler (= 1.0.0) + bundler (>= 1.0.0) capybara (~> 0.3.9) carrierwave! cucumber-rails (= 0.3.2) diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 4d865573c..dca510374 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -9,7 +9,8 @@ class PhotosController < ApplicationController respond_to :json, :only => :show def create - album = Album.find_by_id params[:album_id] + album = current_user.find_visible_post_by_id( params[:album_id] ) + begin ######################## dealing with local files ############# diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1cc280577..3e6472786 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -13,7 +13,7 @@ class UsersController < ApplicationController @user = current_user @person = @user.person @profile = @user.person.profile - @photos = Photo.find_all_by_person_id(@person.id).paginate :page => params[:page], :order => 'created_at DESC' + @photos = current_user.visible_posts(:person_id => current_user.person.id, :_type => 'Photo').paginate :page => params[:page], :order => 'created_at DESC' @fb_access_url = MiniFB.oauth_url(FB_APP_ID, APP_CONFIG[:pod_url] + "services/create", :scope=>MiniFB.scopes.join(",")) From 63cb7dcbdd26f2f8564a930a285f8bd6950c1b09 Mon Sep 17 00:00:00 2001 From: ilya Date: Tue, 5 Oct 2010 13:00:42 -0700 Subject: [PATCH 04/30] Fb friends are displayed only once --- app/views/shared/_aspect_friends.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index f8e635f8d..e24dc5537 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -6,11 +6,11 @@ = owner_image_link - for friend in @friends = person_image_link(friend) - - if @logged_in && (@aspect == :public) - %h3 Facebook Friends - - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") - - @fb_friends[:data].each do |friend| - = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) + - if @logged_in && (@aspect == :public) + %h3 Facebook Friends + - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") + - @fb_friends[:data].each do |friend| + = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) -unless (@aspect == :all) || (@aspect == :public) = link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button' From 45d40f27d9772ae3085791554b7266c416c10db8 Mon Sep 17 00:00:00 2001 From: ilya Date: Tue, 5 Oct 2010 13:06:55 -0700 Subject: [PATCH 05/30] changed the deploy config back to master --- config/deploy_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/deploy_config.yml b/config/deploy_config.yml index c53f90d60..c7477314a 100644 --- a/config/deploy_config.yml +++ b/config/deploy_config.yml @@ -6,7 +6,7 @@ cross_server: deploy_to: '/usr/local/app/diaspora' user: 'root' repo: 'git://github.com/diaspora/diaspora.git' - branch: 'salmon_refactor' + branch: 'master' default_env: 'development' servers: tom: From f3c34692d8afb4b8cc2e6dca152e7a1cdba830e3 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 13:39:56 -0700 Subject: [PATCH 06/30] pubsub support --- app/controllers/publics_controller.rb | 6 ++++++ app/models/person.rb | 2 +- app/models/user.rb | 12 +++++++++--- config/routes.rb | 2 ++ lib/message_handler.rb | 7 +++++++ spec/lib/message_handler_spec.rb | 20 ++++++++++++++++++++ 6 files changed, 45 insertions(+), 4 deletions(-) diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index e3c90fc16..311fdf73f 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -28,6 +28,12 @@ class PublicsController < ApplicationController end end + def hub + if params['hub.mode'] == 'subscribe' || params['hub.mode'] == 'unsubscribe' + render :text => params['hub.challenge'], :status => 202, :layout => false + end + end + def receive render :nothing => true return unless params[:xml] diff --git a/app/models/person.rb b/app/models/person.rb index 28503e921..75bd2b39b 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -50,7 +50,7 @@ class Person end def public_url - "#{self.url}users/#{self.owner.username}/public" + "#{self.url}users/#{self.owner.username}/public.atom" end diff --git a/app/models/user.rb b/app/models/user.rb index 2f63f4b5f..91c82f101 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -167,6 +167,8 @@ class User target_people = target_people | aspect.people } + push_to_hub(post) if post.respond_to?(:public) && post.public + push_to_people(post, target_people) end @@ -179,10 +181,14 @@ class User end def push_to_person( person, xml ) - Rails.logger.debug("Adding xml for #{self} to message queue to #{url}") - QUEUE.add_post_request( person.receive_url, xml ) - QUEUE.process + Rails.logger.debug("Adding xml for #{self} to message queue to #{self.url}") + QUEUE.add_post_request( person.receive_url, xml ) + QUEUE.process + end + def push_to_hub(post) + Rails.logger.debug("Pushing update to pubsub server") + QUEUE.add_hub_notification(APP_CONFIG[:pubsub_server], self.public_url) end def salmon( post ) diff --git a/config/routes.rb b/config/routes.rb index 56ec559c9..16f6a9c98 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -43,6 +43,8 @@ Diaspora::Application.routes.draw do match 'webfinger', :to => 'publics#webfinger' match 'hcard/users/:id', :to => 'publics#hcard' + match 'hub', :to => 'publics#hub' + match '.well-known/host-meta',:to => 'publics#host_meta' match 'receive/users/:id', :to => 'publics#receive' match 'log', :to => "dev_utilities#log" diff --git a/lib/message_handler.rb b/lib/message_handler.rb index e6ce75ffc..c6d1f013c 100644 --- a/lib/message_handler.rb +++ b/lib/message_handler.rb @@ -20,6 +20,10 @@ class MessageHandler [*destinations].each{|dest| @queue.push(Message.new(:post, dest, :body => b))} end + def add_hub_notification(hub_url, feed_url) + @queue.push(Message.new(:hub_publish, hub_url, :body => feed_url)) + end + def process @queue.pop{ |query| case query.type @@ -29,6 +33,9 @@ class MessageHandler when :get http = EventMachine::HttpRequest.new(query.destination).get :timeout => TIMEOUT http.callback {process} + when :hub_publish + http = EventMachine::PubSubHubBub.new(query.destination).get :timeout => TIMEOUT + http.callback {process} else raise "message is not a type I know!" end diff --git a/spec/lib/message_handler_spec.rb b/spec/lib/message_handler_spec.rb index cb0592e9a..ddc822334 100644 --- a/spec/lib/message_handler_spec.rb +++ b/spec/lib/message_handler_spec.rb @@ -94,6 +94,26 @@ describe MessageHandler do end end + describe "Hub publish" do + it 'should correctly queue up a pubsubhubbub publish request' do + destination = "http://identi.ca/hub/" + feed_location = "http://google.com/" + + EventMachine.run { + @handler.add_hub_notification(destination, feed_location) + q = @handler.instance_variable_get(:@queue) + + message = "" + q.pop{|m| message = m} + + message.destination.should == destination + message.body.should == feed_location + + EventMachine.stop + } + end + end + describe "Mixed Queries" do it 'should process both POST and GET requests in the same queue' do From c284c9b07f88e915b7306ca02b16a529ac3ea410 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 13:47:42 -0700 Subject: [PATCH 07/30] added public back into webfinger --- app/views/publics/webfinger.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/publics/webfinger.erb b/app/views/publics/webfinger.erb index 47b76e6e6..b689f2a54 100644 --- a/app/views/publics/webfinger.erb +++ b/app/views/publics/webfinger.erb @@ -5,5 +5,8 @@ + + + From a9806ddad0f4ee928656ec53d47889dab1fae253 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Tue, 5 Oct 2010 18:19:20 +0800 Subject: [PATCH 08/30] Fixing bad execute permissions on various *.html, *.js, *.css,*.png etc. --- public/javascripts/fancybox/jquery.easing-1.3.pack.js | 0 public/javascripts/fancybox/jquery.fancybox-1.3.1.css | 0 public/javascripts/fancybox/jquery.fancybox-1.3.1.js | 0 public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js | 0 public/javascripts/fancybox/jquery.mousewheel-3.0.2.pack.js | 0 public/javascripts/fileuploader.js | 0 public/javascripts/jquery.cycle/jquery.cycle.lite.min.js | 0 public/javascripts/jquery.infieldlabel.js | 0 public/javascripts/web_socket.js | 0 public/stylesheets/blueprint/src/grid.css | 0 public/stylesheets/blueprint/src/print.css | 0 public/stylesheets/blueprint/src/reset.css | 0 .../stylesheets/brandongrotesque_light/Brandon_light-webfont.svg | 0 public/stylesheets/brandongrotesque_light/demo.html | 0 public/stylesheets/brandongrotesque_light/stylesheet.css | 0 public/stylesheets/fileuploader.css | 0 16 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 public/javascripts/fancybox/jquery.easing-1.3.pack.js mode change 100755 => 100644 public/javascripts/fancybox/jquery.fancybox-1.3.1.css mode change 100755 => 100644 public/javascripts/fancybox/jquery.fancybox-1.3.1.js mode change 100755 => 100644 public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js mode change 100755 => 100644 public/javascripts/fancybox/jquery.mousewheel-3.0.2.pack.js mode change 100755 => 100644 public/javascripts/fileuploader.js mode change 100755 => 100644 public/javascripts/jquery.cycle/jquery.cycle.lite.min.js mode change 100755 => 100644 public/javascripts/jquery.infieldlabel.js mode change 100755 => 100644 public/javascripts/web_socket.js mode change 100755 => 100644 public/stylesheets/blueprint/src/grid.css mode change 100755 => 100644 public/stylesheets/blueprint/src/print.css mode change 100755 => 100644 public/stylesheets/blueprint/src/reset.css mode change 100755 => 100644 public/stylesheets/brandongrotesque_light/Brandon_light-webfont.svg mode change 100755 => 100644 public/stylesheets/brandongrotesque_light/demo.html mode change 100755 => 100644 public/stylesheets/brandongrotesque_light/stylesheet.css mode change 100755 => 100644 public/stylesheets/fileuploader.css diff --git a/public/javascripts/fancybox/jquery.easing-1.3.pack.js b/public/javascripts/fancybox/jquery.easing-1.3.pack.js old mode 100755 new mode 100644 diff --git a/public/javascripts/fancybox/jquery.fancybox-1.3.1.css b/public/javascripts/fancybox/jquery.fancybox-1.3.1.css old mode 100755 new mode 100644 diff --git a/public/javascripts/fancybox/jquery.fancybox-1.3.1.js b/public/javascripts/fancybox/jquery.fancybox-1.3.1.js old mode 100755 new mode 100644 diff --git a/public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js b/public/javascripts/fancybox/jquery.fancybox-1.3.1.pack.js old mode 100755 new mode 100644 diff --git a/public/javascripts/fancybox/jquery.mousewheel-3.0.2.pack.js b/public/javascripts/fancybox/jquery.mousewheel-3.0.2.pack.js old mode 100755 new mode 100644 diff --git a/public/javascripts/fileuploader.js b/public/javascripts/fileuploader.js old mode 100755 new mode 100644 diff --git a/public/javascripts/jquery.cycle/jquery.cycle.lite.min.js b/public/javascripts/jquery.cycle/jquery.cycle.lite.min.js old mode 100755 new mode 100644 diff --git a/public/javascripts/jquery.infieldlabel.js b/public/javascripts/jquery.infieldlabel.js old mode 100755 new mode 100644 diff --git a/public/javascripts/web_socket.js b/public/javascripts/web_socket.js old mode 100755 new mode 100644 diff --git a/public/stylesheets/blueprint/src/grid.css b/public/stylesheets/blueprint/src/grid.css old mode 100755 new mode 100644 diff --git a/public/stylesheets/blueprint/src/print.css b/public/stylesheets/blueprint/src/print.css old mode 100755 new mode 100644 diff --git a/public/stylesheets/blueprint/src/reset.css b/public/stylesheets/blueprint/src/reset.css old mode 100755 new mode 100644 diff --git a/public/stylesheets/brandongrotesque_light/Brandon_light-webfont.svg b/public/stylesheets/brandongrotesque_light/Brandon_light-webfont.svg old mode 100755 new mode 100644 diff --git a/public/stylesheets/brandongrotesque_light/demo.html b/public/stylesheets/brandongrotesque_light/demo.html old mode 100755 new mode 100644 diff --git a/public/stylesheets/brandongrotesque_light/stylesheet.css b/public/stylesheets/brandongrotesque_light/stylesheet.css old mode 100755 new mode 100644 diff --git a/public/stylesheets/fileuploader.css b/public/stylesheets/fileuploader.css old mode 100755 new mode 100644 From 8bea8a98b24100676e67c97030ee7e093d475124 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Tue, 5 Oct 2010 23:58:28 +0800 Subject: [PATCH 09/30] Don't use any scratch dir, handle write-protected installation --- script/server | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/script/server b/script/server index da43895fd..c5357a32e 100755 --- a/script/server +++ b/script/server @@ -7,9 +7,13 @@ then echo "Mongod not started" else mkdir -p -v log/thin/ - #force AGPL - tar cf ../_source.tar -X .gitignore * - mv ../_source.tar public/source.tar + #force AGPL + test -w public -a ! -e public/source.tar && + tar cf public/source.tar --exclude='source.tar' -X .gitignore * + test -e public/source.tar || { + echo "Can't find, or even create, public/source.tar. Giving up" + exit 2 + } bundle exec ruby ./script/websocket_server.rb& bundle exec thin start $@ fi From 4a8a21b95f940158d658995d7f8f5a6a4adcbdfb Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 16:28:01 -0700 Subject: [PATCH 10/30] public fix --- app/controllers/aspects_controller.rb | 2 +- lib/diaspora/ostatus_builder.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index cf9cc1583..3b9180be8 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -52,7 +52,7 @@ class AspectsController < ApplicationController @fb_access_url = MiniFB.oauth_url(FB_APP_ID, APP_CONFIG[:pod_url] + "services/create", :scope=>MiniFB.scopes.join(",")) - @posts = current_user.visible_posts(:public => true).paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC' + @posts = current_user.visible_posts(:person_id => current_user.person.id, :public => true).paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC' respond_with @aspect end diff --git a/lib/diaspora/ostatus_builder.rb b/lib/diaspora/ostatus_builder.rb index 997e538f3..e0d24a055 100644 --- a/lib/diaspora/ostatus_builder.rb +++ b/lib/diaspora/ostatus_builder.rb @@ -57,7 +57,7 @@ module Diaspora end def create_body - @user.visible_posts(:public=>true).inject("") do |xml,curr| + @user.visible_posts(:person_id => @user.person.id, :public=>true).inject("") do |xml,curr| if curr.respond_to?(:to_activity) unless xml curr.to_activity From 11857a9308a1661a3da21ab218a12bf3aa7cfb64 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 16:35:29 -0700 Subject: [PATCH 11/30] fixing id field in atom --- lib/diaspora/ostatus_builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/diaspora/ostatus_builder.rb b/lib/diaspora/ostatus_builder.rb index e0d24a055..fbf6563f9 100644 --- a/lib/diaspora/ostatus_builder.rb +++ b/lib/diaspora/ostatus_builder.rb @@ -28,8 +28,8 @@ module Diaspora Diaspora - #{@user.username}/public - Stream + #{@user.public_url} + #{@user.real_name}'s Public Feed its a stream #{Time.now.xmlschema} From 6723a511496674fb779296cdfbc62016100fa2bd Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 16:40:50 -0700 Subject: [PATCH 12/30] correctly indent xml --- app/models/status_message.rb | 12 +++++----- lib/diaspora/ostatus_builder.rb | 40 ++++++++++++++++----------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/models/status_message.rb b/app/models/status_message.rb index c616efc5e..327f74f64 100644 --- a/app/models/status_message.rb +++ b/app/models/status_message.rb @@ -13,12 +13,12 @@ class StatusMessage < Post def to_activity <<-XML - http://activitystrea.ms/schema/1.0/post - #{self.message} - - #{person.url}status_messages/#{self.id} - #{self.created_at.xmlschema} - #{self.updated_at.xmlschema} + http://activitystrea.ms/schema/1.0/post + #{self.message} + + #{person.url}status_messages/#{self.id} + #{self.created_at.xmlschema} + #{self.updated_at.xmlschema} XML end diff --git a/lib/diaspora/ostatus_builder.rb b/lib/diaspora/ostatus_builder.rb index fbf6563f9..60c90f704 100644 --- a/lib/diaspora/ostatus_builder.rb +++ b/lib/diaspora/ostatus_builder.rb @@ -24,35 +24,35 @@ module Diaspora end def create_headers - <<-XML.strip - - - Diaspora - #{@user.public_url} - #{@user.real_name}'s Public Feed - its a stream - #{Time.now.xmlschema} - - #{@user.real_name} - #{@user.public_url} - + <<-XML + + +Diaspora +#{@user.public_url} +#{@user.real_name}'s Public Feed +its a stream +#{Time.now.xmlschema} + + #{@user.real_name} + #{@user.public_url} + XML end def create_endpoints <<-XML - + XML end def create_subject <<-XML - - http://activitystrea.ms/schema/1.0/person - #{@user.public_url} - #{@user.real_name} - - + + http://activitystrea.ms/schema/1.0/person + #{@user.public_url} + #{@user.real_name} + + XML end @@ -70,7 +70,7 @@ module Diaspora def create_footer <<-XML - + XML end end From 09b861c7a33108b6d1a624eafefe15dcf235c2aa Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 16:51:27 -0700 Subject: [PATCH 13/30] remove .atom from public url --- app/models/person.rb | 2 +- lib/diaspora/ostatus_builder.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 75bd2b39b..28503e921 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -50,7 +50,7 @@ class Person end def public_url - "#{self.url}users/#{self.owner.username}/public.atom" + "#{self.url}users/#{self.owner.username}/public" end diff --git a/lib/diaspora/ostatus_builder.rb b/lib/diaspora/ostatus_builder.rb index 60c90f704..74011e79a 100644 --- a/lib/diaspora/ostatus_builder.rb +++ b/lib/diaspora/ostatus_builder.rb @@ -28,7 +28,7 @@ module Diaspora Diaspora -#{@user.public_url} +#{@user.public_url}.atom #{@user.real_name}'s Public Feed its a stream #{Time.now.xmlschema} From e7c153df4ef1bd56966872572601fb919258217f Mon Sep 17 00:00:00 2001 From: UserAd Date: Thu, 30 Sep 2010 04:56:16 +0800 Subject: [PATCH 14/30] Add translation support in profile ('or' between buttons). Fix Russian locale --- app/views/users/_profile.haml | 2 +- config/locales/diaspora/en.yml | 1 + config/locales/diaspora/ru.yml | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/users/_profile.haml b/app/views/users/_profile.haml index 2b26eead0..774f3a094 100644 --- a/app/views/users/_profile.haml +++ b/app/views/users/_profile.haml @@ -50,7 +50,7 @@ #submit_block = link_to t('.cancel'), root_path - or + = t('.or') = f.submit t('.update_profile') #content_bottom diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 838339641..5595c4caa 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -113,6 +113,7 @@ en: albums: "Albums" you_dont_have_any_photos: "You don't have any photos! Go to the" page_to_upload_some: "page to upload some." + or: "or" comments: comment: ago: "ago" diff --git a/config/locales/diaspora/ru.yml b/config/locales/diaspora/ru.yml index daeb35915..c4c1f32cc 100644 --- a/config/locales/diaspora/ru.yml +++ b/config/locales/diaspora/ru.yml @@ -66,7 +66,10 @@ ru: add_a_new_aspect: "Добавить аспект" create: "Создать" create: - success:"Нажмите на плюс слева, для того, что-бы указать Diaspora тех, кто может видеть ваш новый аспект." + success:"Нажмите на плюс слева, для того, что-бы указать Diaspora тех, кто может видеть ваш новый аспект + helper: + remove: "Удалить" + aspect_not_empty: "Аспект не пуст" users: edit: editing_profile: "Редактирование профиля" @@ -79,8 +82,9 @@ ru: picture: "Аватар" editing_profile: "Редактирование профиля" albums: "Альбомы" - you_dont_have_any_photos: "У вас нет ни одной фотографии! Перейдите на " - page_to_upload_some: "страницу для загрузки." + you_dont_have_any_photos: "У вас нет ни одной фотографии! Перейдите в" + page_to_upload_some: "для загрузки." + or: "или" comments: comment: ago: "ранее" From 1d0a4579f6b64361e5921e74021ae80987f5baaf Mon Sep 17 00:00:00 2001 From: UserAd Date: Thu, 30 Sep 2010 05:17:33 +0800 Subject: [PATCH 15/30] Add missing localization for aspect managment --- config/locales/diaspora/ru.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/locales/diaspora/ru.yml b/config/locales/diaspora/ru.yml index c4c1f32cc..f432c82d6 100644 --- a/config/locales/diaspora/ru.yml +++ b/config/locales/diaspora/ru.yml @@ -146,3 +146,18 @@ ru: save: "сохранить" are_you_sure: "Вы уверены?" remove_friend: "удалить друга" + requests: + new_request: + add_a_new_friend_to: "добавить нового друга к" + enter_a_diaspora_username: "Введите имя пользователя Diaspora:" + your_diaspora_username_is: "Ваше имя пользователя Diaspora: %{diaspora_handle}" + friends_username: "Имя пользователя друга" + destroy: + success: "Теперь вы друзья." + error: "Выберите аспект!" + ignore: "Игнорированные запросы дружбы." + create: + error: "Для этого адреса не найдено семя Diaspora!" + already_friends: "Вы уже друзья с %{destination_url}!" + success: "Запрос на дружбу выслан к %{destination_url}." + horribly_wrong: "Что-то пошло совсем не так." From 37fb2bfd3222d065b8a43b8adb1436adc582faff Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 5 Oct 2010 16:57:22 -0700 Subject: [PATCH 16/30] Don't require a facebook yml --- Gemfile.lock | 10 ---------- app/views/users/_services.haml | 25 +++++++++++++------------ config/environment.rb | 16 +++++++++------- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 44d386e33..5ae63f097 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,7 +116,6 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) selenium-webdriver (>= 0.0.3) - columnize (0.3.1) crack (0.1.8) cucumber (0.9.0) builder (~> 2.1.2) @@ -152,7 +151,6 @@ GEM i18n (0.4.1) json (1.4.6) json_pure (1.4.6) - linecache (0.43) mail (2.2.6.1) activesupport (>= 2.3.6) mime-types @@ -201,7 +199,6 @@ GEM rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) - redgreen (1.2.2) rest-client (1.6.1) mime-types (>= 1.16) rspec (2.0.0.beta.22) @@ -217,11 +214,6 @@ GEM rspec-rails (2.0.0.beta.17) rspec (>= 2.0.0.beta.14) 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) selenium-webdriver (0.0.28) ffi (>= 0.6.1) @@ -278,11 +270,9 @@ DEPENDENCIES pubsubhubbub rails (= 3.0.0) redfinger! - redgreen roxml! rspec (>= 2.0.0.beta.17) rspec-rails (= 2.0.0.beta.17) - ruby-debug sprinkle! thin webmock diff --git a/app/views/users/_services.haml b/app/views/users/_services.haml index f2d976a79..fd1894d11 100644 --- a/app/views/users/_services.haml +++ b/app/views/users/_services.haml @@ -5,19 +5,20 @@ %h2 Services -%h3 Facebook -%p - - if @logged_in - = connected_fb_as(@access_token) - - %p - - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") - - @fb_friends[:data].each do |friend| - = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) +- if FACEBOOK + %h3 Facebook + %p + - if @logged_in + = connected_fb_as(@access_token) + + %p + - @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends") + - @fb_friends[:data].each do |friend| + = image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" ) - = link_to "Disconnect from Facebook", services_destroy_path - - else - = link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url + = link_to "Disconnect from Facebook", services_destroy_path + - else + = link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url #content_bottom .back diff --git a/config/environment.rb b/config/environment.rb index 6b960209f..7fff237bd 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -7,13 +7,15 @@ require File.expand_path('../application', __FILE__) Haml::Template.options[:format] = :html5 Haml::Template.options[:escape_html] = true -# Load facebook connection application credentials -fb_config = YAML::load(File.open(File.expand_path("./config/fb_config.yml"))) -FB_API_KEY = fb_config['fb_api_key'] -FB_SECRET = fb_config['fb_secret'] -FB_APP_ID = fb_config['fb_app_id'] -HOST = fb_config['host'] - +if File.exists?(File.expand_path("./config/fb_config.yml")) + # Load facebook connection application credentials + fb_config = YAML::load(File.open(File.expand_path("./config/fb_config.yml"))) + FB_API_KEY = fb_config['fb_api_key'] + FB_SECRET = fb_config['fb_secret'] + FB_APP_ID = fb_config['fb_app_id'] + HOST = fb_config['host'] + FACEBOOK = true +end # Initialize the rails application Diaspora::Application.initialize! From 830b3772d5499fe8a301dcfb3c2840e931223dbe Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 16:59:55 -0700 Subject: [PATCH 17/30] self reference in atom --- app/models/status_message.rb | 3 ++- lib/diaspora/ostatus_builder.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/status_message.rb b/app/models/status_message.rb index 327f74f64..b509bfe5a 100644 --- a/app/models/status_message.rb +++ b/app/models/status_message.rb @@ -13,12 +13,13 @@ class StatusMessage < Post def to_activity <<-XML - http://activitystrea.ms/schema/1.0/post #{self.message} #{person.url}status_messages/#{self.id} #{self.created_at.xmlschema} #{self.updated_at.xmlschema} + http://activitystrea.ms/schema/1.0/post + http://activitystrea.ms/schema/1.0/note XML end diff --git a/lib/diaspora/ostatus_builder.rb b/lib/diaspora/ostatus_builder.rb index 74011e79a..f75495ad2 100644 --- a/lib/diaspora/ostatus_builder.rb +++ b/lib/diaspora/ostatus_builder.rb @@ -42,6 +42,7 @@ module Diaspora def create_endpoints <<-XML + XML end From a2209d454bdefbbdef3e920651b6234dd7963a29 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 5 Oct 2010 17:01:23 -0700 Subject: [PATCH 18/30] Add a link to authoritative rebase instructions --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f21676bdd..57bb01c4e 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,11 @@ instructions. You are welcome to contribute, add to and extend Diaspora however you see fit. We will do our best to incorporate everything that meets our guidelines. -We need you to fill out a -[contributor agreement form](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq) -before we can accept your patches. The agreement gives Diaspora joint -ownership of the patch so the copyright isn't scattered. You can find it -[here](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq). +Please do not rebase our tree into yours. +See [here](http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html) +for when to rebase. -All commits must be tested, and after each commit, all tests should be green +All commits must be tested, and all your tests should be green before a pull request is sent. Please write your tests in Rspec. GEMS: We would like to keep external dependencies unduplicated. We're using @@ -32,6 +30,12 @@ Nokogiri, Mongomapper, and EM::HttpRequest as much as possible. We have a few gems in the project we'd rather not use, but if you can, use dependencies we already have. +We need you to fill out a +[contributor agreement form](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq) +before we can accept your patches. The agreement gives Diaspora joint +ownership of the patch so the copyright isn't scattered. You can find it +[here](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq). + ## Resources We are maintaining a From c9d97d3233c54e26977c872556eec9065cc36dc0 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 17:15:00 -0700 Subject: [PATCH 19/30] render public with correct mime type --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3e6472786..2cac200e2 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -36,7 +36,7 @@ class UsersController < ApplicationController director = Diaspora::Director.new ostatus_builder = Diaspora::OstatusBuilder.new(user) - render :xml => director.build(ostatus_builder) + render :xml => director.build(ostatus_builder), :content_type => 'application/atom+xml' else flash[:error] = "User #{params[:username]} does not exist!" redirect_to root_url From 85b384010e2d00c601b30b1979ea098333effa16 Mon Sep 17 00:00:00 2001 From: kook Date: Thu, 30 Sep 2010 06:23:11 +0200 Subject: [PATCH 20/30] exchange photos on adding new friend --- app/models/person.rb | 2 +- app/views/publics/hcard.erb | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 28503e921..a6d295529 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -110,7 +110,7 @@ class Person hcard = HCard.find profile.hcard.first[:href] new_person.url = hcard[:url] - new_person.profile = Profile.new(:first_name => hcard[:given_name], :last_name => hcard[:family_name]) + new_person.profile = Profile.new(:first_name => hcard[:given_name], :last_name => hcard[:family_name], :image_url => hcard[:photo]) if new_person.save new_person else diff --git a/app/views/publics/hcard.erb b/app/views/publics/hcard.erb index 9e3f27796..aadddc4e1 100644 --- a/app/views/publics/hcard.erb +++ b/app/views/publics/hcard.erb @@ -33,9 +33,15 @@ <%= @person.url%> +
+
Photo
+
+ <%= @person.profile.image_url%> +
+
Note
-
Diaspora is awesome! vi is better than emacs!
+
Diaspora is awesome! Emacs is better than vi!
From c01bbbb3e0b6be5d0cda7950e9948cbacb6de895 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 17:24:00 -0700 Subject: [PATCH 21/30] capitalization error. should push to pubsub now. --- lib/message_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/message_handler.rb b/lib/message_handler.rb index c6d1f013c..a8fd09fee 100644 --- a/lib/message_handler.rb +++ b/lib/message_handler.rb @@ -34,7 +34,7 @@ class MessageHandler http = EventMachine::HttpRequest.new(query.destination).get :timeout => TIMEOUT http.callback {process} when :hub_publish - http = EventMachine::PubSubHubBub.new(query.destination).get :timeout => TIMEOUT + http = EventMachine::PubSubHubbub.new(query.destination).get :timeout => TIMEOUT http.callback {process} else raise "message is not a type I know!" From 5847e7767d80a1ab59aa44a7a8c13f40aad9de65 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 5 Oct 2010 17:23:56 -0700 Subject: [PATCH 22/30] Add profile photo url to hcard parser --- app/views/publics/hcard.erb | 2 +- lib/hcard.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/publics/hcard.erb b/app/views/publics/hcard.erb index aadddc4e1..17b0ebdb7 100644 --- a/app/views/publics/hcard.erb +++ b/app/views/publics/hcard.erb @@ -41,7 +41,7 @@
Note
-
Diaspora is awesome! Emacs is better than vi!
+
Diaspora is awesome! vi is better than emacs!
diff --git a/lib/hcard.rb b/lib/hcard.rb index 5640e711b..e6baa49fd 100644 --- a/lib/hcard.rb +++ b/lib/hcard.rb @@ -7,6 +7,7 @@ module HCard doc = Nokogiri::HTML(Net::HTTP.get URI.parse(url)) {:given_name => doc.css(".given_name").text, :family_name => doc.css(".family_name").text, - :url => doc.css("#pod_location").text} + :url => doc.css("#pod_location").text, + :photo => doc.css(".photo")} end end From 5074d2f8f2e678585cc59dcdc4a90e4527c5c3cc Mon Sep 17 00:00:00 2001 From: Daniele Di Sarli Date: Thu, 30 Sep 2010 01:42:57 +0800 Subject: [PATCH 23/30] Updated Italian translation --- config/locales/diaspora/it.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/diaspora/it.yml b/config/locales/diaspora/it.yml index 24681fbe0..fe4b305cc 100644 --- a/config/locales/diaspora/it.yml +++ b/config/locales/diaspora/it.yml @@ -85,6 +85,7 @@ it: create: "Crea" create: success: "Clicca sul segno più nella parte sinistra per dire a Diaspora chi può vedere il tuo nuovo aspetto." + failure: "Creazione dell'aspetto fallita." destroy: success: "%{name} è stato rimosso con successo." update: From 0e8b84fb9658b444bf634e45b018bc0a69bf3bfb Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 17:26:26 -0700 Subject: [PATCH 24/30] publish instead of get --- lib/message_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/message_handler.rb b/lib/message_handler.rb index a8fd09fee..214d7f50a 100644 --- a/lib/message_handler.rb +++ b/lib/message_handler.rb @@ -34,7 +34,7 @@ class MessageHandler http = EventMachine::HttpRequest.new(query.destination).get :timeout => TIMEOUT http.callback {process} when :hub_publish - http = EventMachine::PubSubHubbub.new(query.destination).get :timeout => TIMEOUT + http = EventMachine::PubSubHubbub.new(query.destination).publish :timeout => TIMEOUT http.callback {process} else raise "message is not a type I know!" From 9eb8fe0c5a32b5037781f8a7b94d4f313f507c8b Mon Sep 17 00:00:00 2001 From: Stoyan Gaydarov Date: Mon, 4 Oct 2010 07:43:49 +0800 Subject: [PATCH 25/30] use the correct pod url in the user spec --- spec/models/user_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 7d072bdd5..049115ff2 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -17,7 +17,7 @@ describe User do describe '#diaspora_handle' do it 'uses the pod config url to set the diaspora_handle' do - user.diaspora_handle.should == user.username + "@example.org" + user.diaspora_handle.should == user.username + "@" + APP_CONFIG[:terse_pod_url] end end From dbacff250a98539764296213d2794ac992c18418 Mon Sep 17 00:00:00 2001 From: Stoyan Gaydarov Date: Mon, 4 Oct 2010 07:51:19 +0800 Subject: [PATCH 26/30] added extra user spec --- spec/models/user_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 049115ff2..d21b1d57c 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -12,6 +12,10 @@ describe User do user = Factory.build(:user, :username => "ALLUPPERCASE") user.valid? user.username.should == "alluppercase" + + user = Factory.build(:user, :username => "someUPPERCASE") + user.valid? + user.username.should == "someuppercase" end end From 77d5b68e151e838d78a9f127b39cc323fb624ec4 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Tue, 28 Sep 2010 15:31:27 +0800 Subject: [PATCH 27/30] Fixed some typos --- config/locales/devise/devise.he.yml | 2 +- config/locales/diaspora/he.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/locales/devise/devise.he.yml b/config/locales/devise/devise.he.yml index c33cfa678..997ab6df0 100644 --- a/config/locales/devise/devise.he.yml +++ b/config/locales/devise/devise.he.yml @@ -18,7 +18,7 @@ he: invalid: "הססמה או הדוא״ל שגויים." invalid_token: "אסימון האימות שגוי." timeout: "ההפעלה שלך פגה, נא להיכנס שוב כדי להמשיך." - inactive: "חשבונך לא הופעל עדין." + inactive: "חשבונך לא הופעל עדיין." sessions: signed_in: "נכנסת בהצלחה." signed_out: "יצאת בהצלחה." diff --git a/config/locales/diaspora/he.yml b/config/locales/diaspora/he.yml index 47f2a52c2..1105a3bcb 100644 --- a/config/locales/diaspora/he.yml +++ b/config/locales/diaspora/he.yml @@ -86,7 +86,7 @@ he: add_a_new_aspect: "הוספת היבט חדש" create: "יציאה" create: - success: "יש ללחוץ על סמל הפלוס שמימין כדי לומר לדיאספורה מי יעול לצפות בהיבט החדש שלך." + success: "יש ללחוץ על סמל הפלוס שמימין כדי לומר לדיאספורה מי יכול לצפות בהיבט החדש שלך." destroy: success: "%{name} הוסר בהצלחה." update: @@ -99,7 +99,7 @@ he: success: "כעת יופיע בפני החברים שלך היבט אחר שלך." helper: remove: "הסרה" - aspect_not_empty: "ההיסט אינו ריק" + aspect_not_empty: "ההיבט אינו ריק" users: edit: editing_profile: "עריכת הפרופיל" @@ -134,13 +134,13 @@ he: delete_photo: "מחיקת תמונה" photo: show_comments: "הצגת הערות" - posted_a_new_photo_to: "פורסמה תמונה חדשה אל" + posted_a_new_photo_to: "פורסמה תמונה חדשה באלבום" new: new_photo: "תמונה חדשה" back_to_list: "חזרה לרשימה" post_it: "פרסום!" create: - runtime_error: "העלאת התמונה נכשלה. האם החגורה שלך מהודקת?" + runtime_error: "העלאת התמונה נכשלה. הידקת את החגורה?" integrity_error: "העלאת התמונה נכשלה. האם זו באמת הייתה תמונה?" type_error: "העלאת התמונה נכשלה. האם באמת נוספה תמונה?" update: @@ -155,7 +155,7 @@ he: success: "הצטרפת לדיאספורה!" status_messages: new_status_message: - tell_me_something_good: "בא לי לשמוע סיפור טוב" + tell_me_something_good: "בא לי לשמוע סיפור נחמד" oh_yeah: "אחלה!" status_message: show_comments: "הצגת הערות" @@ -165,7 +165,7 @@ he: status_message: "הודעת מצב" comments: "הערות" are_you_sure: "בבטחה?" - destroy: "הריבה" + destroy: "הריסה" view_all: "צפייה בכול" message: "הודעה" owner: "בעלים" From 7c4feb74646c794a27edea5f2a99240b5ae10120 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 17:34:03 -0700 Subject: [PATCH 28/30] better log message --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 91c82f101..15c3515c2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -187,7 +187,7 @@ class User end def push_to_hub(post) - Rails.logger.debug("Pushing update to pubsub server") + Rails.logger.debug("Pushing update to pubsub server #{APP_CONFIG[:pubsub_server]} with url #{self.public_url}") QUEUE.add_hub_notification(APP_CONFIG[:pubsub_server], self.public_url) end From d890b57b131d72393d5ec84635a7b72bf819d538 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 5 Oct 2010 17:45:35 -0700 Subject: [PATCH 29/30] temp logger message --- lib/message_handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/message_handler.rb b/lib/message_handler.rb index 214d7f50a..351ca99d6 100644 --- a/lib/message_handler.rb +++ b/lib/message_handler.rb @@ -35,7 +35,7 @@ class MessageHandler http.callback {process} when :hub_publish http = EventMachine::PubSubHubbub.new(query.destination).publish :timeout => TIMEOUT - http.callback {process} + http.callback {process; Rails.logger.debug(http.response)} else raise "message is not a type I know!" end From de9cdfbe7bcb0124437137943bb7d0cb60480c8c Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 5 Oct 2010 17:46:14 -0700 Subject: [PATCH 30/30] Always set the FACEBOOK constant --- config/environment.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/environment.rb b/config/environment.rb index 7fff237bd..ddfc9c247 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -15,6 +15,8 @@ if File.exists?(File.expand_path("./config/fb_config.yml")) FB_APP_ID = fb_config['fb_app_id'] HOST = fb_config['host'] FACEBOOK = true +else + FACEBOOK = false end # Initialize the rails application Diaspora::Application.initialize!