Giter Site home page Giter Site logo

test-script-app's Introduction

Test application

Exchanging US dollar/Euro using ECB rates from: https://sdw.ecb.europa.eu/quickview.do?SERIES_KEY=120.EXR.D.USD.EUR.SP00.A

Require:

Sequel database toolkit

gem install sequel

or run:

bundle install

The database that you prefer to use. Default requires sqlite3

Configuration:

You can choose which database you want to use in db_adapter.rb The default is sqlite3 which stored in RAM memory does not create a local database.

But you can set up a connection to any of the static databases. To work with a local database, you need to create your own database or connect to an existing one. The first initialization will take some time, but in the future the database will be updated only if necessary.

Installation:

git clone https://github.com/Paqwtv/Test-script-app.git

Usage:

Require exchanger.rb to irb or your Rails application

  Exchanger.exchange(111, Date.today)
  => [128.49511]

  Exchanger.exchange(111, '2017-1-6') 
  => [117.5379]

  Exchanger.exchange(111, '20170106')
  => [117.5379]

  Exchanger.exchange(110.23, Date.yesterday - 24, Date.today, '2017-01-25')
  => [nil, nil, 118.42009]

test-script-app's People

Contributors

paqwtv avatar

Watchers

 avatar  avatar

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.