rolo 1.1.1 → 1.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rolo +9 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 85800c263104b5c8d064668bc6794ad5f8473a76
4
- data.tar.gz: 8b5519137d8d035ed43a288512be8117b631d2d4
3
+ metadata.gz: d33329644a696ef5200ebbeda374dde7a601890a
4
+ data.tar.gz: 0620ad4c184006128e6fb19d057a1d9327053abd
5
5
  SHA512:
6
- metadata.gz: c6eef30e55754f6f12806fe1ae57bc348fcb93bdb0f6f43a8db4bef66feb9808d727d464406b0cf3f868f56a97e5b18e33d9e4d2789f63d0acbf512f178c90d2
7
- data.tar.gz: bd64784e67ef5eb6501abc32316cad8eab5edadb1702ef2aa33eacaedf1ab1d852df2722bfc5cd338107cdf99d9c91a91258862bd29eacd27d080f9adcad0716
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.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-06-21 00:00:00.000000000 Z
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`