capistrano3-unicorn 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21cdfa47278fc01afee49c867e167933ed9f8873
4
- data.tar.gz: ed8d4b69050e9b406400ba43f8cd999603059f1f
3
+ metadata.gz: b0bfb625ab5704a8ebdbef7159acd1650038ef79
4
+ data.tar.gz: 932b8595898735eebea87542c555d0e4d42042ff
5
5
  SHA512:
6
- metadata.gz: 0f31d8e78f01572681d99aaadcb1a1448d2d790e77f4746e2b6d892e05a845407740920a3da5a0b38a791b1ccd322328567762c6a13a31e6427df2dbcc001f82
7
- data.tar.gz: b29f0e1d23e9d669c059af76d5adcc23258a21538da8e7a3a3a2dc149dddf73ebad44257cb190cf56319a41a064a86086f1622ff16480d643c20795b5954da6a
6
+ metadata.gz: d2d40aac358d6ddfcac8e43c40caa581e21c91bb9de66ef549dc2facac507a43ae05caa4c746c4b1c5e6335b5e344e06a288643f1d96aeb209873c6f7d044e4f
7
+ data.tar.gz: f458ad56aaa12bc4fa969b2f46eadb72e24f2dab30fd4042a4da4ce361e6bc44e58bef1f746b428b2ae6c3826d6be28bfa9bdb696b34306bfec1547b641cc0aa
data/README.md CHANGED
@@ -26,6 +26,10 @@ You can override the defaults by `set :unicorn_example, value` in the `config/de
26
26
 
27
27
  When performing zero-downtime deployment via the `unicorn:restart` task, send the USR2 signal, sleep for this many seconds (defaults to 3), then send the QUIT signal
28
28
 
29
+ - `:unicorn_roles`
30
+
31
+ Roles to run unicorn commands on. Defaults to :app
32
+
29
33
  ### Setup
30
34
 
31
35
  Add the library to your `Gemfile`:
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "capistrano3-unicorn"
6
- gem.version = '0.0.3'
6
+ gem.version = '0.0.4'
7
7
  gem.authors = ["Matthew Lineen"]
8
8
  gem.email = ["matthew@lineen.com"]
9
9
  gem.description = "Unicorn specific Capistrano tasks"
@@ -3,13 +3,14 @@ namespace :load do
3
3
  set :unicorn_pid, -> { File.join(shared_path, "pids", "unicorn.pid") }
4
4
  set :unicorn_config_path, -> { File.join(current_path, "config", "unicorn", "#{fetch(:rails_env)}.rb") }
5
5
  set :unicorn_restart_sleep_time, 3
6
+ set :unicorn_roles, -> { :app }
6
7
  end
7
8
  end
8
9
 
9
10
  namespace :unicorn do
10
11
  desc 'Start Unicorn'
11
12
  task :start do
12
- on roles(:app) do
13
+ on roles(fetch(:unicorn_roles)) do
13
14
  within release_path do
14
15
  with rails_env: fetch(:rails_env) do
15
16
  if test("[ -e #{fetch(:unicorn_pid)} ] && kill -0 #{pid}")
@@ -24,7 +25,7 @@ namespace :unicorn do
24
25
 
25
26
  desc 'Stop Unicorn (QUIT)'
26
27
  task :stop do
27
- on roles(:app) do
28
+ on roles(fetch(:unicorn_roles)) do
28
29
  within release_path do
29
30
  if test("[ -e #{fetch(:unicorn_pid)} ]")
30
31
  if test("kill -0 #{pid}")
@@ -44,7 +45,7 @@ namespace :unicorn do
44
45
  desc 'Reload Unicorn (HUP); use this when preload_app: false'
45
46
  task :reload do
46
47
  invoke 'unicorn:start'
47
- on roles(:app) do
48
+ on roles(fetch(:unicorn_roles)) do
48
49
  within release_path do
49
50
  info "reloading..."
50
51
  execute :kill, "-s HUP", pid
@@ -55,7 +56,7 @@ namespace :unicorn do
55
56
  desc 'Restart Unicorn (USR2 + QUIT); use this when preload_app: true'
56
57
  task :restart do
57
58
  invoke 'unicorn:start'
58
- on roles(:app) do
59
+ on roles(fetch(:unicorn_roles)) do
59
60
  within release_path do
60
61
  info "unicorn restarting..."
61
62
  execute :kill, "-s USR2", pid
@@ -69,7 +70,7 @@ namespace :unicorn do
69
70
 
70
71
  desc 'Add a worker (TTIN)'
71
72
  task :add_worker do
72
- on roles(:app) do
73
+ on roles(fetch(:unicorn_roles)) do
73
74
  within release_path do
74
75
  info "adding worker"
75
76
  execute :kill, "-s TTIN", pid
@@ -79,7 +80,7 @@ namespace :unicorn do
79
80
 
80
81
  desc 'Remove a worker (TTOU)'
81
82
  task :remove_worker do
82
- on roles(:app) do
83
+ on roles(fetch(:unicorn_roles)) do
83
84
  within release_path do
84
85
  info "removing worker"
85
86
  execute :kill, "-s TTOU", pid
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Lineen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-22 00:00:00.000000000 Z
11
+ date: 2013-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano