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.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
danthorpe committed Nov 24, 2015
2 parents 683803e + 659115e commit 0d86221
Show file tree
Hide file tree
Showing 38 changed files with 11,333 additions and 970 deletions.
37 changes: 23 additions & 14 deletions .fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
before_all do |lane|
carthage
end

platform :ios do

desc "Runs all the tests"
lane :test do
xctest scheme: 'Money-iOS',
sdk: 'iphonesimulator',
destination: 'platform=iOS Simulator,name=iPhone 6,OS=9.1',
destination_timeout: 120,
derivedDataPath: '.ci/xcodebuild-data'

carthage(
platform: "iOS"
)

scan(
scheme: "Money-iOS",
output_directory: ".ci/xcodebuild-data/",
xcargs: "-derivedDataPath .ci/xcodebuild-data/"
)

end

end

platform :mac do

desc "Runs all the tests"
lane :test do
xctest scheme: 'Money-OSX',
sdk: 'macosx',
destination: 'platform=OS X',
derivedDataPath: '.ci/xcodebuild-data'

carthage(
platform: "Mac"
)

scan(
scheme: "Money-OSX",
output_directory: ".ci/xcodebuild-data/",
xcargs: "-derivedDataPath .ci/xcodebuild-data/"
)

end

end
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ Carthage/Build
.fastlane/report.xml
.ci/xcodebuild-data/*
*.coverage.txt
docs
127 changes: 127 additions & 0 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
author_name: Daniel Thorpe
author_url: http://danthorpe.me
module_name: Money
module_version: 1.4.0
github_url: https://github.com/danthorpe/Money
readme: README.md
podspec: Money.podspec

swift_version: 2.1
xcodebuild-arguments: -scheme,Money-iOS

custom_categories:
- name: Decimals
children:
- DecimalNumberType
- DecimalNumberBehaviorType
- DecimalNumberBehavior
- _Decimal
- Decimal
- BankersDecimal
- _DecimalCoder

- name: Currency
children:
- CurrencyType
- CustomCurrencyType
- ISOCurrencyType
- CryptoCurrencyType
- Currency

- name: Money
children:
- MoneyType
- _Money
- _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:
- PaymentSummaryItemType
- PaymentSummaryItem
- PaymentSummaryItemCoder
- PKPaymentRequest

- name: Locale
children:
- LocaleType
- CountryType
- LanguageType
- NSLocale
- Locale
- AfrikaansSpeakingCountry
- AlbanianSpeakingCountry
- ArabicSpeakingCountry
- BengaliSpeakingCountry
- CatalanSpeakingCountry
- CentralKurdishSpeakingCountry
- ChineseSpeakingCountry
- CroatianSpeakingCountry
- DanishSpeakingCountry
- DutchSpeakingCountry
- EnglishSpeakingCountry
- EweSpeakingCountry
- FrenchSpeakingCountry
- FulahSpeakingCountry
- GermanSpeakingCountry
- GreekSpeakingCountry
- HausaSpeakingCountry
- ItalianSpeakingCountry
- KoreanSpeakingCountry
- LingalaSpeakingCountry
- MalaySpeakingCountry
- MasaiSpeakingCountry
- NepaliSpeakingCountry
- NorthernSamiSpeakingCountry
- NorwegianBokmålSpeakingCountry
- OromoSpeakingCountry
- OsseticSpeakingCountry
- PersianSpeakingCountry
- PortugueseSpeakingCountry
- PunjabiSpeakingCountry
- QuechuaSpeakingCountry
- RomanianSpeakingCountry
- RussianSpeakingCountry
- SerbianSpeakingCountry
- SomaliSpeakingCountry
- SpanishSpeakingCountry
- SwahiliSpeakingCountry
- SwedishSpeakingCountry
- SwissGermanSpeakingCountry
- TamilSpeakingCountry
- TesoSpeakingCountry
- TibetanSpeakingCountry
- TigrinyaSpeakingCountry
- TurkishSpeakingCountry
- UrduSpeakingCountry
- UzbekSpeakingCountry
- YorubaSpeakingCountry
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.4.0
1. [[MNY-25](https://github.com/danthorpe/Money/pull/25)]: Adds convenience initializers to `DecimalNumberType` for `Int` (including all the variants) and `Double` parameters. Although not technically needed, (as it’s integer and float convertible) this makes it a lot easier to construct `Money` types.
2. [[MNY-24](https://github.com/danthorpe/Money/pull/26)]: Refactors the localized string formatting APIs. Fixed a few bugs which may have rendered string incorrectly formatted in some locales. Also added the ability to format `MoneyType` values using specific language and country locales. See the README for more info.
3. [[MNY-27](https://github.com/danthorpe/Money/pull/27)]: Finally got Jazzy to generate the documentation, and have created a config for the project. Hopefully now CocoaDocs will correctly parse the framework and generate docs. Documentation coverage is 96%.

# 1.3.0
1. [[MNY-21](https://github.com/danthorpe/Money/pull/21), [MNY-22](https://github.com/danthorpe/Money/pull/22)]: Adds support for initializing `MoneyType`s with minor units. Thanks to [@jlalvarez18](https://github.com/jlalvarez18).
2. [[MNY-23](https://github.com/danthorpe/Money/pull/23)]: Adds some convenience extensions to create  pay payment requests using an array of `PaymentSummaryItem` which is a new type generic over `MoneyType`. This is only available on iOS, and it allows consumers to use `Money` directly with  pay APIs.
Expand Down
16 changes: 11 additions & 5 deletions Examples/Custom Money/Custom Money/Currencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,40 @@
import Foundation
import Money

protocol MyCustomCurrencyType: CurrencyType { }
protocol MyCustomCurrencyType: CustomCurrencyType { }

extension Currency {

final class Heart: MyCustomCurrencyType {

static let code: String = "HEARTS"
static let symbol: String = "❤️"
static let scale: Int = 0
static let formatter: NSNumberFormatter = {
let fmtr = NSNumberFormatter()
fmtr.numberStyle = .CurrencyStyle
fmtr.maximumFractionDigits = Currency.Heart.scale
fmtr.currencySymbol = Currency.Heart.symbol
fmtr.currencySymbol = "❤️"
fmtr.internationalCurrencySymbol = Currency.Heart.code
let locale = NSLocale.currentLocale()
fmtr.currencyGroupingSeparator = locale.currencyGroupingSeparator
fmtr.currencyDecimalSeparator = locale.currencyDecimalSeparator
return fmtr
}()
}

final class Bee: MyCustomCurrencyType {

static let code: String = "BEES"
static let symbol: String = "🐝"
static let scale: Int = 0
static let formatter: NSNumberFormatter = {
let fmtr = NSNumberFormatter()
fmtr.numberStyle = .CurrencyStyle
fmtr.maximumFractionDigits = Currency.Bee.scale
fmtr.currencySymbol = Currency.Bee.symbol
fmtr.currencySymbol = "🐝"
fmtr.internationalCurrencySymbol = Currency.Bee.code
let locale = NSLocale.currentLocale()
fmtr.currencyGroupingSeparator = locale.currencyGroupingSeparator
fmtr.currencyDecimalSeparator = locale.currencyDecimalSeparator
return fmtr
}()
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Custom Money/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Money (1.2.1):
- Money (1.3.0):
- Result (= 0.6.0-beta.6)
- SwiftyJSON
- ValueCoding
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: "../../"

SPEC CHECKSUMS:
Money: 7bf4b32f795e1eb867c2fcebaaf90b3249824438
Money: 80739aa547740640fd960128baa40a28a22cc91b
Result: dc390d0b58f9ec43fcd536f1ebdd130803cc6cbc
SwiftyJSON: 592b53bee5ef3dd9b3bebc6b9cb7ee35426ae8c3
ValueCoding: 54486fde2d7b1c2f1eb46de260b95340abed5bde
Expand Down
4 changes: 2 additions & 2 deletions Examples/Custom Money/Pods/Local Podspecs/Money.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Examples/Custom Money/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0d86221

Please sign in to comment.