procman 1.5.0 → 1.5.1
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.
- data/README.md +6 -0
- data/lib/proc_man.rb +1 -1
- data/lib/proc_man/capistrano.rb +8 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -136,3 +136,9 @@ require 'proc_man/capistrano'
|
|
136
136
|
```
|
137
137
|
|
138
138
|
This requires that you are using bundler and the `procman` gem has been included in your Gemfile.
|
139
|
+
|
140
|
+
If you'd like to start/stop/restart your processes using capistrano you can issue the following command. Optionally set `-s processes=worker` to restart only your worker process.
|
141
|
+
|
142
|
+
```sh
|
143
|
+
cap procman:restart -s processes=worker
|
144
|
+
```
|
data/lib/proc_man.rb
CHANGED
data/lib/proc_man/capistrano.rb
CHANGED
@@ -24,7 +24,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
24
24
|
procfile_path = fetch(:procfile_path, "./Procfile")
|
25
25
|
procfile = procfile_path ? " --procfile #{procfile_path}" : ''
|
26
26
|
|
27
|
-
|
27
|
+
if processes = fetch(:processes, nil)
|
28
|
+
process_opts = "--processes #{processes}"
|
29
|
+
else
|
30
|
+
process_opts = ''
|
31
|
+
end
|
32
|
+
|
33
|
+
command = "sh -c \"cd #{current_path} && bundle exec procman #{command} --environment #{fetch(:rails_env, 'production')} #{process_opts} #{procfile}\""
|
34
|
+
|
28
35
|
if user = fetch(:procman_user, nil)
|
29
36
|
command = "sudo -u #{user} #{command}"
|
30
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: procman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A very very simple library for starting/stopping/restarting processes
|
15
15
|
for a Ruby application
|