A simple command line calculator
This is a very simple and silly tool for educational purposes. It is meant to be a project for practise how to create a command-suite CLI using GLI and how to create a project driven by behavior with Cucumber.
You can install from the sources by doing:
git clone git://github.com/juanje/rcalc.git cd rcalc rake gem gem install pkg/rcalc-*.gem
The usage is quite simple and you can get the help by typing rcalc. You'll get a info like this:
A simple command line calculator usage: rcalc [global options] command [command options] Version: 0.0.1 Global Options: --help - Show this message Commands: divide - Divide two numbers help - Shows list of commands or help for one command multiply - Multiply two numbers substract - Substract to numbers sum - Sum two numbers
The features are written using Cucumber and are under the directory features.
features/ ├── adding.feature ├── division.feature ├── multiply.feature ├── substract.feature └── step_definitions └── calculator_steps.rb
To test the features you'll need to install the gem cucumber and gli. The best way to be sure you don't miss any dependency is by running:
Then you just need to run the features: