From 23f294e8ec646146e7df3168b75c431944298777 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sun, 21 Jul 2024 20:16:32 +0200 Subject: [PATCH] Fix HTTP links With the help of [awesome_bot](https://github.com/dkhamsing/awesome_bot) - Use https where possible - Update Code Climate badge code - Update broken links - Replace `master` with `main` --- CHANGELOG.md | 80 ++++++++++++++--------------- README.md | 18 +++---- lib/money/currency.rb | 10 ++-- lib/money/money.rb | 2 +- lib/money/money/formatting_rules.rb | 2 +- money.gemspec | 2 +- sig/lib/money/currency.rbs | 12 ++--- sig/lib/money/money.rbs | 4 +- 8 files changed, 65 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58cdb538da..88f26df215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) @@ -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. @@ -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. @@ -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. @@ -604,23 +604,23 @@ 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. @@ -628,30 +628,30 @@ Features 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 ================ @@ -660,14 +660,14 @@ 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 ================ @@ -675,7 +675,7 @@ 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. @@ -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 =========== @@ -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 -------- @@ -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 =========== @@ -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 diff --git a/README.md b/README.md index cbcb9611b1..bce621647f 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![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. @@ -12,7 +12,7 @@ If you miss String parsing, check out the new [monetize gem](https://github.com/ ## 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 @@ -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 @@ -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 @@ -408,7 +408,7 @@ Money.from_cents(1000, 'USD').exchange_to('CAD') #=> # # diff --git a/lib/money/currency.rb b/lib/money/currency.rb index b4e682b55b..3260d74536 100644 --- a/lib/money/currency.rb +++ b/lib/money/currency.rb @@ -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 @@ -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 @@ -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] diff --git a/lib/money/money.rb b/lib/money/money.rb index faa0d269db..c88947f79c 100644 --- a/lib/money/money.rb +++ b/lib/money/money.rb @@ -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 diff --git a/lib/money/money/formatting_rules.rb b/lib/money/money/formatting_rules.rb index 68c917800c..987f8f0986 100644 --- a/lib/money/money/formatting_rules.rb +++ b/lib/money/money/formatting_rules.rb @@ -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}|$))/ diff --git a/money.gemspec b/money.gemspec index f52d28664e..9bf98cc081 100644 --- a/money.gemspec +++ b/money.gemspec @@ -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' diff --git a/sig/lib/money/currency.rbs b/sig/lib/money/currency.rbs index 1a5b083ef8..3740f5ebea 100644 --- a/sig/lib/money/currency.rbs +++ b/sig/lib/money/currency.rbs @@ -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 @@ -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 @@ -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] @@ -306,4 +306,4 @@ class Money def initialize_data!: () -> untyped end -end \ No newline at end of file +end diff --git a/sig/lib/money/money.rbs b/sig/lib/money/money.rbs index 4ae9772d86..ce37a16517 100644 --- a/sig/lib/money/money.rbs +++ b/sig/lib/money/money.rbs @@ -6,7 +6,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 @@ -537,4 +537,4 @@ class Money def return_value: (untyped value) -> untyped def locale_backend: () -> untyped -end \ No newline at end of file +end