Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/1.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
danthorpe committed Mar 12, 2016
2 parents 48aa025 + 5d5202b commit 515b902
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
25 changes: 1 addition & 24 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
author_name: Daniel Thorpe
author_url: http://danthorpe.me
module_name: Money
module_version: 1.6.1
module_version: 1.6.2
github_url: https://github.com/danthorpe/Money
readme: README.md
podspec: Money.podspec
Expand Down Expand Up @@ -35,34 +35,11 @@ custom_categories:
- _MoneyCoder
- Money

- name: Foreign Exchange
children:
- MoneyPairType
- FXProviderType
- FXLocalProviderType
- FXRemoteProviderType
- CurrencyMarketTransactionType
- CryptoCurrencyMarketTransactionType
- FXQuote
- FXQuoteCoder
- FXTransaction
- FXTransactionCoder
- FXError
- FXRemoteProvider
- Yahoo
- OpenExchangeRatesAppID
- _OpenExchangeRates
- _ForeverFreeOpenExchangeRates
- CurrencyMarketTransactionKind

- name: Bitcoin
children:
- BitcoinCurrencyType
- BTC
- XBT
- CEXSupportedFiatCurrencyType
- CEXBuy
- CEXSell

- name: Pay
children:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.6.2
1. [[MNY-45](https://github.com/danthorpe/Money/pull/45)]: Fixes a serious bug where `Money` did not have the correct currency scale.

# 1.6.1
1. [[MNY-42](https://github.com/danthorpe/Money/pull/42)]: Removes all the example projects to [danthorpe/Examples](https://github.com/danthorpe/Examples). This is done mostly to avoid an issue where Carthage attempts to build all Xcode projects it can find in a repository.
2. [[MNY-43](https://github.com/danthorpe/Money/pull/43)]: Switch the code coverage reporting tool to [Coveralls](https://coveralls.io/github/danthorpe/Money), and got the coverage back to 100%.
Expand Down
4 changes: 2 additions & 2 deletions Money.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Money"
s.version = "1.6.1"
s.version = "1.6.2"
s.summary = "Swift types for working with Money."
s.description = <<-DESC
Expand All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.author = { "Daniel Thorpe" => "@danthorpe" }
s.source = { :git => "https://github.com/danthorpe/Money.git", :tag => s.version.to_s }
s.module_name = 'Money'
s.documentation_url = 'http://docs.danthorpe.me/money/1.6.1/index.html'
s.documentation_url = 'http://docs.danthorpe.me/money/1.6.2/index.html'
s.social_media_url = 'https://twitter.com/danthorpe'
s.requires_arc = true
s.ios.deployment_target = '8.0'
Expand Down
2 changes: 2 additions & 0 deletions Money/Shared/Currency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ public struct Currency {
let symbol = locale.currencySymbol

let fmtr = NSNumberFormatter()
fmtr.numberStyle = .CurrencyStyle
fmtr.locale = locale
fmtr.currencyCode = code

let scale = fmtr.maximumFractionDigits
self.init(code: code, scale: scale, symbol: symbol)
Expand Down
2 changes: 1 addition & 1 deletion Supporting Files/Money.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

MONEY_VERSION = 1.6.1
MONEY_VERSION = 1.6.2

APPLICATION_EXTENSION_API_ONLY = YES
INFOPLIST_FILE = $(SRCROOT)/Supporting Files/Info.plist
Expand Down
5 changes: 5 additions & 0 deletions Tests/Shared/MoneyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class MoneyDescriptionTests: MoneyTests {

override func setUp() {
super.setUp()
money = 3.99
gbp = 100
usd = 99
cad = 102.01
Expand All @@ -259,6 +260,10 @@ class MoneyDescriptionTests: MoneyTests {
btc = 0.002_007
}

func test__money_description() {
XCTAssertEqual(money.description.endIndex, money.description.rangeOfString("3.99")?.endIndex)
}

func test__gbp_description() {
XCTAssertEqual(gbp.currencyCode, "GBP")
XCTAssertEqual(gbp.currencySymbol, "£")
Expand Down

0 comments on commit 515b902

Please sign in to comment.