Skip to content

Commit a4e1c47

Browse files
committed
Release 1.2.16
1 parent 31c39af commit a4e1c47

File tree

6 files changed

+118
-109
lines changed

6 files changed

+118
-109
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
APPNAME = "bankster"
2-
VERSION = "1.2.15"
2+
VERSION = "1.2.16"
33

44
.PHONY: watch default docs deploy test test-clj sig jar pom clean tag
55

NEWS.md

+82-73
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
# History of Bankster releases
22

3+
## 1.2.16 (2022-11-25)
4+
5+
- `io.randomseed.bankster.util.fs/default-encoding` is no longer private.
6+
- nREPL server is no longer automatically started when loading `infra.clj`.
7+
- Excluded `abs` from being aliased in `io.randomseed.bankster.money`.
8+
- Removed Midje tests, added clojure.test.
9+
- CircleCI configuration updated.
10+
- Deps updated.
11+
312
## 1.2.15 (2021-12-29)
413

514
- Deps updated (codox).
615

716
## 1.2.14 (2021-09-24)
817

9-
- Nil punning added to: currency/ns-code, cuurrency/code, currency/weight,
10-
currency/domain, currency/kind, currency/sc, currency/nr
18+
- Nil punning added to: `currency/ns-code`, `currency/code`, `currency/weight`,
19+
`currency/domain`, `currency/kind`, `currency/sc`, `currency/nr`.
1120

1221
## 1.2.13 (2021-09-23)
1322

14-
- Fixed a bug that caused an amount to be a kind of Money instead of BigDecimal
15-
when money/value was called on currency and money.
23+
- Fixed a bug that caused an amount to be a kind of `Money` instead of `BigDecimal`
24+
when `money/value` was called on currency and money.
1625

1726
## 1.2.12 (2021-07-18)
1827

19-
- Type hinting and assertion tests improved in money/compare and money/compare-amount.
28+
- Type hinting and assertion tests improved in `money/compare` and `money/compare-amount`.
2029

2130
## 1.2.10, 1.2.11 (2021-07-13)
2231

@@ -27,119 +36,119 @@
2736

2837
## 1.2.9 (2021-07-06)
2938

30-
- Fixed type hinting in fs/absoute-path?.
39+
- Fixed type hinting in `fs/absoute-path?`.
3140

32-
- Money comparators (money/compare and money/compare-amounts) now accept nil values.
41+
- Monetary comparators (`money/compare` and `money/compare-amounts`) now accept `nil` values.
3342

34-
- Added money/round-to for interval-based rounding.
43+
- Added `money/round-to` for interval-based rounding.
3544

3645
## 1.2.8 (2021-06-28)
3746

38-
- Rewritten fs/absolute-path? and fs/relative-path?
47+
- Rewritten `fs/absolute-path?` and `fs/relative-path?`
3948

4049
## 1.2.7 (2021-06-17)
4150

