Merge branch 'master' of github.com:diaspora/diaspora_rails
This commit is contained in:
commit
41b918e6e2
6 changed files with 20 additions and 22 deletions
|
|
@ -36,17 +36,17 @@ class DashboardsController < ApplicationController
|
|||
|
||||
def zombiefriends
|
||||
render :nothing => true
|
||||
backer_info = ["http://washington.joindiaspora.com/",
|
||||
"http://adams.joindiaspora.com/",
|
||||
"http://jefferson.joindiaspora.com/",
|
||||
"http://madison.joindiaspora.com/",
|
||||
"http://monroe.joindiaspora.com/",
|
||||
backer_info = ["http://washington.joindiaspora.com/",
|
||||
"http://adams.joindiaspora.com/",
|
||||
"http://jefferson.joindiaspora.com/",
|
||||
"http://madison.joindiaspora.com/",
|
||||
"http://monroe.joindiaspora.com/",
|
||||
"http://quincyadams.joindiaspora.com/",
|
||||
"http://jackson.joindiaspora.com/",
|
||||
"http://buren.joindiaspora.com/",
|
||||
"http://harrison.joindiaspora.com/",
|
||||
"http://tyler.joindiaspora.com/",
|
||||
"http://polk.joindiaspora.com/",
|
||||
"http://jackson.joindiaspora.com/",
|
||||
"http://buren.joindiaspora.com/",
|
||||
"http://harrison.joindiaspora.com/",
|
||||
"http://tyler.joindiaspora.com/",
|
||||
"http://polk.joindiaspora.com/",
|
||||
#"http://taylor.joindiaspora.com/",
|
||||
#"http://fillmore.joindiaspora.com/",
|
||||
#"http://pierce.joindiaspora.com/",
|
||||
|
|
@ -59,4 +59,12 @@ class DashboardsController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def zombiefriendaccept
|
||||
render :nothing => true
|
||||
Request.all.each{|r|
|
||||
User.owner.accept_friend_request(r.id)
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class User < Person
|
|||
end
|
||||
|
||||
def receive_friend_request(friend_request)
|
||||
logger.info("receiving friend request #{friend_request.to_json}")
|
||||
GPGME.import(friend_request.exported_key)
|
||||
if Request.where(:callback_url => friend_request.callback_url).first
|
||||
friend_request.activate_friend
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ Diaspora::Application.routes.draw do |map|
|
|||
|
||||
match 'warzombie', :to => "dashboards#warzombie"
|
||||
match 'zombiefriends', :to => "dashboards#zombiefriends"
|
||||
match 'zombiefriendaccept', :to => "dashboards#zombiefriendaccept"
|
||||
|
||||
#routes for devise, not really sure you will need to mess with this in the future, lets put default,
|
||||
#non mutable stuff in anohter file
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ def create(backer_number)
|
|||
:url=> "#{username}.joindiaspora.com")
|
||||
|
||||
# Make connection with Diaspora Tom
|
||||
User.owner.send_friend_request_to('http://tom.joindiaspora.com/')
|
||||
#Person.create( :email => "tom@joindiaspora.com", :url => "http://tom.joindiaspora.com/", :active => true, :profile => Profile.new(:first_name => "Alexander", :last_name => "Hamiltom"))
|
||||
# Make people
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
require 'config/environment'
|
||||
|
||||
Request.all.each{|r|
|
||||
User.owner.accept_friend_request(r.id)
|
||||
}
|
||||
|
|
@ -18,11 +18,6 @@ namespace :db do
|
|||
end
|
||||
end
|
||||
|
||||
task :accept_requests do
|
||||
puts "Accepting all friend requests for #{Rails.env}"
|
||||
require 'db/seeds/request'
|
||||
end
|
||||
|
||||
desc 'Delete the collections in the current RAILS_ENV database'
|
||||
task :purge do
|
||||
require 'config/environment'
|
||||
|
|
|
|||
Loading…
Reference in a new issue