capistrano-unicorn 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -35,7 +35,7 @@ after 'deploy:restart', 'unicorn:reload' # app IS NOT preloaded
35
35
  after 'deploy:restart', 'unicorn:restart' # app preloaded
36
36
  ```
37
37
 
38
- Create a new configuration file `config/unicorn/unicorn.rb` or `config/unicorn/STAGE.rb`, where stage is your deployment environment.
38
+ Create a new configuration file `config/unicorn.rb` or `config/unicorn/STAGE.rb`, where stage is your deployment environment.
39
39
 
40
40
  Example config - [examples/rails3.rb](https://github.com/sosedoff/capistrano-unicorn/blob/master/examples/rails3.rb). Please refer to unicorn documentation for more examples and configuration options.
41
41
 
@@ -64,6 +64,7 @@ You can modify any of the following options in your `deploy.rb` config.
64
64
  - `unicorn_bin` - Set unicorn executable file. Default to `unicorn`.
65
65
  - `unicorn_bundle` - Set bundler command for unicorn. Default to `bundle`.
66
66
  - `unicorn_user` - Launch unicorn master as the specified user. Default to `user` variable.
67
+ - `unicorn_roles` - Define which roles to perform unicorn recpies on. Default to `:app`.
67
68
  - `unicorn_config_path` - Set the directory where unicorn config files reside. Default to `current_path/config`.
68
69
  - `unicorn_config_filename` - Set the filename of the unicorn config file. Not used in multistage installations. Default to `unicorn.rb`.
69
70
 
@@ -139,27 +139,31 @@ module CapistranoUnicorn
139
139
  script
140
140
  end
141
141
 
142
+ def unicorn_roles
143
+ fetch(:unicorn_roles, :app)
144
+ end
145
+
142
146
  #
143
147
  # Unicorn cap tasks
144
148
  #
145
149
  namespace :unicorn do
146
150
  desc 'Start Unicorn master process'
147
- task :start, :roles => :app, :except => {:no_release => true} do
151
+ task :start, :roles => unicorn_roles, :except => {:no_release => true} do
148
152
  run start_unicorn
149
153
  end
150
154
 
151
155
  desc 'Stop Unicorn'
152
- task :stop, :roles => :app, :except => {:no_release => true} do
156
+ task :stop, :roles => unicorn_roles, :except => {:no_release => true} do
153
157
  run kill_unicorn('QUIT')
154
158
  end
155
159
 
156
160
  desc 'Immediately shutdown Unicorn'
157
- task :shutdown, :roles => :app, :except => {:no_release => true} do
161
+ task :shutdown, :roles => unicorn_roles, :except => {:no_release => true} do
158
162
  run kill_unicorn('TERM')
159
163
  end
160
164
 
161
165
  desc 'Restart Unicorn'
162
- task :restart, :roles => :app, :except => {:no_release => true} do
166
+ task :restart, :roles => unicorn_roles, :except => {:no_release => true} do
163
167
  run <<-END
164
168
  #{duplicate_unicorn}
165
169
 
@@ -172,12 +176,12 @@ module CapistranoUnicorn
172
176
  end
173
177
 
174
178
  desc 'Duplicate Unicorn'
175
- task :duplicate, :roles => :app, :except => {:no_release => true} do
179
+ task :duplicate, :roles => unicorn_roles, :except => {:no_release => true} do
176
180
  run duplicate_unicorn()
177
181
  end
178
182
 
179
183
  desc 'Reload Unicorn'
180
- task :reload, :roles => :app, :except => {:no_release => true} do
184
+ task :reload, :roles => unicorn_roles, :except => {:no_release => true} do
181
185
  run <<-END
182
186
  if #{unicorn_is_running?}; then
183
187
  echo "Reloading Unicorn...";
@@ -189,7 +193,7 @@ module CapistranoUnicorn
189
193
  end
190
194
 
191
195
  desc 'Add a new worker'
192
- task :add_worker, :roles => :app, :except => {:no_release => true} do
196
+ task :add_worker, :roles => unicorn_roles, :except => {:no_release => true} do
193
197
  run <<-END
194
198
  if #{unicorn_is_running?}; then
195
199
  echo "Adding a new Unicorn worker...";
@@ -201,7 +205,7 @@ module CapistranoUnicorn
201
205
  end
202
206
 
203
207
  desc 'Remove amount of workers'
204
- task :remove_worker, :roles => :app, :except => {:no_release => true} do
208
+ task :remove_worker, :roles => unicorn_roles, :except => {:no_release => true} do
205
209
  run <<-END
206
210
  if #{unicorn_is_running?}; then
207
211
  echo "Removing a Unicorn worker...";
@@ -1,5 +1,5 @@
1
1
  module CapistranoUnicorn
2
2
  unless defined?(::CapistranoUnicorn::VERSION)
3
- VERSION = "0.1.9".freeze
3
+ VERSION = "0.1.10".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Dan Sosedoff
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-05-28 00:00:00.000000000 Z
12
+ date: 2013-07-25 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: capistrano
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -56,26 +61,32 @@ files:
56
61
  - lib/capistrano-unicorn/version.rb
57
62
  homepage: https://github.com/sosedoff/capistrano-unicorn
58
63
  licenses: []
59
- metadata: {}
60
64
  post_install_message:
61
65
  rdoc_options: []
62
66
  require_paths:
63
67
  - lib
64
68
  required_ruby_version: !ruby/object:Gem::Requirement
69
+ none: false
65
70
  requirements:
66
71
  - - ! '>='
67
72
  - !ruby/object:Gem::Version
68
73
  version: '0'
74
+ segments:
75
+ - 0
76
+ hash: 759058187647909637
69
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
+ none: false
70
79
  requirements:
71
80
  - - ! '>='
72
81
  - !ruby/object:Gem::Version
73
82
  version: '0'
83
+ segments:
84
+ - 0
85
+ hash: 759058187647909637
74
86
  requirements: []
75
87
  rubyforge_project:
76
- rubygems_version: 2.0.3
88
+ rubygems_version: 1.8.25
77
89
  signing_key:
78
- specification_version: 4
90
+ specification_version: 3
79
91
  summary: Unicorn integration for Capistrano
80
92
  test_files: []
81
- has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTA1OWRiNzRiNDRjODYzZWE1OTRmMWVjY2IyOGU3NTIzNTZhMTJiMQ==
5
- data.tar.gz: !binary |-
6
- YjY5ODgwOWRjNGJmNWZlODk0OTRkMjY5YjgwOTdmOTcwMjc3ZTUxMg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MTI1OWMxYjgxOWE1MDE5ODIwZDNlYTFjYmZmYzc3MDRiNzYwNzhjOTcyZDk5
10
- ZTA2YWYyMDI4Y2I3ODJjYjFiZDE0YjIxZmViMWI1OGM3NDQwZTljYjdlODVm
11
- ODFhM2NjNzRjM2QwZjRlY2MwZGE5MTY5ZDlmNDQ2ZGI0NmI3ZGU=
12
- data.tar.gz: !binary |-
13
- ZWVkZmM1ZGMwYjBlNDZhZjVmMjliY2EyMTRlMzY3MTU3ZDVkNTMyZjVmMDNm
14
- NjA3MjliNjgxMmJiMzcwZTQzMWM5NjVkOWQxMTlkNzgxYmZhNTdiNzc2Mzlk
15
- NTYwOTBiNDhmMjY4Y2ZhNjRlMWE1MmE3OTdiOTYwNzlkMDU5M2M=