capistrano-unicorn-sic 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/lib/capistrano/tasks/unicorn.cap +2 -0
- data/lib/capistrano/unicorn/utility.rb +8 -4
- data/lib/capistrano/unicorn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23365d07b9e41ca769eeb2379de1bd6b7b7ba5b6
|
4
|
+
data.tar.gz: 6050914f50ff37133e0fae16046267aa3d68681d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d0cd9ee1e1dc56463c394df188fb1c3d111dd4f7060cd6f2f4eed117bac1017b412c9f0ffcb0eefdfc18f36a583c0982f30344c8a14dabb4341c2abe2688220
|
7
|
+
data.tar.gz: e32cfd248a7a80a43ef9909d8c81eb9af778d40d60a4f02a4e1ddcca3e28b4252d9b684e56198585c17ac873fe9e16e153e2a06e70c4e7743041ba5df3b306c6
|
@@ -6,6 +6,8 @@ include CapistranoUnicorn::Utility
|
|
6
6
|
# See https://github.com/capistrano/capistrano/pull/605
|
7
7
|
namespace :load do
|
8
8
|
task :defaults do
|
9
|
+
set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(unicorn))
|
10
|
+
set :rvm_map_bins, fetch(:rvm_map_bins).to_a.concat(%w(unicorn))
|
9
11
|
|
10
12
|
# Environments
|
11
13
|
set :unicorn_env , Proc.new{ fetch(:rails_env, 'production') }
|
@@ -86,11 +86,11 @@ module CapistranoUnicorn
|
|
86
86
|
def unicorn_execute(*args)
|
87
87
|
options = args.extract_options!
|
88
88
|
|
89
|
-
command =
|
89
|
+
command = [:bash, '-l', '-c', "\"#{args.join(' ')}\""]
|
90
90
|
if unicorn_user = fetch(:unicorn_user)
|
91
91
|
execute :sudo, '-u', unicorn_user, command, options
|
92
92
|
else
|
93
|
-
execute command, options
|
93
|
+
execute *command, options
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
@@ -127,9 +127,9 @@ module CapistranoUnicorn
|
|
127
127
|
|
128
128
|
puts 'Starting unicorn...'
|
129
129
|
|
130
|
-
within
|
130
|
+
within release_path do
|
131
131
|
with rails_env: fetch(:rails_env) do
|
132
|
-
unicorn_execute
|
132
|
+
unicorn_execute *unicorn_bin, '-c', unicorn_config_file_path, '-E', fetch(:unicorn_rack_env), '-D', fetch(:unicorn_options)
|
133
133
|
end
|
134
134
|
end
|
135
135
|
end
|
@@ -145,5 +145,9 @@ module CapistranoUnicorn
|
|
145
145
|
def unicorn_roles
|
146
146
|
fetch(:unicorn_roles, :app)
|
147
147
|
end
|
148
|
+
|
149
|
+
def unicorn_bin
|
150
|
+
fetch(:unicorn_bin).split(/\s+/)
|
151
|
+
end
|
148
152
|
end
|
149
153
|
end
|