A Ruby Gem to parse Command Line options. Yes, another one!
Note : There is no actual usable functionality in this Gem yet, it is still in the preliminary design stages.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install optioneer
TODO: Write usage instructions here
Thoughts in no particular order.
- Add ability to set (optional) default value and type for each option
- Choose default return value for registered flags that are not specified on command line (True / False / Nil?)
- Add automatic 'inverse' flags - ie if
--coloris described then
--no-colorwill return the inverse result
- Automatically create short-form flags from the long-form if not specified.
- Automatically provide
--versionfunctionality along with the associated short-forms (
After checking out the repo, run
bin/setup to install dependencies. Then, run
rake spec to run the tests (or simply
rake). You can also run
bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run
bundle exec rake install.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
This library aims to adhere to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, that version should be immediately yanked and/or a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions. As a result of this policy, you can (and should) specify a dependency on this gem using the Pessimistic Version Constraint with two digits of precision. For example:
spec.add_dependency 'optioneer', '~> 1.0'
Of course, currently we have not even reached version 1, so leave off the version requirement completely. Expect any and all of the API and interface to change!
The gem is available as open source under the terms of the MIT License.