#!/usr/bin/env ruby require 'local_openid' require 'optparse' require 'socket' BasicSocket.do_not_reverse_lookup = true opts = { :server => 'webrick', # webrick is standard, and plenty fast enough } OptionParser.new { |op| op.on('-s ') { |v| opts[:server] = v } op.on('-p port') { |val| opts[:port] = val.to_i } op.on('-o addr') { |val| opts[:bind] = val } op.on('-h', '--help', 'Show this message') do puts op.to_s exit end }.parse!(ARGV) LocalOpenID.run!(opts)