mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
Remove auto-friending in db:reset for dev servers
This commit is contained in:
@@ -2,7 +2,7 @@ class Notifier < ActionMailer::Base
|
||||
|
||||
default :from => "no-reply@joindiaspora.com"
|
||||
|
||||
ATTACHMENT = File.read("#{Rails.root}/public/images/diaspora_white_on_grey.png")
|
||||
ATTACHMENT = File.read("#{Rails.root}/public/images/diaspora_white_on_grey.png")
|
||||
|
||||
def new_request(recipient_id, sender_id)
|
||||
@receiver = User.find_by_id(recipient_id)
|
||||
@@ -10,7 +10,7 @@ class Notifier < ActionMailer::Base
|
||||
|
||||
log_mail(recipient_id, sender_id, 'new_request')
|
||||
|
||||
attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT
|
||||
attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT
|
||||
|
||||
mail(:to => "#{@receiver.real_name} <#{@receiver.email}>",
|
||||
:subject => I18n.t('notifier.new_request.subject', :from => @sender.real_name), :host => APP_CONFIG[:terse_pod_url])
|
||||
|
||||
@@ -136,34 +136,9 @@ namespace :db do
|
||||
|
||||
task :tom_seed, :roles => :tom do
|
||||
run "cd #{current_path} && bundle exec rake db:seed:tom --trace RAILS_ENV=#{rails_env}"
|
||||
run "curl -silent -u tom@tom.joindiaspora.com:evankorth http://tom.joindiaspora.com/zombiefriends"
|
||||
|
||||
EM.run {
|
||||
q = EM::Queue.new
|
||||
|
||||
backers.each do |backer|
|
||||
q.push( lambda{run "curl -silent -u #{backer['username']}@#{backer['username']}.joindiaspora.com:#{backer['username']}#{backer['pin']} http://#{backer['username']}.joindiaspora.com/zombiefriendaccept"})
|
||||
|
||||
end
|
||||
|
||||
timer = EventMachine::PeriodicTimer.new(5) do
|
||||
q.pop {|x| x.call}
|
||||
|
||||
if q.size == 0
|
||||
q.pop {|x| x.call}
|
||||
EventMachine::Timer.new(60) do
|
||||
EM.stop
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
task :backer_seed, :roles => :backer do
|
||||
(0..2).each { |n|
|
||||
run "curl -silent http://localhost/set_backer_number?number=#{n}", :only => {:number => n}
|
||||
}
|
||||
run "cd #{current_path} && bundle exec rake db:seed:backer --trace RAILS_ENV=#{rails_env}"
|
||||
end
|
||||
|
||||
@@ -172,7 +147,6 @@ namespace :db do
|
||||
backer_seed
|
||||
tom_seed
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config', 'deploy:symlink_oauth_keys_config'
|
||||
|
||||
Reference in New Issue
Block a user