Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTTP links #1110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ Features

Bugfixes
--------
- EEK currency is no longer used, kept for BC ([#issue/110](http://github.com/RubyMoney/money/issues/110))
- EEK currency is no longer used, kept for BC ([#issue/110](https://github.com/RubyMoney/money/issues/110))
- Lithuanian Litas symbol position fixed (laurynas)
- Fixed README typos (phlipper)
- Fixed README typos (pwim)
Expand Down Expand Up @@ -555,11 +555,11 @@ Bugfixes
--------
- Updated Money#to_s to respect :separator and :subunit_to_unit.
- Fixed Money#format for :subunit_to_unit != 100.
([#issue/37](http://github.com/RubyMoney/money/issue/37))
([#issue/37](https://github.com/RubyMoney/money/issues/37))
- Fixed String#to_money for :subunit_to_unit != 100.
([#issue/36](http://github.com/RubyMoney/money/issue/36))
([#issue/36](https://github.com/RubyMoney/money/issues/36))
- Removed duplicate currencies.
([#issue/38](http://github.com/RubyMoney/money/issue/38))
([#issue/38](https://github.com/RubyMoney/money/issues/38))
- Fixed issue related to JRuby returning 2 for Math.log10(1000).floor instead
of correctly returning 3.

Expand All @@ -570,22 +570,22 @@ Features
--------
- Added support for creating objects with the main monetary unit instead of
cents.
([#issue/25](http://github.com/RubyMoney/money/issues/25))
([#issue/25](https://github.com/RubyMoney/money/issues/25))
- Deprecated `Money#format` with separate params instead of Hash. Deprecation
target set to Money 3.5.0.
([#issue/31](http://github.com/RubyMoney/money/issues/31))
([#issue/31](https://github.com/RubyMoney/money/issues/31))
- Deprecated `Money#new(0, currency: "EUR")` in favor of
`Money#new(0, "EUR")`. Deprecation target set to Money 3.5.0.
([#issue/31](http://github.com/RubyMoney/money/issues/31))
([#issue/31](https://github.com/RubyMoney/money/issues/31))
- Throw ArgumentError when trying to multiply two Money objects together.
([#issue/29](http://github.com/RubyMoney/money/issues/29))
([#issue/29](https://github.com/RubyMoney/money/issues/29))
- Update Money#parse to use :subunit_to_unit
([#issue/30](http://github.com/RubyMoney/money/issues/30))
([#issue/30](https://github.com/RubyMoney/money/issues/30))

Bugfixes
--------
- Downgraded required_rubygems_version to >= 1.3.6.
([#issue/26](http://github.com/RubyMoney/money/issues/26))
([#issue/26](https://github.com/RubyMoney/money/issues/26))
- Use BigDecimal when floating point calculations are needed.
- Ruby 1.9.2 compatibility enhancements.

Expand All @@ -595,7 +595,7 @@ Money 3.1.0
Features
--------
- Implemented `Money::Bank::Base`.
([#issue/14](http://github.com/RubyMoney/money/issues/14))
([#issue/14](https://github.com/RubyMoney/money/issues/14))
- Added `Money::Bank::Base#exchange_with`.
- Deprecated `Money::Bank::Base#exchange`. Deprecation target set to Money
3.2.0.
Expand All @@ -604,54 +604,54 @@ Features
3.2.0.
- Deprecate `Money::SYMBOLS`, `Money::SEPARATORS` and `Money::DELIMITERS`.
Deprecation target set to Money 3.2.0.
([#issue/16](http://github.com/RubyMoney/money/issues/16))
([#issue/16](https://github.com/RubyMoney/money/issues/16))
- Implemented `#has` for `Money` and `Money::Currency`.
- Refactored test suite to conform to RSpec conventions.
- Moved project from [FooBarWidget](http://github.com/FooBarWidget) to
[RubyMoney](http://github.com/RubyMoney)
- Moved project from [FooBarWidget](https://github.com/FooBarWidget) to
[RubyMoney](https://github.com/RubyMoney)
- Added Simone Carletti to list of authors.
- Moved `@rounding_method` from `Money::Bank::VariableExchange` to
`Money::Bank::Base`.
([#issue/18](http://github.com/RubyMoney/money/issues/18))
([#issue/18](https://github.com/RubyMoney/money/issues/18))
- Added `#setup` to `Money::Bank::Base`. Called from `#initialize`.
([#issue/19](http://github.com/RubyMoney/money/issues/19))
- Added [google_currency](http://github.com/RubyMoney/google_currency) to list
([#issue/19](https://github.com/RubyMoney/money/issues/19))
- Added [google_currency](https://github.com/RubyMoney/google_currency) to list
of Currency Exchange Implementations.
- Added `#export_rates` to `Money::Bank::VariableExchange`.
([#issue/21](http://github.com/RubyMoney/money/issues/21))
([#issue/21](https://github.com/RubyMoney/money/issues/21))
- Added `#import_rates` to `Money::Bank::VariableExchange`.
([#issue/21](http://github.com/RubyMoney/money/issues/21))
([#issue/21](https://github.com/RubyMoney/money/issues/21))
- Removed dependency on Jeweler.
- Replaced usage of hanna with yardoc.
- Rewrote/reformatted all documentation.

Bugfixes
--------
- Fixed incorrect URLs in documentation.
([#issue/17](http://github.com/RubyMoney/money/issues/17))
([#issue/17](https://github.com/RubyMoney/money/issues/17))
- Updated `:subunit_to_unit` for HKD from 10 to 100.
([#issue/20](http://github.com/RubyMoney/money/issues/20))
([#issue/20](https://github.com/RubyMoney/money/issues/20))
- Updated Ghanaian Cedi to use correct ISO Code, GHS.
([#issue/22](http://github.com/RubyMoney/money/issues/22))
([#issue/22](https://github.com/RubyMoney/money/issues/22))
- Make `default` rake task call `spec`.
([#issue/23](http://github.com/RubyMoney/money/issues/23))
([#issue/23](https://github.com/RubyMoney/money/issues/23))

Money 3.1.0.pre3
================

Features
--------
- Added [google_currency](http://github.com/RubyMoney/google_currency) to list
- Added [google_currency](https://github.com/RubyMoney/google_currency) to list
of Currency Exchange Implementations.
- Added `#export_rates` to `Money::Bank::VariableExchange`.
([#issue/21](http://github.com/RubyMoney/money/issues/21))
([#issue/21](https://github.com/RubyMoney/money/issues/21))
- Added `#import_rates` to `Money::Bank::VariableExchange`.
([#issue/21](http://github.com/RubyMoney/money/issues/21))
([#issue/21](https://github.com/RubyMoney/money/issues/21))

Bugfixes
--------
- Updated `:subunit_to_unit` for HKD from 10 to 100.
([#issue/20](http://github.com/RubyMoney/money/issues/20))
([#issue/20](https://github.com/RubyMoney/money/issues/20))

Money 3.1.0.pre2
================
Expand All @@ -660,22 +660,22 @@ Features
--------
- Moved `@rounding_method` from `Money::Bank::VariableExchange` to
`Money::Bank::Base`.
([#issue/18](http://github.com/RubyMoney/money/issues/18))
([#issue/18](https://github.com/RubyMoney/money/issues/18))
- Added `#setup` to `Money::Bank::Base`. Called from `#initialize`.
([#issue/19](http://github.com/RubyMoney/money/issues/19))
([#issue/19](https://github.com/RubyMoney/money/issues/19))

Bugfixes
--------
- Fixed incorrect URLs in documentation.
([#issue/17](http://github.com/RubyMoney/money/issues/17))
([#issue/17](https://github.com/RubyMoney/money/issues/17))

Money 3.1.0.pre1
================

Features
--------
- Implemented `Money::Bank::Base`.
([#issue/14](http://github.com/RubyMoney/money/issues/14))
([#issue/14](https://github.com/RubyMoney/money/issues/14))
- Added `Money::Bank::Base#exchange_with`.
- Deprecated `Money::Bank::Base#exchange`. Deprecation target set to Money
3.2.0.
Expand All @@ -684,17 +684,17 @@ Features
3.2.0.
- Deprecate `Money::SYMBOLS`, `Money::SEPARATORS` and `Money::DELIMITERS`.
Deprecation target set to Money 3.2.0.
([#issue/16](http://github.com/RubyMoney/money/issues/16))
([#issue/16](https://github.com/RubyMoney/money/issues/16))
- Implemented `#has` for `Money` and `Money::Currency`.
- Refactored test suite to conform to RSpec conventions.
- Moved project from [FooBarWidget](http://github.com/FooBarWidget) to
[RubyMoney](http://github.com/RubyMoney)
- Moved project from [FooBarWidget](https://github.com/FooBarWidget) to
[RubyMoney](https://github.com/RubyMoney)
- Added Simone Carletti to list of authors.

Bugfixes
--------
- Fixed rounding error in `Numeric#to_money`.
([#issue/15](http://github.com/RubyMoney/money/issues/15))
([#issue/15](https://github.com/RubyMoney/money/issues/15))

Money 3.0.5
===========
Expand All @@ -705,11 +705,11 @@ Features
- Added ability to pass a block to `VariableExchangeBank#new` or `#exchange`,
specifying a custom truncation method
- Added optional `currency` argument to` Numeric#to_money`.
([#issue/11](http://github.com/RubyMoney/money/issues/11))
([#issue/11](https://github.com/RubyMoney/money/issues/11))
- Added optional `currency` argument to `String#to_money`.
([#issue/11](http://github.com/RubyMoney/money/issues/11))
([#issue/11](https://github.com/RubyMoney/money/issues/11))
- Use '¤' as the default currency symbol.
([#issue/10](http://github.com/RubyMoney/money/issues/10))
([#issue/10](https://github.com/RubyMoney/money/issues/10))

Bugfixes
--------
Expand All @@ -718,7 +718,7 @@ Bugfixes
- Fixed issue when exchanging currencies with different `:subunit_to_unit`
values.
- `Numeric#to_money` now respects `:subunit_to_unit`.
([#issue/12](http://github.com/RubyMoney/money/issues/12))
([#issue/12](https://github.com/RubyMoney/money/issues/12))

Money 3.0.4
===========
Expand Down Expand Up @@ -765,7 +765,7 @@ Features
--------
- Version Bump due to compatibility changes with ActiveRecord. See
conversation
[here](http://github.com/RubyMoney/money/issues#issue/4/comment/224880)
[here](https://github.com/RubyMoney/money/issues/4#issuecomment-224880)
for more information.

Money 2.3.0
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

[![Gem Version](https://badge.fury.io/rb/money.svg)](https://rubygems.org/gems/money)
[![Ruby](https://github.com/RubyMoney/money/actions/workflows/ruby.yml/badge.svg)](https://github.com/RubyMoney/money/actions/workflows/ruby.yml)
[![Code Climate](https://codeclimate.com/github/RubyMoney/money.svg)](https://codeclimate.com/github/RubyMoney/money)
[![Maintainability](https://api.codeclimate.com/v1/badges/fa5311ad7b2fe88c54c8/maintainability)](https://codeclimate.com/github/RubyMoney/money/maintainability)
[![Inline docs](https://inch-ci.org/github/RubyMoney/money.svg)](https://inch-ci.org/github/RubyMoney/money)
[![License](https://img.shields.io/github/license/RubyMoney/money.svg)](https://opensource.org/licenses/MIT)
[![License](https://img.shields.io/github/license/RubyMoney/money.svg)](https://opensource.org/license/MIT)

:warning: Please read the [migration notes](#migration-notes) before upgrading to a new major version.

If you miss String parsing, check out the new [monetize gem](https://github.com/RubyMoney/monetize).

## Contributing

See the [Contribution Guidelines](https://github.com/RubyMoney/money/blob/master/CONTRIBUTING.md)
See the [Contribution Guidelines](https://github.com/RubyMoney/money/blob/main/CONTRIBUTING.md)

## Introduction

Expand All @@ -33,7 +33,7 @@ A Ruby Library for dealing with money and currency conversion.
### Resources

- [Website](https://rubymoney.github.io/money/)
- [API Documentation](http://www.rubydoc.info/gems/money/frames)
- [API Documentation](https://www.rubydoc.info/gems/money/frames)
- [Git Repository](https://github.com/RubyMoney/money)

### Notes
Expand Down Expand Up @@ -199,13 +199,13 @@ using:
Money.default_currency = Money::Currency.new("CAD")
```

If you use [Rails](https://github.com/RubyMoney/money/tree/master#ruby-on-rails), then `config/initializers/money.rb` is a very good place to put this.
If you use [Rails](https://github.com/RubyMoney/money/tree/main#ruby-on-rails), then `config/initializers/money.rb` is a very good place to put this.

### Currency Exponent

The exponent of a money value is the number of digits after the decimal
separator (which separates the major unit from the minor unit). See e.g.
[ISO 4217](https://www.currency-iso.org/en/shared/amendments/iso-4217-amendment.html) for more
[ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) for more
information. You can find the exponent (as an `Integer`) by

``` ruby
Expand Down Expand Up @@ -408,7 +408,7 @@ Money.from_cents(1000, 'USD').exchange_to('CAD') #=> #<Money fractional:900 curr
```

There is nothing stopping you from creating store objects which scrapes
[XE](http://www.xe.com) for the current rates or just returns `rand(2)`:
[XE](https://www.xe.com) for the current rates or just returns `rand(2)`:

``` ruby
Money.default_bank = Money::Bank::VariableExchange.new(StoreWhichScrapesXeDotCom.new)
Expand Down Expand Up @@ -446,9 +446,9 @@ implementations.

## Formatting

There are several formatting rules for when `Money#format` is called. For more information, check out the [formatting module source](https://github.com/RubyMoney/money/blob/master/lib/money/money/formatter.rb), or read the latest release's [rdoc version](http://www.rubydoc.info/gems/money/Money/Formatter).
There are several formatting rules for when `Money#format` is called. For more information, check out the [formatting module source](https://github.com/RubyMoney/money/blob/main/lib/money/money/formatter.rb), or read the latest release's [rdoc version](https://www.rubydoc.info/gems/money/Money/Formatter).

If you wish to format money according to the EU's [Rules for expressing monetary units](http://publications.europa.eu/code/en/en-370303.htm#position) in either English, Irish, Latvian or Maltese:
If you wish to format money according to the EU's [Rules for expressing monetary units](https://style-guide.europa.eu/en/content/-/isg/topic?identifier=7.3.3-rules-for-expressing-monetary-units#id370303__id370303_PositionISO) in either English, Irish, Latvian or Maltese:

```ruby
m = Money.from_cents('123', :gbp) # => #<Money fractional:123 currency:GBP>
Expand Down
10 changes: 5 additions & 5 deletions lib/money/currency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Money
# Represents a specific currency unit.
#
# @see https://en.wikipedia.org/wiki/Currency
# @see http://iso4217.net/
# @see https://www.iso.org/iso-4217-currency-codes.html
class Currency
include Comparable
extend Enumerable
Expand Down Expand Up @@ -113,13 +113,13 @@ def wrap(object)
#
# == monetary unit
# The standard unit of value of a currency, as the dollar in the United States or the peso in Mexico.
# https://www.answers.com/topic/monetary-unit
# https://www.answers.com/redirectSearch?query=monetary-unit
# == fractional monetary unit, subunit
# A monetary unit that is valued at a fraction (usually one hundredth) of the basic monetary unit
# https://www.answers.com/topic/fractional-monetary-unit-subunit
# https://www.answers.com/redirectSearch?query=fractional-monetary-unit-subunit
#
# See https://en.wikipedia.org/wiki/List_of_circulating_currencies and
# http://search.cpan.org/~tnguyen/Locale-Currency-Format-1.28/Format.pm
# https://metacpan.org/release/TNGUYEN/Locale-Currency-Format-1.28/view/Format.pm
def table
@table ||= Loader.load_currencies
end
Expand All @@ -142,7 +142,7 @@ def all

# We need a string-based validator before creating an unbounded number of
# symbols.
# http://www.randomhacks.net/articles/2007/01/20/13-ways-of-looking-at-a-ruby-symbol#11
# http://www.randomhacks.net.s3-website-us-east-1.amazonaws.com/2007/01/20/13-ways-of-looking-at-a-ruby-symbol/#11
# https://github.com/RubyMoney/money/issues/132
#
# @return [Set]
Expand Down
2 changes: 1 addition & 1 deletion lib/money/money.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Money is a value object and should be treated as immutable.
#
# @see http://en.wikipedia.org/wiki/Money
# @see https://en.wikipedia.org/wiki/Money
class Money
include Comparable
include Money::Arithmetic
Expand Down
2 changes: 1 addition & 1 deletion lib/money/money/formatting_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def determine_format_from_formatting_rules(rules)

def delimiter_pattern_rule(rules)
if rules[:south_asian_number_formatting]
# from http://blog.revathskumar.com/2014/11/regex-comma-seperated-indian-currency-format.html
# from https://blog.revathskumar.com/2014/11/regex-comma-seperated-indian-currency-format.html
/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/
else
/(\d)(?=(?:\d{3})+(?:[^\d]{1}|$))/
Expand Down
2 changes: 1 addition & 1 deletion money.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

if s.respond_to?(:metadata)
s.metadata['changelog_uri'] = 'https://github.com/RubyMoney/money/blob/master/CHANGELOG.md'
s.metadata['changelog_uri'] = 'https://github.com/RubyMoney/money/blob/main/CHANGELOG.md'
s.metadata['source_code_uri'] = 'https://github.com/RubyMoney/money/'
s.metadata['bug_tracker_uri'] = 'https://github.com/RubyMoney/money/issues'
s.metadata['rubygems_mfa_required'] = 'true'
Expand Down
12 changes: 6 additions & 6 deletions sig/lib/money/currency.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Money
# Represents a specific currency unit.
#
# @see https://en.wikipedia.org/wiki/Currency
# @see http://iso4217.net/
# @see https://www.iso.org/iso-4217-currency-codes.html
class Currency
include Comparable

Expand Down Expand Up @@ -70,13 +70,13 @@ class Money
#
# == monetary unit
# The standard unit of value of a currency, as the dollar in the United States or the peso in Mexico.
# https://www.answers.com/topic/monetary-unit
# https://www.answers.com/redirectSearch?query=monetary-unit
# == fractional monetary unit, subunit
# A monetary unit that is valued at a fraction (usually one hundredth) of the basic monetary unit
# https://www.answers.com/topic/fractional-monetary-unit-subunit
# https://www.answers.com/redirectSearch?query=fractional-monetary-unit-subunit
#
# See https://en.wikipedia.org/wiki/List_of_circulating_currencies and
# http://search.cpan.org/~tnguyen/Locale-Currency-Format-1.28/Format.pm
# https://metacpan.org/release/TNGUYEN/Locale-Currency-Format-1.28/view/Format.pm
def self.table: () -> untyped

# List the currencies imported and registered
Expand All @@ -89,7 +89,7 @@ class Money

# We need a string-based validator before creating an unbounded number of
# symbols.
# http://www.randomhacks.net/articles/2007/01/20/13-ways-of-looking-at-a-ruby-symbol#11
# http://www.randomhacks.net.s3-website-us-east-1.amazonaws.com/2007/01/20/13-ways-of-looking-at-a-ruby-symbol/#11
# https://github.com/RubyMoney/money/issues/132
#
# @return [Set]
Expand Down Expand Up @@ -306,4 +306,4 @@ class Money

def initialize_data!: () -> untyped
end
end
end
Loading