Sha256: ec7589c86ccaf455a4788348f93ad7b51b18a2f2f79e672867413392989ec34d

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

namespace 'unicorn' do
  desc 'start server'
  task :start, :env do |task, env|
    cmd = 'unicorn_rails'
    cmd << ' -c u.rb' if File.exists? File.join(Rails.root, 'u.rb')
    cmd << ' -E ' << env.env if env != {}
    sys cmd << ' -D'
  end
  
  desc 'stop server'
  task :stop do
    sys 'kill -QUIT `cat tmp/unicorn.pid`' if File.exists? File.join(Rails.root, 'tmp/unicorn.pid')
  end
  
  desc 'restart server'
  task :restart, :env, :needs => [:stop, :start]
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zfben_rails_rake-0.0.4 tasks/unicorn.rb