Merge pull request #98 from warpc/97-auto_publish_bug

Fix auto publications. Fix #72 and close #97
This commit is contained in:
Vladimir Sharshov 2012-01-12 06:48:52 -08:00
commit 52ef6f9f70
3 changed files with 8 additions and 9 deletions

View File

@ -113,7 +113,7 @@ class BuildListsController < ApplicationController
@build_list.notified_at = Time.current
@build_list.save
@build_list.publish if @build_list.auto_publish # && @build_list.can_publish?
@build_list.delay.publish if @build_list.auto_publish # && @build_list.can_publish?
render :nothing => true, :status => 200
end

View File

@ -246,7 +246,6 @@ ActiveRecord::Schema.define(:version => 20111228182425) do
t.string "object_type"
t.integer "target_id"
t.string "target_type"
t.integer "role_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "role"
@ -283,16 +282,16 @@ ActiveRecord::Schema.define(:version => 20111228182425) do
create_table "users", :force => true do |t|
t.string "name"
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.string "remember_token"
t.datetime "remember_created_at"
t.datetime "created_at"
t.datetime "updated_at"
t.string "uname"
t.text "ssh_key"
t.integer "role_id"
t.string "uname"
t.string "role"
end

View File

@ -37,9 +37,9 @@ def stub_rsync_methods
any_instance_of(Platform, :umount_directory_for_rsync => true)
end
Delayed::Worker.delay_jobs = false # Execute all jobs realtime
# Add testing root_path
%x(rm -Rf #{Rails.root}/tmp/test_root)
%x(mkdir -p #{Rails.root}/tmp/test_root)
APP_CONFIG['root_path'] = "#{Rails.root}/tmp/test_root"