minting 1.1.0 → 1.1.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: be78b384415345ebacec84c0fc7194c9cb5e8ae2c3f601db5871822987f7e95c
4
- data.tar.gz: 0c852f37bca70dc4af732b824daca634a5b253d4497a10273cc9d041ccf327aa
3
+ metadata.gz: ef2574a0bffcbccb882faba1a839ef37369e047b23becf1ce405d2c1b883322a
4
+ data.tar.gz: 19ec197c01ceb083a2f6dcf2c6898b38f80ba7679749154b74b3d9fb2f2ffeda
5
5
  SHA512:
6
- metadata.gz: 6e13eed34f93beb1a1e26cf89a89fb89a57a06529225610d8cc153c6eae28823368b47a993446e2e4deb3df30cecf31800253a7c55dd070bd6dcb074f615fb91
7
- data.tar.gz: 8e2f204fbd592e93f143ed8756548d2013e909bca37d32a2fa70f41c070a3ede1946f668097faf49822a1e5e9df27cc9cf7865208faa94df47c310e06d96cd24
6
+ metadata.gz: e8680da52ba5417cbe89f2c36615247fa1cc7302088c7d087aa782b6d1958bcd124a38f2b1027cd164810f9f04b02974cf8ac68cb61047d204c9189bf1943a6d
7
+ data.tar.gz: e85e786f6cb1f98b10e75742097651013e9fe57ddad4896a70fd85b836709e2eecfe26d0f0854b05423f931b1b5fc17b46dfa63c0e25f1a86ffa024de3748d05
data/README.md CHANGED
@@ -105,15 +105,15 @@ ten.allocate([1, 2, 3]) #=> [[USD 1.67], [USD 3.33], [USD 5.00]]
105
105
 
106
106
  ## API notes
107
107
 
108
- **Module names** — Require the `minting` gem; the public API lives under `Mint` (the gem module is `Minting::VERSION`).
108
+ **Module names** — Require the `minting` gem; the public API lives under `Mint`.
109
109
 
110
- **Exact amounts** — Amounts are stored as `Rational` and rounded to the currency subunit. Prefer rationals or decimal strings for exact literals (`Mint.money(1999/100r, 'USD')`, `'19.99'.to_r`) instead of binary floats when precision matters.
110
+ **Exact amounts** — Amounts are stored as `Rational` and rounded to the currency subunit.
111
111
 
112
112
  **Refinements** — `10.dollars` and similar helpers require `using Mint` in the current scope (see Usage above).
113
113
 
114
114
  **Division** — `money / 5` returns new `Money`; `money / other_money` returns a numeric ratio, not money.
115
115
 
116
- **Zero equality** — `Mint.money(0, 'USD') == Mint.money(0, 'EUR')` is intentionally `true`. Non-zero amounts must match currency and value.
116
+ **Zero equality** — Any zero amount is considered equal across currencies and to numeric zero `Mint.money(0, 'USD') == Mint.money(0, 'EUR')` is intentionally `true`. Non-zero amounts must match currency and value.
117
117
 
118
118
  **Custom currencies** — `Mint.register_currency` returns the existing entry if the code is already registered; use `register_currency!` to detect duplicates.
119
119
 
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rubocop/rake_task'
3
3
  require 'rake/testtask'
4
+ require 'yard'
4
5
 
5
- CLOBBER.include %w[tmp]
6
+ CLOBBER.include %w[doc tmp .yardoc]
6
7
 
7
8
  Rake::TestTask.new(:test) do |t|
8
9
  t.libs << 'test'
@@ -39,4 +40,10 @@ task 'bench:all' => ['bench', 'bench:performance']
39
40
 
40
41
  RuboCop::RakeTask.new(:cop)
41
42
 
43
+ YARD::Rake::YardocTask.new do |t|
44
+ t.files = ['lib/**/*.rb'] # optional
45
+ t.options = [] # optional
46
+ t.stats_options = ['--list-undoc'] # optional
47
+ end
48
+
42
49
  task default: :test