rolo 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rolo +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d33329644a696ef5200ebbeda374dde7a601890a
|
4
|
+
data.tar.gz: 0620ad4c184006128e6fb19d057a1d9327053abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc23e04686d56ad9cfbe840c1496e139a3c086de83022b9b982282a87c77caa0af54db59943e19ddc24403e876da88f38f5c0609fbbcf9f24a7425207a5e7319
|
7
|
+
data.tar.gz: 6671aee98bb43d124f7c9576e6bbee35e2104b012ff68f16b4037feba65e43cccc2ba8737b4d0b442acd41152c83317a004ac07b5bc6ad495160f59e1a39640f
|
data/bin/rolo
CHANGED
@@ -113,6 +113,7 @@ Option may be
|
|
113
113
|
--verbose Show some verbose message (not very useful, though)
|
114
114
|
-t, --test Test if application is running or if there's any error
|
115
115
|
and return, without executing the command
|
116
|
+
-d, --dir * The working directory (where the application starts)
|
116
117
|
-a, --address * Specify the address to listen on / to check
|
117
118
|
-p, --port * To port to bind on / to check
|
118
119
|
-m, --message * The error message to use when application is running
|
@@ -144,6 +145,9 @@ while true
|
|
144
145
|
elsif %w{-v --verbose}.include?(f)
|
145
146
|
OPTIONS[:verbose] = true
|
146
147
|
ARGV.shift
|
148
|
+
elsif %w{-d --dir}.include?(f)
|
149
|
+
ARGV.shift
|
150
|
+
OPTIONS[:dir] = ARGV.shift
|
147
151
|
elsif %w{-a --address}.include?(f)
|
148
152
|
ARGV.shift
|
149
153
|
OPTIONS[:address] = ARGV.shift.to_s.strip
|
@@ -212,5 +216,10 @@ end
|
|
212
216
|
|
213
217
|
unless OPTIONS[:test]
|
214
218
|
close_on_exec(false) unless OPTIONS[:no_bind]
|
219
|
+
begin
|
220
|
+
Dir.chdir(OPTIONS[:dir] || ".")
|
221
|
+
rescue => e
|
222
|
+
e.to_s.die(1)
|
223
|
+
end
|
215
224
|
exec cmd
|
216
225
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anh K. Huynh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Start an application and/or prevent it from running twice by simply checking
|
14
14
|
if there is a network socket that is open by the application and/or by `rolo`
|