1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| | #!/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 <mongrel|thin|webrick>') { |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)
|