Releases: YellowApple/bales
Releases · YellowApple/bales
Back from the grave (spooky!)
Not gonna lie, I kinda forgot about this, and then decided that it might come in handy for some new projects, so I figured I should probably make sure it works on a reasonably-modern Ruby (like, say, 2.7.0), and it does! Well, it does now.
Anyway, now when you do...
option :foo, type: String
action do |foo: 'bar'|
puts foo
end
...Bales will stop letting OptionParser clobber that default with a nil
if you don't invoke the command with a --foo
option.
Bugfix for Ruby 2.0.0
Bales now catches NameError
exceptions thrown by const_defined?
when encountering undefined constants (never mind that the whole bloody point of const_defined?
is to check whether or not said constant is, you know, un-bloody-defined).
Helptext fix
- Swap position of usage and summary/description in helptext
First minor version bump! Woohoo!
- Helptext now includes a usage statement
- Usage statement printed on errors involving command args/opts
`desc == description`
- Add a
desc
alias fordescription
methods (inBales::Application
andBales::Command
) and:description
argument inBales::Command.option
.
Better subcommands!
Bales::Command.command
is now available to define subcommands in an identical manner toBales::Application.command
.
First GitHub release
Changes
- Addition of command/app DSL to simplify app creation
- Defining a subclass of Bales::Application now magically instantiates a Bales::Command and Bales::Command::Help subclass
- Helptext is actual helptext now, not a placeholder (still much to be done, though)
- Lots of examples to get a feel for Bales