money 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 435fd498ba0ce70e5d0ee2079e0e99d93abc2c17440f7a6cacda1176641b7d3a
4
- data.tar.gz: 81fdc617e20b27d8628ba2f4859fa2fd41a9cbc04c3a44ddf689036b4414f40b
3
+ metadata.gz: b617ca145c64fc7269e5bdc8f3bb64d8c7e18fe081ac568c1b9f897f89e1fee1
4
+ data.tar.gz: 5d5172afa73dfbb249b14e8540de83e469633b50c23f664108b2159d8dc7ec09
5
5
  SHA512:
6
- metadata.gz: 9e2ef4767b6d9a50fa7d6eed46570249af8c2e2bade1c8b11aee93d737d1a8c484d74f1aaf837a880e28af8be44b1c5413a5bea854a015b936026032a3070dcd
7
- data.tar.gz: 756de612cdebdb1e4cf3311f460a3f5118fd775a4f1760ad211c4fd6816804cc16f8b4c461bb8a0292031d7b03a22ae0f291844467791fbbc1a9f1bc46519060
6
+ metadata.gz: af420e10767bd715a6126b658bc9f934a0087e4535a2114fbc342b40b7ad9a85d9ebe56d35e00756034f42ed76172fa999134e5aa29132e2612845073ac60d28
7
+ data.tar.gz: 2f8360e47d12a96e58ec590e1b53fbb5b2f3ba870d362151b3a31e17474477aebcc5c9e97c3b5b66c24c4613e00a06a14cb65088a00a03a7e44296c1e35b2545
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 7.0.1
6
+
7
+ - Re-publishing gem to fix file permissions https://github.com/RubyMoney/money/issues/1170
8
+
5
9
  ## 7.0.0
6
10
 
