procman 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/proc_man.rb +1 -1
- data/lib/proc_man/process.rb +11 -6
- metadata +2 -2
data/lib/proc_man.rb
CHANGED
data/lib/proc_man/process.rb
CHANGED
@@ -71,21 +71,26 @@ module ProcMan
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
def run(command)
|
75
|
+
puts " -----> #{command}"
|
76
|
+
system(command)
|
77
|
+
end
|
78
|
+
|
74
79
|
# A shortcut method for defining a set of RBG processes
|
75
80
|
def rbg(options = {})
|
76
81
|
options[:config_file] ||= "Rbgfile"
|
77
|
-
start {
|
78
|
-
stop {
|
79
|
-
restart {
|
82
|
+
start { run("bundle exec rbg start -c #{root}/#{options[:config_file]} -E #{environment}") }
|
83
|
+
stop { run("bundle exec rbg stop -c #{root}/#{options[:config_file]} -E #{environment}") }
|
84
|
+
restart { run("bundle exec rbg restart -c #{root}/#{options[:config_file]} -E #{environment}") }
|
80
85
|
end
|
81
86
|
|
82
87
|
# A shortcut method for defining a unicorn
|
83
88
|
def unicorn(options = {})
|
84
89
|
options[:config_file] ||= "config/unicorn.rb"
|
85
90
|
options[:pid_path] ||= "log/unicorn.pid"
|
86
|
-
start {
|
87
|
-
stop {
|
88
|
-
restart {
|
91
|
+
start { run("bundle exec unicorn -D -E #{environment} -c #{root}/#{options[:config_file]}") }
|
92
|
+
stop { run("kill `cat #{root}/#{options[:pid_path]}`") if File.exist?(options[:pid_path]) }
|
93
|
+
restart { run("kill -USR2 `cat #{root}/#{options[:pid_path]}`") if File.exist?(options[:pid_path]) }
|
89
94
|
end
|
90
95
|
|
91
96
|
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.7.
|
4
|
+
version: 1.7.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: 2014-02-
|
12
|
+
date: 2014-02-22 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
|