procman 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -4,7 +4,7 @@ require 'proc_man/constraint'
4
4
 
5
5
  module ProcMan
6
6
 
7
- VERSION = '1.5.0'
7
+ VERSION = '1.5.1'
8
8
 
9
9
  class Error < StandardError; end
10
10
 
@@ -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
- command = "sh -c \"cd #{current_path} && bundle exec procman #{command} --environment #{fetch(:rails_env, 'production')} #{procfile}\""
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.0
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-04-16 00:00:00.000000000 Z
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