cap_unicorn 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. data/lib/cap_unicorn/recipes.rb +5 -3
  2. metadata +3 -3
@@ -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 unicorn_rails | grep master | grep -v grep | grep #{current_path}); echo $pid"
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: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Taylor