7
11
  - **Breaking change**: Require Ruby >= 3.1 and i18n ~> 1.9
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Inline docs](https://img.shields.io/badge/docs-github.io-green.svg)](https://rubymoney.github.io/money/)
6
6
  [![License](https://img.shields.io/github/license/RubyMoney/money.svg)](https://opensource.org/license/MIT)
7
7
 
8
- :warning: Please read the [upgrade guides](#upgrade-guides) before upgrading to a new major version.
8
+ ⚠️ Please read the [upgrade guides](#upgrade-guides) before upgrading to a new major version.
9
9
 
10
10
  If you miss String parsing, check out the new [monetize gem](https://github.com/RubyMoney/monetize).
11
11
 
@@ -453,6 +453,12 @@ m = Money.from_cents('123', :gbp) # => #<Money fractional:123 currency:GBP>
453
453
  m.format(symbol: m.currency.to_s + ' ') # => "GBP 1.23"
454
454
  ```
455
455
 
456
+ If you would like to customize currency symbols to avoid ambiguity between currencies, you can:
457
+
458
+ ```ruby
459
+ Money::Currency.table[:hkd][:symbol] = 'HK$'
460
+ ```
461
+
456
462
  ## Rounding
457
463
 
458
464
  By default, `Money` objects are rounded to the nearest cent and the additional precision is not preserved:
@@ -614,7 +620,7 @@ Prior to v6.9.0 heuristic analysis of string input was part of this gem. Since t
614
620
 
615
621
  When upgrading between major versions, please refer to the appropriate upgrade guide:
616
622
 
617
- - **[Upgrading to 7.0](UPGRADING-7.0.md)** - Guide for migrating from 6.x to 7.0
618
- - **[Upgrading to 6.0](UPGRADING-6.0.md)** - Guide for upgrading to version 6.0
623
+ - [Upgrading to 7.0](https://github.com/RubyMoney/money/blob/main/UPGRADING-7.0.md) - Guide for migrating from 6.x to 7.0
624
+ - [Upgrading to 6.0](https://github.com/RubyMoney/money/blob/main/UPGRADING-6.0.md) - Guide for upgrading to version 6.0
619
625
 
620
626
  These guides provide detailed information about breaking changes, new features, and step-by-step migration instructions.
@@ -113,30 +113,28 @@ class Money
113
113
  fractional < 0
114
114
  end
115
115
 
116
- # @method +(other)
117
- # Returns a new Money object containing the sum of the two operands' monetary
118
- # values. If +other_money+ has a different currency then its monetary value
119
- # is automatically exchanged to this object's currency using +exchange_to+.
116
+ # @!method +(other)
117
+ # Returns a new Money object containing the sum of the two operands' monetary
118
+ # values. If +other_money+ has a different currency then its monetary value
119
+ # is automatically exchanged to this object's currency using +exchange_to+.
120
120
  #
121
- # @param [Money] other Other +Money+ object to add.
121
+ # @param [Money] other Other +Money+ object to add.
122
+ # @return [Money]
122
123
  #
123
- # @return [Money]
124
- #
125
- # @example
126
- # Money.new(100) + Money.new(100) #=> #<Money @fractional=200>
127
- #
128
- # @method -(other)
129
- # Returns a new Money object containing the difference between the two
130
- # operands' monetary values. If +other_money+ has a different currency then
131
- # its monetary value is automatically exchanged to this object's currency
132
- # using +exchange_to+.
133
- #
134
- # @param [Money] other Other +Money+ object to subtract.
124
+ # @example
125
+ # Money.new(100) + Money.new(100) #=> #<Money @fractional=200>
126
+
127
+ # @!method -(other)
128
+ # Returns a new Money object containing the difference between the two
129
+ # operands' monetary values. If +other_money+ has a different currency then
130
+ # its monetary value is automatically exchanged to this object's currency
131
+ # using +exchange_to+.
135
132
  #
136
- # @return [Money]
133
+ # @param [Money] other Other +Money+ object to subtract.
134
+ # @return [Money]
137
135
  #
138
- # @example
139
- # Money.new(100) - Money.new(99) #=> #<Money @fractional=1>
136
+ # @example
137
+ # Money.new(100) - Money.new(99) #=> #<Money @fractional=1>
140
138
  [:+, :-].each do |op|
141
139
  non_zero_message = lambda do |value|
142
140
  "Can't add or subtract a non-zero #{value.class.name} value"
@@ -32,7 +32,7 @@ class Money
32
32
  # Money.us_dollar(85).format(with_currency: true) #=> "$0.85 USD"
33
33
  #
34
34
  # @option rules [Boolean] :rounded_infinite_precision (false) Whether the
35
- # amount of money should be rounded when using {infinite_precision}
35
+ # amount of money should be rounded when using {default_infinite_precision}
36
36
  #
37
37
  # @example
38
38
  # Money.us_dollar(100.1).format #=> "$1.001"
data/lib/money/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Money
4
- VERSION = '7.0.0'.freeze
4
+ VERSION = '7.0.1'.freeze
5
5
  end
data/money.gemspec CHANGED
@@ -21,8 +21,10 @@ Gem::Specification.new do |s|
21
21
  s.add_development_dependency "bundler"
22
22
  s.add_development_dependency "rake"
23
23
  s.add_development_dependency "rspec", "~> 3.4"
24
- s.add_development_dependency "yard", "~> 0.9.11"
25
- s.add_development_dependency "kramdown", "~> 2.3"
24
+ # Documentation
25
+ s.add_development_dependency "yard", "~> 0.9.38"
26
+ s.add_development_dependency "rdoc"
27
+ s.add_development_dependency "redcarpet" unless RUBY_PLATFORM == "java"
26
28
 
27
29
  s.required_ruby_version = '>= 3.1'
28
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: money
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
@@ -86,28 +86,42 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.11
89
+ version: 0.9.38
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.11
96
+ version: 0.9.38
97
97
  - !ruby/object:Gem::Dependency
98
- name: kramdown
98
+ name: rdoc
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '2.3'
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '2.3'
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: redcarpet
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: A Ruby Library for dealing with money and currency conversion.
112
126
  email:
113
127
  - shane@emmons.io
@@ -165,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
179
  - !ruby/object:Gem::Version
166
180
  version: '0'
167
181
  requirements: []
168
- rubygems_version: 3.6.9
182
+ rubygems_version: 4.0.0
169
183
  specification_version: 4
170
184
  summary: A Ruby Library for dealing with money and currency conversion.
171
185
  test_files: []