Skip to content

Commit e2865a9

Browse files
authored
Merge pull request #1106 from fwolfst/1105-expose_version
expose Money::VERSION
2 parents 579286a + 01b7a62 commit e2865a9

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Edwin Vlieg
3535
Eloy
3636
Evan Alter
3737
Exoth
38+
Felix Wolfsteller
3839
Ferran Pelayo Monfort
3940
Filipe Goncalves
4041
Francisco Trindade

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Require Ruby >= 3.1 and I18n ~> 1.9
66
- **Potential breaking change**: Fix USDC decimals places from 2 to 6
7+
- Expose Money::VERSION
78
- **Potential breaking change**: Fix MGA (Malagasy Ariary) to be a zero-decimal currency (changing subunit_to_unit from 5 to 1)
89
- Fix typo in ILS currency
910
- Add Caribbean Guilder (XCG) as replacement for Netherlands Antillean Gulden (ANG)

lib/money.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
require "i18n"
55
require "money/currency"
66
require "money/money"
7+
require "money/version"

lib/money/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class Money
2-
VERSION = '6.19.0'
2+
VERSION = '6.19.0'.freeze
33
end

spec/money_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,4 +986,10 @@ def m.amount
986986
expect(Money.default_bank).to be_instance_of(Money::Bank::SingleCurrency)
987987
end
988988
end
989+
990+
describe 'VERSION' do
991+
it 'exposes a version with major, minor and patch level' do
992+
expect(Money::VERSION).to match(/\d+.\d+.\d+/)
993+
end
994+
end
989995
end

0 commit comments

Comments
 (0)