Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nisevi/dollar_to_euro
Convert dollars to euros.
https://github.com/nisevi/dollar_to_euro
codeclimate converter cucumber dollar dollar-to-euro euro exchange-data exchange-rate exchange-rates exchange-server methadone mongo mongodb mongodb-database mongoid rspec ruby ruby-application semaphoreci whenever
Last synced: 4 months ago
JSON representation
Convert dollars to euros.
- Host: GitHub
- URL: https://github.com/nisevi/dollar_to_euro
- Owner: nisevi
- License: apache-2.0
- Created: 2018-01-14T13:07:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-27T02:15:27.000Z (over 3 years ago)
- Last Synced: 2024-09-27T17:40:52.534Z (4 months ago)
- Topics: codeclimate, converter, cucumber, dollar, dollar-to-euro, euro, exchange-data, exchange-rate, exchange-rates, exchange-server, methadone, mongo, mongodb, mongodb-database, mongoid, rspec, ruby, ruby-application, semaphoreci, whenever
- Language: Ruby
- Homepage: https://rubygems.org/gems/dollar_to_euro
- Size: 226 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Maintainability](https://api.codeclimate.com/v1/badges/a0b7d744a73e42bb731d/maintainability)](https://codeclimate.com/github/nisevi/dollar_to_euro/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/a0b7d744a73e42bb731d/test_coverage)](https://codeclimate.com/github/nisevi/dollar_to_euro/test_coverage) [![Build Status](https://semaphoreci.com/api/v1/nisevi/dollar_to_euro/branches/master/shields_badge.svg)](https://semaphoreci.com/nisevi/dollar_to_euro) [![Gem Version](https://badge.fury.io/rb/dollar_to_euro.svg)](https://badge.fury.io/rb/dollar_to_euro)
# 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](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/);
- 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](https://devcenter.heroku.com/articles/scheduler) for scheduling how oftern you want the database to be updated.