capistrano-unicorn-methods 0.0.2 → 0.0.3.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/capistrano-unicorn-methods.rb +12 -7
- data/lib/capistrano-unicorn-methods/version.rb +1 -1
- metadata +12 -12
@@ -1,12 +1,14 @@
|
|
1
1
|
require "capistrano-unicorn-methods/version"
|
2
2
|
Capistrano::Configuration.instance.load do
|
3
|
-
_cset :unicorn_pid, "#{current_release}/tmp/pids/unicorn.pid"
|
4
|
-
_cset :unicorn_old_pid, "#{current_release}/tmp/pids/unicorn.pid.oldbin"
|
5
|
-
_cset :unicorn_config, "#{current_release}/config/unicorn.rb"
|
6
|
-
_cset :unicorn_port, 3000
|
7
|
-
_cset :use_bundler, true
|
8
|
-
|
9
3
|
namespace :unicorn do
|
4
|
+
|
5
|
+
# Lazy setting these variables, as they (might) depend on other settings
|
6
|
+
set(:unicorn_pid) { fetch(:current_path)+"/tmp/pids/unicorn.pid" }
|
7
|
+
set(:unicorn_old_pid) { fetch(:current_path)+"/tmp/pids/unicorn.pid.oldbin" }
|
8
|
+
set(:unicorn_config) { fetch(:current_path)+"/config/unicorn.rb" }
|
9
|
+
set(:unicorn_port) { 3000 }
|
10
|
+
set(:use_bundler) { true }
|
11
|
+
|
10
12
|
desc "Zero-downtime restart of Unicorn"
|
11
13
|
task :restart do
|
12
14
|
unicorn.cleanup
|
@@ -18,7 +20,7 @@ Capistrano::Configuration.instance.load do
|
|
18
20
|
desc "Starts unicorn"
|
19
21
|
task :start do
|
20
22
|
unicorn.cleanup
|
21
|
-
run "cd #{
|
23
|
+
run "cd #{current_path} ; #{'bundle exec' if use_bundler} unicorn_rails -c #{unicorn_config} -D -p #{unicorn_port}"
|
22
24
|
end
|
23
25
|
|
24
26
|
desc "Stop unicorn"
|
@@ -30,6 +32,9 @@ Capistrano::Configuration.instance.load do
|
|
30
32
|
|
31
33
|
desc "Cleans up the old unicorn processes"
|
32
34
|
task :cleanup do
|
35
|
+
|
36
|
+
puts "Cleaning up: \n\n#{unicorn_pid}\n"
|
37
|
+
|
33
38
|
run "touch #{unicorn_old_pid}"
|
34
39
|
pid = capture("cat #{unicorn_old_pid}").to_i
|
35
40
|
run "kill -s QUIT #{pid}" if pid > 0
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-unicorn-methods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3.alpha
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Emil Kampp
|
@@ -13,7 +13,7 @@ date: 2012-01-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70241657295080 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70241657295080
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70241657294420 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70241657294420
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec-rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &70241657293700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70241657293700
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: unicorn
|
49
|
-
requirement: &
|
49
|
+
requirement: &70241657291920 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70241657291920
|
58
58
|
description: Contains a unicorn namespace with methods for starting stopping and maintaining
|
59
59
|
the unicorn server to serve the rails app.
|
60
60
|
email:
|
@@ -91,9 +91,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
92
|
none: false
|
93
93
|
requirements:
|
94
|
-
- - ! '
|
94
|
+
- - ! '>'
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.3.1
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project: capistrano-unicorn-methods
|
99
99
|
rubygems_version: 1.8.10
|