dannypurcell / rubycom

Turn your library into a command-line app by simply including Rubycom.
http://dannypurcell.github.io/rubycom/
MIT License
5 stars 0 forks source link

Boolean options are always being sent in as true #8

Closed dannypurcell closed 11 years ago

dannypurcell commented 11 years ago

Given

  def self.example(arg1,arg2, opt1='', opt2='', opt3='', opt_bool=true)
      "arg1=#{arg1},arg2=#{arg2},opt1=#{opt1}, opt2=#{opt2}, opt3=#{opt3}, opt_bool=#{opt_bool}"
  end

and

`./command.rb example input1 input2 -opt_bool=false`

expected

`arg1=input1,arg2=input2,opt1='', opt2='', opt3='', opt_bool=false`

actual

`arg1=input1,arg2=input2,opt1='', opt2='', opt3='', opt_bool=true`
dannypurcell commented 11 years ago

fixed in bf6c69a7fd76bf62891d2db82367d29c6085762a