Blather client should not do any optparsing on require
Closed this issue · 1 comments
Examples page tell me to require 'blather/client'
.
Your code in blather/client.rb
does some optparsing, thus interfering with any application that's going to use Blather.
require 'optparse'
require File.join(File.dirname(__FILE__), *%w[client dsl])
include Blather::DSL
options = {}
optparse = OptionParser.new do |opts|
When I'm running a specific RSpec test from my IDE, this is what is called:
/home/nowaker/.rvm/rubies/ruby-2.1.0/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/nowaker/.rvm/gems/ruby-2.1.0/bin/rspec /home/nowaker/projekty/ruby/pacmanvps-website/spec/archipel/hypervisor_api_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example "HypervisorApi user management registers a user"
--require
is caught by Blather client.
/home/nowaker/.rvm/gems/ruby-2.1.0/gems/blather-0.7.1/lib/blather/client.rb:54:in `<top (required)>': invalid option: --require (OptionParser::InvalidOption)
Blather client should not do any optparsing on require.
Try reading the API docs for Blather::Client, there's examples there without the DSL/script mode.
Em 25/12/2013, às 18:03, Damian Nowak notifications@github.com escreveu:
Examples page tell me to:
blather/client.rb does some optparsing.
—
Reply to this email directly or view it on GitHub.