Sha256: d629d54fbe99834729ac522ebea48b8884a5578b2ee227dff722361e593fe7d7

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'

$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') unless $LOAD_PATH.include?(File.dirname(__FILE__) + '/../lib')

require 'drbproxy'
require 'drbproxy/server'

args = ARGV

raise ArgumentError, "expected array of args" unless args.is_a?(Array)
@options = {}
opt = OptionParser.new
opt.banner = "Usage: drbserver [options]\n\n"

opt.separator "Options:"
opt.on("-f", "--file [FILE]")  {|file| @options[:file] = file }
opt.on("-d", "--debug")  {|ignore| @options[:debug] = true }
# opt.on("-p", "--port [PORT]") {|port| @options[:port] = port }
opt.parse!(args)

if @options[:file]
  require @options[:file]
end


DRb.start_service(DRbProxy::DRB_URI, DRbProxy::Server.new(@options))
puts "DRbProxy started: #{DRb.uri}"
# Wait for the drb server thread to finish before exiting.
DRb.thread.join

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
drbproxy-0.1.0 bin/drbproxy