Scripting

Scripting is a pluggable command line scripting API for Ruby.

Writing command line scripts is a process that repeats itself over and over again. We deal with command line switches. We deal with maintaining options set by the command line switches. Then finally, we perform the desired task.

Time to simplify.

By default Scripting provides the general tools needed to write command line scripts quickly and easily. The default parsing mechanics are provided by optparse. Options are maintained in an object that allows maximum flexibility while easing the pain of deailing with hash names (is the key a symbol or a string?). Options can be blocks that update other options, return an object instance, or they can be simple primitive values like true and false, 0, or a string.

The overall goal of Scripting is to provide an easy to read and write DSL that makes writing command line scripts more tolerable.

Example

See examples/

Contributing to scripting

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Scott Deming. See LICENSE.txt for further details.