Skip to content

Commit

Permalink
Update readme with example spec and future work.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 22, 2016
1 parent 55d4822 commit b1f1df8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Flopp is a modern framework for building command-line tools and applications. It

I've been using [Trollop](https://github.com/ManageIQ/trollop) and while it's not bad, it's hard to use for sub-commands in a way that generates nice documentation. It also has pretty limited support for complex command lines (e.g. nested commands, splits, matching tokens, etc). Flopp is a high level bridge between the command line and your code: it generates decent documentation, maps nicely between the command line syntax and your functions, and supports sub-commands using classes which are easy to compose.

If you want a modern framework for building your next command-line app, consider Flopp.
One of the other issues I had with existing frameworks is testability. Most frameworks expect to have some pretty heavy logic directly in the binary executable, or at least don't structure your code in a way which makes testing easy. Flopp structures your command processing logic into classes which can be easily tested in isolation, which means that you can mock up and [spec your command-line executables easily](https://github.com/ioquatix/teapot/blob/master/spec/teapot/command_spec.rb).

## Installation

Expand Down Expand Up @@ -38,6 +38,10 @@ The best example of a working Flopp command line is probably [Teapot](https://gi
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

### Future Work

One area that I'd like to work on is line-wrapping. Right now, line wrapping is done by the terminal which is a bit ugly in some cases. There is a [half-implemented elegant solution](lib/flopp/output/line_wrapper.rb).

## License

Released under the MIT license.
Expand Down

0 comments on commit b1f1df8

Please sign in to comment.