Merge branch 'master' into 3.2-master
Conflicts: config/deploy.rb
This commit is contained in:
commit
2f39b050ae
|
@ -4,7 +4,7 @@ class Category < ActiveRecord::Base
|
||||||
|
|
||||||
validates :name, :presence => true
|
validates :name, :presence => true
|
||||||
|
|
||||||
scope :default_order, order('categories.name')
|
default_scope order('categories.name')
|
||||||
|
|
||||||
has_ancestry
|
has_ancestry
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ require 'bundler/capistrano'
|
||||||
require 'delayed/recipes'
|
require 'delayed/recipes'
|
||||||
require 'airbrake/capistrano'
|
require 'airbrake/capistrano'
|
||||||
|
|
||||||
|
|
||||||
set :whenever_command, "bundle exec whenever"
|
set :whenever_command, "bundle exec whenever"
|
||||||
# require "whenever/capistrano"
|
# require "whenever/capistrano"
|
||||||
|
|
||||||
|
@ -65,7 +66,13 @@ end
|
||||||
after "deploy:finalize_update", "deploy:symlink_all"
|
after "deploy:finalize_update", "deploy:symlink_all"
|
||||||
after "deploy:update_code", "deploy:migrate"
|
after "deploy:update_code", "deploy:migrate"
|
||||||
after "deploy:setup", "deploy:symlink_pids"
|
after "deploy:setup", "deploy:symlink_pids"
|
||||||
after "deploy:restart", "bluepill:start" # "bluepill:processes:restart_dj" # "bluepill:restart"
|
# after "deploy:restart", "bluepill:start" # "bluepill:processes:restart_dj" # "bluepill:restart"
|
||||||
|
|
||||||
|
# DJ
|
||||||
|
after "deploy:stop", "delayed_job:stop"
|
||||||
|
after "deploy:start", "delayed_job:start"
|
||||||
|
after "deploy:restart", "delayed_job:restart"
|
||||||
|
|
||||||
after "deploy:restart", "deploy:cleanup"
|
after "deploy:restart", "deploy:cleanup"
|
||||||
|
|
||||||
require 'cape'
|
require 'cape'
|
||||||
|
|
|
@ -9,9 +9,8 @@ Bluepill.application(app_name) do |app|
|
||||||
process.stop_grace_time = 10.seconds
|
process.stop_grace_time = 10.seconds
|
||||||
process.restart_grace_time = 10.seconds
|
process.restart_grace_time = 10.seconds
|
||||||
|
|
||||||
process.start_command = "/usr/bin/env RAILS_ENV=production script/delayed_job start"
|
process.start_command = "/usr/bin/env ruby script/delayed_job start"
|
||||||
process.stop_command = "/usr/bin/env RAILS_ENV=production script/delayed_job stop"
|
process.stop_command = "/usr/bin/env ruby script/delayed_job stop"
|
||||||
process.restart_command = "/usr/bin/env RAILS_ENV=production script/delayed_job restart"
|
|
||||||
process.pid_file = File.join(app.working_dir, 'tmp', 'pids', 'delayed_job.pid')
|
process.pid_file = File.join(app.working_dir, 'tmp', 'pids', 'delayed_job.pid')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Quit bluepill"
|
desc "Quit bluepill"
|
||||||
task :stop, :roles => [:app] do
|
task :quit, :roles => [:app] do
|
||||||
|
run "cd #{fetch :current_path} && #{try_sudo} #{bluepill_binary} #{fetch :application} stop"
|
||||||
run "cd #{fetch :current_path} && #{try_sudo} #{bluepill_binary} #{fetch :application} quit"
|
run "cd #{fetch :current_path} && #{try_sudo} #{bluepill_binary} #{fetch :application} quit"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ header div.text {
|
||||||
|
|
||||||
article {
|
article {
|
||||||
width: 760px;
|
width: 760px;
|
||||||
height: 305px;
|
height: auto;
|
||||||
background: #1c394c url("../pics/bg-signup.png") repeat-x;
|
background: #1c394c url("../pics/bg-signup.png") repeat-x;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 1px solid #38658c;
|
border: 1px solid #38658c;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
ENV['RAILS_ENV'] ||= "production"
|
||||||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
|
||||||
require 'delayed/command'
|
require 'delayed/command'
|
||||||
Delayed::Command.new(ARGV).daemonize
|
Delayed::Command.new(ARGV).daemonize
|
||||||
|
|
Loading…
Reference in New Issue