capistrano-toolbox 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ Capistrano::Configuration.instance(:must_exist).load do
4
4
  namespace :deploy do
5
5
  namespace :unicorn do
6
6
  task :restart, :roles => :app, :except => { :no_release => true } do
7
+ rails_env = fetch(:rails_env, "production")
7
8
  servers = find_servers roles: :app
8
9
  servers.each do |server|
9
10
  old_pid = nil
@@ -11,7 +12,7 @@ Capistrano::Configuration.instance(:must_exist).load do
11
12
  old_pid = capture("cat #{unicorn_pid}", hosts: [server])
12
13
  cmd = "kill -s USR2 #{old_pid}"
13
14
  else
14
- cmd = "RAILS_ENV=production /etc/init.d/unicorn start"
15
+ cmd = "RAILS_ENV=#{rails_env} /etc/init.d/unicorn start"
15
16
  end
16
17
 
17
18
  run(cmd, shell: '/bin/bash', hosts: [server])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-06-26 00:00:00.000000000 Z
14
+ date: 2012-11-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: capistrano