From 63ed6a3a9505850affef46544fd5cf3fbae5bb37 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 21 Sep 2010 21:31:53 -0700 Subject: [PATCH] MS DG made async webfingering controller. need to call it from javascript to prevent seeds from blocking. remember to update your gems --- Gemfile | 4 ++++ Gemfile.lock | 6 ++++++ app/controllers/requests_controller.rb | 3 +++ config/routes.rb | 1 + 4 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index cc92bec3d..adc4431aa 100644 --- a/Gemfile +++ b/Gemfile @@ -38,6 +38,10 @@ gem 'magent', :git => 'http://github.com/dcu/magent.git' gem 'carrierwave', :git => 'git://github.com/rsofaer/carrierwave.git' , :branch => 'master' #Untested mongomapper branch gem 'mini_magick' +#sinatra +gem 'sinatra', '1.0' +gem 'async_sinatra' + group :test, :development do gem 'factory_girl_rails' end diff --git a/Gemfile.lock b/Gemfile.lock index dd181b320..abad54828 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,6 +104,8 @@ GEM addressable (2.2.1) arel (1.0.1) activesupport (~> 3.0.0) + async_sinatra (0.2.3) + sinatra (>= 1.0) autotest (4.3.2) bcrypt-ruby (2.1.2) bson (1.0.7) @@ -212,6 +214,8 @@ GEM selenium-client (1.2.18) selenium-rc (2.2.4) selenium-client (>= 1.2.18) + sinatra (1.0) + rack (>= 1.0) subexec (0.0.4) thin (1.2.7) daemons (>= 1.0.9) @@ -238,6 +242,7 @@ PLATFORMS DEPENDENCIES addressable + async_sinatra autotest bson (= 1.0.7) bson_ext (= 1.0.7) @@ -266,6 +271,7 @@ DEPENDENCIES ruby-debug saucelabs-adapter (= 0.8.12) selenium-rc + sinatra (= 1.0) sprinkle! thin webmock diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 6087ebe85..fd6e10e7b 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -42,6 +42,9 @@ class RequestsController < ApplicationController return end + + + # rel_hash = {:friend => params[:friend_handle]} Rails.logger.debug("Sending request: #{rel_hash}") begin diff --git a/config/routes.rb b/config/routes.rb index ae757499c..5b7ddba4f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -33,6 +33,7 @@ Diaspora::Application.routes.draw do match 'signup', :to => 'registrations#new', :as => "new_user_registration" match 'get_to_the_choppa', :to => redirect("/signup") + match "/finger", :to => AsyncController #public routes # match 'webfinger', :to => 'publics#webfinger'