Giter Site home page Giter Site logo

rcalc's Introduction

rcalc

A simple command line calculator

Description

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.

Install

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

Usage

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

Testing features

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:

bundle install

Then you just need to run the features:

rake features

rcalc's People

Contributors

ayosec avatar juanje avatar

Stargazers

Casiano Rodriguez-Leon avatar  avatar  avatar

Watchers

James Cloos avatar

Forkers

ayosec crguezl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.