adhearsion/blather

blather client prints usage message after exit

Closed this issue · 2 comments

blather 0.8.8: this code – https://gist.github.com/6931046 – causes the client to print blather's usage message after exit, though everything seems to operate normal.

$ ruby test/issue.rb
/tmp/test/issue.rb
Run with test/issue.rb [options] user@server/resource password [host] [port]
-D, --debug Run in debug mode (you will see all XMPP communication)
-d, --daemonize Daemonize the process
--pid=[PID] Write the PID to this file
--log=[LOG] Write to the [LOG] file instead of stdout/stderr
--certs=[CERTS DIRECTORY] The directory path where the trusted certificates are stored
-h, --help Show this message
-v, --version Show version

i'd expect blather to not print that message.

That's because blather/client is the single-file-DSL mode of Blather. I think what you really want is:

require 'blather/client/dsl'

that's it. thx.