Skip to content

docs: add money-unirate-api bank backend to config examples - #783

Closed
rob-browncc wants to merge 1 commit into
RubyMoney:mainfrom
rob-browncc:docs/add-unirate-bank-backend
Closed

docs: add money-unirate-api bank backend to config examples#783
rob-browncc wants to merge 1 commit into
RubyMoney:mainfrom
rob-browncc:docs/add-unirate-bank-backend

Conversation

@rob-browncc

Copy link
Copy Markdown

Summary

Adds money-unirate-api as a documented bank backend option in two places:

  • README.md config example block: adds Money::Bank::UniRate.new as an alternative to EuCentralBank.new
  • Initializer template (lib/generators/templates/money.rb): same addition, so rails generate money_rails:initializer shows users both options
  • Config parameter docs: lists available third-party banks (eu_central_bank, google_currency, money-unirate-api) under the default_bank bullet

No code changes — docs only.

Context

money-unirate-api is a Money::Bank::VariableExchange subclass that fetches live exchange rates from the UniRate API. Published on RubyGems; zero runtime deps beyond money (>= 6.13, < 7); 22 RSpec tests; CI matrix Ruby 3.0-3.4.

Disclosure: I maintain the UniRate API and the money-unirate-api gem.

Add Money::Bank::UniRate from the money-unirate-api gem as an
alternative bank backend example alongside EuCentralBank in both
the README configuration section and the initializer template.

Also list available third-party bank implementations in the
default_bank configuration parameter docs.
# config.default_bank = EuCentralBank.new
#
# Other bank implementations:
# config.default_bank = Money::Bank::UniRate.new # https://github.com/UniRate-API/money-unirate-api

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d rather not add it here to avoid having to maintain a list of all bank implementations.

Comment thread README.md
# config.default_bank = EuCentralBank.new
#
# Other bank implementations:
# config.default_bank = Money::Bank::UniRate.new # https://github.com/UniRate-API/money-unirate-api

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Samewise.

@yukideluxe

Copy link
Copy Markdown
Member

Hello, @rob-browncc! 👋🏻

zero runtime deps beyond money (>= 6.13, < 7);

money-rails depends on money ~> 7.0 so it would be nice if you can make sure your gem also works with that constraint and push a release of your gem that allows that 7.x 🙏🏻

Comment thread README.md
Third-party banks include
[eu_central_bank](https://github.com/RubyMoney/eu_central_bank),
[google_currency](https://github.com/RubyMoney/google_currency), and
[money-unirate-api](https://github.com/UniRate-API/money-unirate-api).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I just noticed something and I think it would be better if this addition is done in the money repo instead. The money gem is the one that implements default_bank and lists all implementations: https://github.com/RubyMoney/money/blob/main/README.md#implementations

I see that we're listing some unmaintained implementations that aren't compatible with money 7.x. That said, since you've added a brand new gem, I think it's worth having it be compatible with the latest version!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically what @sunny said above 😂

@rob-browncc

Copy link
Copy Markdown
Author

Makes total sense — I'll keep the listing in the money repo (that PR just landed, thanks!). On money 7.x compat: great call, I've updated the gem's constraint from < 7 to < 8 and just cut v0.2.0. Closing this one. Cheers!

@rob-browncc rob-browncc closed this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants