class Blazing::Recipe::UnicornRestart

Public Instance Methods

run(target_options = {}) click to toggle source
Calls superclass method
# File lib/appboost/blazing/unicorn_restart.rb, line 5
def run(target_options = {})
  super target_options

  info "restarting unicorn"
  system "#{sudo} kill -USR2 #{unicorn_pid}"
end

Private Instance Methods

application() click to toggle source
# File lib/appboost/blazing/unicorn_restart.rb, line 18
def application
  options[:app] || pwd
end
pwd() click to toggle source
# File lib/appboost/blazing/unicorn_restart.rb, line 22
def pwd
  Dir.pwd.split('/').last
end
sudo() click to toggle source
# File lib/appboost/blazing/unicorn_restart.rb, line 26
def sudo
  options[:sudo] || 'sudo'
end
unicorn_pid() click to toggle source
# File lib/appboost/blazing/unicorn_restart.rb, line 14
def unicorn_pid
  File.read('tmp/pids/unicorn.pid').to_i
end