pastry 0.1.2 → 0.1.3
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/bin/pastry +1 -1
- data/lib/pastry.rb +1 -1
- metadata +2 -2
data/bin/pastry
CHANGED
@@ -12,7 +12,7 @@ parser = OptionParser.new do |opts|
|
|
12
12
|
opts.on('-R', '--rackup file', 'rackup file') {|value| options[:rackup] = value }
|
13
13
|
opts.on('-a', '--address name', 'bind ip/host') {|value| options[:host] = value }
|
14
14
|
opts.on('-p', '--port name', 'bind port') {|value| options[:port] = value }
|
15
|
-
opts.on('-s', '--socket file', 'unix socket') {|value| options[:
|
15
|
+
opts.on('-s', '--socket file', 'unix socket') {|value| options[:socket] = value }
|
16
16
|
opts.on('-d', '--[no-]daemon', 'daemonize') {|value| options[:daemonize] = value }
|
17
17
|
opts.on('-l', '--logfile file', 'logfile') {|value| options[:logfile] = value }
|
18
18
|
opts.on('-P', '--pidfile file', 'pidfile') {|value| options[:pidfile] = value }
|
data/lib/pastry.rb
CHANGED
@@ -58,7 +58,7 @@ class Pastry
|
|
58
58
|
|
59
59
|
def start!
|
60
60
|
create_pidfile
|
61
|
-
server = unix ?
|
61
|
+
server = unix ? UNIXServer.new(unix) : TCPServer.new(host, port)
|
62
62
|
|
63
63
|
server.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true) unless unix
|
64
64
|
server.fcntl(Fcntl::F_SETFL, server.fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK)
|