42-
- Improved money/on-amount (now it rescales results to the scale of a money,
51+
- Improved `money/on-amount` (now it rescales results to the scale of a money,
4352
not the nominal scale of a currency).
4453

45-
- Added alias money/apply that points to money/on-amount.
54+
- Added alias `money/apply` that points to `money/on-amount`.
4655

47-
- Added money/set-amount.
56+
- Added `money/set-amount`.
4857

4958
## 1.2.6 (2021-06-02)
5059

51-
- Monetary implementation for Currency objects fixed for nil registry argument.
52-
Affected function: currency/unit.
60+
- `Monetary` implementation for `Currency` objects fixed for `nil` registry argument.
61+
Affected function: `currency/unit`.
5362

54-
- Fixed type hinting in currency/sc and currency/nr.
63+
- Fixed type hinting in `currency/sc` and `currency/nr`.
5564

5665
## 1.2.5 (2021-05-02)
5766

58-
- Monetary implementation for maps is more restrictive when registry is passed as an
67+
- `Monetary` implementation for maps is more restrictive when registry is passed as an
5968
argument. Previously maps were causing some functions to create *ad hoc*
6069
currencies, now the `:id` key is used to get the existing currency from a registry.
61-
This is in line with the protocol's guidelines. Affected functions: currency/unit,
62-
currency/of-id.
70+
This is in line with the protocol's guidelines. Affected functions: `currency/unit`,
71+
`currency/of-id`.
6372

64-
- Monetary implementation for Currency objects is now fulfilling protocol
65-
specification, making ID-only look-ups. Affected functions: currency/unit,
66-
currency/of-id.
73+
- `Monetary` implementation for `Currency` objects is now fulfilling protocol
74+
specification, making ID-only look-ups. Affected functions: `currency/unit`,
75+
`currency/of-id`.
6776

68-
- Monetary implementation for keywords now falls back to currency code look-up even
77+
- `Monetary` implementation for keywords now falls back to currency code look-up even
6978
if the given identifier is not namespace-qualified. Affected functions:
70-
currency/unit, currency/present? It fixes *the chicken or the egg* problem during
79+
`currency/unit`, `currency/present?`. It fixes *the chicken or the egg* problem during
7180
registry building.
7281

73-
- Functions currency/add-countries, currency/remove-localized-properties,
74-
currency/add-localized-properties, currency/add-weighted-code and currency/update
82+
- Functions `currency/add-countries`, `currency/remove-localized-properties`,
83+
`currency/add-localized-properties`, `currency/add-weighted-code` and `currency/update`
7584
are now more strict and require currency ID to be given (not currency code).
7685

7786
**BREAKING CHANGES**:
7887

79-
- Low-level function currency/add-weighted-currency renamed to
80-
currency/add-weighted-code.
88+
- Low-level function `currency/add-weighted-currency` renamed to
89+
`currency/add-weighted-code`.
8190

8291
## 1.2.4 (2021-04-18)
8392

84-
- Added money/data-readers and money/code-readers constants.
93+
- Added `money/data-readers` and `money/code-readers` constants.
8594

86-
- Added data_readers_edn.clj (with generator in importer/readers-export) containing
95+
- Added `data_readers_edn.clj` (with generator in `importer/readers-export`) containing
8796
data readers for parsing EDN files.
8897

89-
- Fixed a bug causing registry to not be properly set in currency/with-registry and
90-
registry/with.
98+
- Fixed a bug causing registry to not be properly set in `currency/with-registry` and
99+
`registry/with`.
91100

92-
- Added fs/get-resource utility function.
101+
- Added `fs/get-resource` utility function.
93102

94103
**BREAKING CHANGES**:
95104

96105
- Data readers for tagged literals are split into code and data related handlers:
97106

98-
- Functions currency/code-literal and money/code-literal are now emitting Clojure
99-
forms that are to be evaluated to produce Currency and Money objects.
107+
- Functions `currency/code-literal` and `money/code-literal` are now emitting Clojure
108+
forms that are to be evaluated to produce `Currency` and `Money` objects.
100109

101-
- Functions currency/data-literal and money/data-literal are now returning Currency
102-
and Money objects.
110+
- Functions `currency/data-literal` and `money/data-literal` are now returning `Currency`
111+
and `Money` objects.
103112

104113
- Tagged literal handlers (for both Clojure code and data) can now be controlled by
105114
the environment (e.g. dynamic variables for setting alternate registry or
106115
rounding mode during parsing).
107116

108-
- Constant bankster/tagged-literals moved to money/tagged-literals.
117+
- Constant `bankster/tagged-literals` moved to `money/tagged-literals`.
109118

110119
## 1.2.3 (2021-04-16)
111120

112121
- Fixed issue with data-readers file visibility by adding a copy to resources directory.
113122

114123
## 1.2.2 (2021-04-16)
115124

116-
- Added io.randomseed.bankster/data-readers map to expose tagged literal handlers.
125+
- Added `io.randomseed.bankster/data-readers` map to expose tagged literal handlers.
117126

118127
## 1.2.1 (2021-04-15)
119128

120-
- Fixed a bug causing money/of-registry to not rescale amounts.
129+
- Fixed a bug causing `money/of-registry` to not rescale amounts.
121130

122131
## 1.2.0 (2021-04-13)
123132

124-
- Function money/div-rem renamed to money/rem and improved to behave like div in
133+
- Function `money/div-rem` renamed to `money/rem` and improved to behave like `money/div` in
125134
terms of accepted argument types, rounding and rescaling.
126135

127-
- Added function money/abs.
136+
- Added function `money/abs`.
128137

129-
- Added aliases: money/+, money/-, money/*, money//, money/min, money/max.
138+
- Added aliases: `money/+`, `money/-`, `money/*`, `money//`, `money/min`, `money/max`.
130139

131-
- Added aliases: money/>, money/>=, money/<, money/<=, money/=, money/==.
140+
- Added aliases: `money/>`, `money/>=`, `money/<`, `money/<=`, `money/=`, `money/==`.
132141

133-
- Added aliases: money/pos?, money/neg?, money/zero?.
142+
- Added aliases: `money/pos?`, `money/neg?`, `money/zero?`.
134143

135-
- Conversion functions scale/->int, scale/->long, scale/->double, scale/->float,
136-
scale/to-plain-string, scale/to-clojure-string, scale/to-symbol,
137-
scale/to-clojure-symbol are now using scale/amount to get the actual amount of the
138-
given scalable instead of expecting BigDecimal values.
144+
- Conversion functions `scale/->int`, `scale/->long`, `scale/->double`, `scale/->float`,
145+
`scale/to-plain-string`, `scale/to-clojure-string`, `scale/to-symbol`,
146+
`scale/to-clojure-symbol` are now using `scale/amount` to get the actual amount of the
147+
given scalable instead of expecting `BigDecimal` values.
139148

140149
**BREAKING CHANGES**:
141150

142-
- Function money/pos now returns its argument. Use money/abs to get the absolute
151+
- Function `money/pos` now returns its argument. Use `money/abs` to get the absolute
143152
value.
144153

145154
## 1.1.3 (2021-04-12)
@@ -148,17 +157,17 @@
148157

149158
## 1.1.2 (2021-04-05)
150159

151-
- Monetary protocol methods are now more strict about the origin of currency
160+
- `Monetary` protocol methods are now more strict about the origin of currency
152161
if a registry is given (by-ID resolving and getting from a registry happens
153-
even for Currency objects).
162+
even for `Currency` objects).
154163

155-
- Unary variants of money/div and money/div-scaled are now able to take money as an
156-
argument (common operation when recalculating exchange rates).
164+
- Unary variants of `money/div` and `money/div-scaled` are now able to take `Money` as
165+
arguments (common operation when recalculating exchange rates).
157166

158-
- Protocol method implementations of money/value short-circuit on nil given as an
167+
- Protocol method implementations of `money/value` short-circuit on `nil` given as an
159168
amount.
160169

161-
- Added functions: money/auto-scaled?, money/of-registry and money/on-amount.
170+
- Added functions: `money/auto-scaled?`, `money/of-registry` and `money/on-amount`.
162171

163172
- Fixed a bug causing division and multiplication of auto-scaled currencies to
164173
rescale results to latest scales of the amounts instead of performing scale-free
@@ -174,48 +183,48 @@
174183

175184
## 1.1.0 (2021-03-25)
176185

177-
- Added currency/update for updating currencies with additional data preservation
186+
- Added `currency/update` for updating currencies with additional data preservation
178187
(localized properties, countries, etc.).
179-
- Added money/cast for casting monetary amounts across currencies
188+
- Added `money/cast` for casting monetary amounts across currencies
180189
(different or slightly different, e.g. sourced in another registries).
181-
- Added scale/to-clojure-string, scale/to-symbol, scale/to-clojure-symbol.
182-
- Added money/->symbol, money/->clojure-symbol, money/->double, money/->float.
183-
- Improved money/value to be more polymorphic (currency argument).
184-
- Improved conversion functions: scale/->int, scale/->long, scale/->float, scale/->double.
190+
- Added `scale/to-clojure-string`, `scale/to-symbol`, `scale/to-clojure-symbol`.
191+
- Added `money/->symbol`, `money/->clojure-symbol`, `money/->double`, `money/->float`.
192+
- Improved `money/value` to be more polymorphic (currency argument).
193+
- Improved conversion functions: `scale/->int`, `scale/->long`, `scale/->float`, `scale/->double`.
185194
- Type hinting improved in multiple functions and protocol methods.
186195

187196
**BREAKING CHANGES**:
188197

189198
- Conversion functions now have different arities:
190-
scale/->int, scale/->long, scale/->float, scale/->double.
191-
- Function scale/to-plain-string is now converting decimals to plain strings
192-
without adding M suffix when there is too many digits. This functionality
193-
was moved to scale/to-clojure-string.
199+
`scale/->int`, `scale/->long`, `scale/->float`, `scale/->double`.
200+
- Function `scale/to-plain-string` is now converting decimals to plain strings
201+
without adding `M` suffix when there is too many digits. This functionality
202+
was moved to `scale/to-clojure-string`.
194203

195204
## 1.0.8 (2021-03-23)
196205

197-
- Function money/convert now accepts a price and is more polymorphic.
198-
- Added the function currency/localized-properties.
206+
- Function `money/convert` now accepts a price and is more polymorphic.
207+
- Added the function `currency/localized-properties`.
199208

200209
## 1.0.7 (2021-03-19)
201210

202-
- Improved and unified rescaling of Money objects when their currency is auto-scaled.
203-
- Functions money/amount, money/stripped-amount and money/currency are now polymorphic.
211+
- Improved and unified rescaling of `Money` objects when their currency is auto-scaled.
212+
- Functions `money/amount`, `money/stripped-amount` and `money/currency` are now polymorphic.
204213
- Currencies database updated.
205214

206215
## 1.0.6 (2021-03-19)
207216

208-
- Better printing of monetary amounts of big precisions (adding M letter to a number).
209-
- Better parsing of monetary amounts of big precisions (early conversion to big decimals to avoid scientific notation).
217+
- Better printing of monetary amounts of big precision (adding `M` letter to a number).
218+
- Better parsing of monetary amounts of big precision (early conversion to big decimals to avoid scientific notation).
210219

211220
## 1.0.5 (2021-03-18)
212221

213222
- Fixed a bug reversing order of weighted currencies.
214223

215224
## 1.0.4 (2021-03-18)
216225

217-
- Added missing Monetary implementation functions for Money.
218-
- Improved currency/id Monetary implementation to support currency codes.
226+
- Added missing `Monetary` implementation functions for `Money`.
227+
- Improved `currency/id` `Monetary` implementation to support currency codes.
219228

220229
## 1.0.3 (2021-03-17)
221230

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ To use Bankster in your project, add the following to dependencies section of
3535
`project.clj` or `build.boot`:
3636

3737
```clojure
38-
[io.randomseed/bankster "1.2.15"]
38+
[io.randomseed/bankster "1.2.16"]
3939
```
4040

4141
For `deps.edn` add the following as an element of a map under `:deps` or
4242
`:extra-deps` key:
4343

4444
```clojure
45-
io.randomseed/bankster {:mvn/version "1.2.15"}
45+
io.randomseed/bankster {:mvn/version "1.2.16"}
4646
```
4747

4848
Additionally, if you want to utilize specs and generators provided by the Bankster
@@ -565,7 +565,7 @@ final and the support for currencies is limited to the "official" ones.
565565

566566
## License
567567

568-
Copyright © 2021 Paweł Wilk
568+
Copyright © 2021,2022 Paweł Wilk
569569

570570
Bankster is copyrighted software owned by Paweł Wilk ([email protected]). You may
571571
redistribute and/or modify this software as long as you comply with the terms of

bankster.jar.asc

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
-----BEGIN PGP SIGNATURE-----
22
Comment: GPGTools - http://gpgtools.org
33

4-
iQIzBAABCAAdFiEElzhGBxSaMDOq9Z/XNjF6dNg249AFAmHMLacACgkQNjF6dNg2
5-
49Cp8w/+N7IDBQEPeDpqfFoMHqH6OALWqmnsQ7FbT9Q7oyH6H7ob9ZeRLHmi5fjW
6-
lNlHUs02nSSBCc+HAbssug6HqaOxi7bO/MnFmp4kc0pqp0s94B4dU4Wz5YXiEF8y
7-
L9vde4HS9QamyAJZjMQMm9d0NbwhM32X8UKVddiru9TAiWSeVU9/CQo+DPYA2Hq6
8-
0v2bDPzGlUGdZ9VSAvZfD9u0N7xv+sqwvvMhaK1hHCkkAJdogXtZ2v00uzQe3ZDB
9-
JzcaGXsbOjcV6ZKR3tRoDXqGtyC4vHGy+6svzWm1tvgI3Vr05cY24EAZOEF0mbVK
10-
g+PRuSYc13exe50P+NSNjq3ZLG540F90imeX9S9i8AIJ7I/kQ+NKX6Cd6i9NFo0N
11-
5tkNIt33kcHOlrivZRfAFVEop123nmV4QTJJwmEDJrPXk6sNS+p28BFaf4M2E3oq
12-
ysTO4XjNl6jZ12GLmDE33MjtxBHZJRaaEF38rrK+rVfI41S7U9v8xaHCd8esJ7hB
13-
gPuyQ2jHOwvglTN1kZ5R5lNwVUX31Ss/u04bcB2Tb/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