A Ruby gem that fetches and calculates currency exchange rates using European Central Bank data, compatible with the money gem.
eu_central_bank is a Ruby gem that fetches daily currency exchange rates from the European Central Bank and provides tools for calculating conversions between currencies. It solves the problem of manually managing and updating exchange rate data by automating downloads and integrating seamlessly with the money gem for financial operations in Ruby applications.
Ruby developers building applications that require currency conversion, such as e-commerce platforms, financial tools, or international payment systems, who need reliable, up-to-date exchange rates.
Developers choose eu_central_bank because it offers a straightforward, automated way to access authoritative ECB exchange rates without manual updates, with full compatibility to the money gem for a smooth integration into existing Ruby projects.
A gem that calculates the exchange rate using published rates from European Central Bank. Compatible with the money gem
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The `update_rates` method downloads daily rates directly from the European Central Bank, eliminating manual updates and ensuring accuracy, as shown in the basic usage example.
Uses the same API as the money gem, allowing easy assignment as the default bank for Money objects, which simplifies code and reduces integration effort, per the README.
Provides `save_rates` and `update_rates` with file paths to cache rates locally, improving performance by reducing API calls, as demonstrated in the caching example.
Includes a `rates_updated_at` timestamp to help manage daily updates, enabling applications to check and refresh rates based on ECB's schedule, mentioned in the caching section.
Relies exclusively on ECB for rates, which may not cover all currencies or provide rates for niche markets, limiting flexibility without custom extensions.
Caching is file-based, which can be cumbersome in cloud or distributed environments where shared file storage isn't readily available, and the README offers no alternative storage options.
The README doesn't address error handling for rate update failures, such as network issues or ECB XML format changes, leaving developers to implement their own resilience strategies.