Skip to content
Extraits de code Groupes Projets
Valider a81d1133 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

basic federation profile testing stuff

parent 10a059e8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
web1: env RAILS_ENV=integration1 bundle exec rails s -p 3001
worker1: env RAILS_ENV=integration1 VVERBOSE=1 QUEUE=* bundle exec rake resque:work
redis1: env RAILS_ENV=integration1 redis-server ./redis-integration1.conf
web2: env RAILS_ENV=integration2 bundle exec rails s -p 3002
worker2: env RAILS_ENV=integration2 VVERBOSE=1 QUEUE=* bundle exec rake resque:work
redis2: env RAILS_ENV=integration2 redis-server ./redis-integration2.conf
\ No newline at end of file
......@@ -24,9 +24,9 @@ class PublicsController < ApplicationController
respond_to :html
respond_to :xml, :only => :post
caches_page :host_meta, :if => Proc.new{ Rails.env == 'production'}
layout false
caches_page :host_meta
def hcard
@person = Person.find_by_guid_and_closed_account(params[:guid], false)
......
......@@ -53,6 +53,11 @@ class StatusMessagesController < ApplicationController
receiving_services = Service.titles(services)
current_user.dispatch_post(@status_message, :url => short_post_url(@status_message.guid), :service_types => receiving_services)
@status_message.photos.each do |photo|
current_user.dispatch_post(photo)
end
current_user.participate!(@status_message)
if coming_from_profile_page? # if this is a post coming from a profile page
......
......@@ -26,11 +26,15 @@ common: &common
development:
<<: *common
database: diaspora_development
production:
<<: *common
database: diaspora_production
test:
<<: *common
database: "diaspora_test<%= ENV['TEST_ENV_NUMBER'] %>"
integration1:
<<: *common
database: diaspora_integration1
integration2:
<<: *common
database: diaspora_integration2
\ No newline at end of file
......@@ -8,6 +8,8 @@ if !AppConfig.single_process_mode?
Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
elsif AppConfig[:redis_url]
Resque.redis = Redis.new(:host => AppConfig[:redis_url], :port => 6379)
elsif ENV['RAILS_ENV']== 'integration2'
Resque.redis = Redis.new(:host => 'localhost', :port => 6380)
end
end
......
......@@ -20,12 +20,14 @@ namespace :db do
task :prepare => :environment do
abcs = ActiveRecord::Base.configurations
envs = abcs.keys.select{ |k| k.include?("integration") }
puts envs.inspect
envs.each do |env|
ActiveRecord::Base.establish_connection(env)
ActiveRecord::Base.connection.drop_database(abcs[env]["database"])
ActiveRecord::Base.connection.create_database(abcs[env]["database"])
ActiveRecord::Base.establish_connection(env)
ActiveRecord::Migrator.migrate("db/migrate", nil)
puts "dropping #{env}..."
`cd #{Rails.root} && RAILS_ENV=#{env} bundle exec rake db:drop`
puts "creating #{env}..."
`cd #{Rails.root} && RAILS_ENV=#{env} bundle exec rake db:create`
puts "migrating #{env}..."
`cd #{Rails.root} && RAILS_ENV=#{env} bundle exec rake db:migrate`
end
end
end
......
Ce diff est replié.
Ce diff est replié.
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