cap_unicorn 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cap_unicorn/recipes.rb +5 -3
- metadata +3 -3
data/lib/cap_unicorn/recipes.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
Capistrano::Configuration.instance(:must_exist).load do
|
2
2
|
namespace :unicorn do
|
3
|
+
def self.command_name
|
4
|
+
command_name = rails_version =~ /^3.*/ ? "unicorn" : "unicorn_rails"
|
5
|
+
end
|
6
|
+
|
3
7
|
def self.master_pid
|
4
|
-
pid = capture "pid=$(ps aux | grep
|
8
|
+
pid = capture "pid=$(ps aux | grep #{command_name} | grep master | grep -v grep | grep #{current_path}); echo $pid"
|
5
9
|
|
6
10
|
unless pid.empty?
|
7
11
|
pid.split(" ")[1]
|
@@ -10,8 +14,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
10
14
|
|
11
15
|
desc "Start unicorn"
|
12
16
|
task :start do
|
13
|
-
command_name = rails_version =~ /^3.*/ ? "unicorn" : "unicorn_rails"
|
14
|
-
|
15
17
|
run "#{command_name} -D -E #{rails_env} -c #{current_path}/config/unicorn/#{rails_env}.rb"
|
16
18
|
end
|
17
19
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap_unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Scott Taylor
|