Project

EGP_Rates

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Scrape EGP exchange rate from different EG Banks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.7
 Project Readme

EGPRates

wercker status Code Climate Test Coverage LICENSE

CLI available here

Installation

Add this line to your application's Gemfile:

gem 'EGP_Rates'

And then execute:

$ bundle

Or install it yourself as:

$ gem install EGP_Rates

Usage

require 'egp_rates'
# All Available Banks Data (Threaded execution)
# For all the currencies that the currently showing on their pages
EGPRates.exchange_rates

# All Available Banks Data about specific currency
# (by default it caches the response for later use)
EGPRates.exchange_rate :USD        # call and cache response
EGPRates.exchange_rate :eur        # from cached response
EGPRates.exchange_rate :EUR, false # refresh cache

# Specific Bank Data
EGPRates::CBE.new.exchange_rates
EGPRates::NBE.new.exchange_rates
EGPRates::CIB.new.exchange_rates
EGPRates::AAIB.new.exchange_rates
EGPRates::BanqueDuCaire.new.exchange_rates
EGPRates::BanqueMisr.new.exchange_rates
EGPRates::SuezCanalBank.new.exchange_rates
EGPRates::AlBarakaBank.new.exchange_rates
EGPRates::AlAhliBankOfKuwait.new.exchange_rates
EGPRates::MIDB.new.exchange_rates
EGPRates::UBE.new.exchange_rates
EGPRates::CAE.new.exchange_rates
EGPRates::EDBE.new.exchange_rates
EGPRates::AlexBank.new.exchange_rates
EGPRates::Blom.new.exchange_rates
EGPRates::ADIB.new.exchange_rates
EGPRates::EGB.new.exchange_rates
EGPRates::NBG.new.exchange_rates

Development

  • clone the repo
  • to install dependencies run bundle install
  • to run the test suite bundle exec rake spec (local testing and live)
  • to run the live test suite bundle exec rake spec_live (or bundle exec rspec -t live)
  • to run the local test suite bundle exec rake spec_local (or bundle exec rspec -t ~live)
  • to run rubocop linter bundle exec rake rubocop

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mad-raz/EGP-Rates

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

  • Read the previous code of conduct once again.
  • Write clean code.
  • Write clean tests.
  • Make sure your code is covered by test.
  • Make sure you follow the code style mentioned by rubocop (run bundle exec rake rubocop)
  • A pre-commit hook included with repo can be used to remember rubocop it won't disable commits, but will remind you of violations. you can set it up using chmod +x pre-commit && cp pre-commit .git/hooks/
  • Be nice to your fellow human-beings/bots contributing to this repo.

License

The project is available as open source under the terms of the MIT License