0.0
No commit activity in last 3 years
No release in over 3 years
Command line tool to convert dollars to euros.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14.3
>= 1.16.1, ~> 1.16
~> 9.1
~> 12.3
>= 6.0.1, ~> 6.0
~> 3.7
~> 0.15.1

Runtime

~> 6.3
>= 1.9.5, ~> 1.9
>= 6.2.1, ~> 6.2
>= 5.0.5, ~> 5.0
~> 0.10.0
 Project Readme

Maintainability Test Coverage Build Status Gem Version

DollarToEuro

Command line tool to convert a dollar amount to euro.

It keeps a database updated with the latest values for exchange from 1999-01-04 till now.

Getting Started

  • In your gemfile gem 'dollar_to_euro'

  • Install it with gem install dollar_to_euro

Running the converter

  • Options:

    • -h, --help to see the available options;
    • -a, --amount AMOUNT to specify the amount you want to convert;
    • -d, --date DATE to specify the date to pick the exchange rate from that day, default today;
    • --version it will give you the version of the gem you are using;
  • Usage:

    • dollar_to_euro --version;
    • dollar_to_euro --help;
    • dollar_to_euro --amount 200;
    • dollar_to_euro --date 2018-02-25 --amount 200;

Dependencies

  • MongoDB:
    • You will need to install MongoDB;
    • For starting MongoDB server you may need to run sudo mongod;
    • For starting MongoDB client run mongo;
    • If you face an issue saying /data/db is missing, just create the directory with sudo mkdir -p /data/db;

Tests

  • Rspec:

    • bundle exec rspec
  • Cucumber:

    • bundle exec cucumber

Updating the database

For updating the database you will find a rake task defined update_dollar_to_euro_database.

This rake task can be called from anywhere, within your rails app or just scheduled with a cron job.

For example if you are using Heroku you could use the Heroku Scheduler for scheduling how oftern you want the database to be updated.