From 240e55a7e15c697efc02da6956c5ca5c046e43e1 Mon Sep 17 00:00:00 2001 From: Christopher Luu Date: Thu, 26 Jan 2017 21:48:31 -0500 Subject: [PATCH] Update to latest version of Moya (#7) This commit updates to the latest version of Moya, while updating the library to reflect the new changes. --- Cartfile.resolved | 10 +++++----- Sources/Response+Unbox.swift | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index e25ac9c..5e02b9b 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ -github "Alamofire/Alamofire" "4.2.0" +github "Alamofire/Alamofire" "4.3.0" github "antitypical/Result" "3.1.0" -github "ReactiveX/RxSwift" "3.0.1" -github "johnsundell/unbox" "2.2.1" -github "ReactiveCocoa/ReactiveSwift" "1.0.0-alpha.3" -github "Moya/Moya" "8.0.0-beta.5" +github "ReactiveX/RxSwift" "3.1.0" +github "johnsundell/unbox" "2.3.0" +github "ReactiveCocoa/ReactiveSwift" "1.0.0" +github "Moya/Moya" "8.0.1" diff --git a/Sources/Response+Unbox.swift b/Sources/Response+Unbox.swift index 8424b95..b8bed12 100644 --- a/Sources/Response+Unbox.swift +++ b/Sources/Response+Unbox.swift @@ -13,42 +13,42 @@ import Unbox public extension Response { public func unbox(object: T.Type) throws -> T { guard let json = try mapJSON() as? UnboxableDictionary else { - throw Error.jsonMapping(self) + throw MoyaError.jsonMapping(self) } return try Unbox.unbox(dictionary: json) } public func unbox(object: T.Type, atKey: String) throws -> T { guard let json = try mapJSON() as? UnboxableDictionary else { - throw Error.jsonMapping(self) + throw MoyaError.jsonMapping(self) } return try Unbox.unbox(dictionary: json, atKey: atKey) } public func unbox(object: T.Type, atKeyPath: String) throws -> T { guard let json = try mapJSON() as? UnboxableDictionary else { - throw Error.jsonMapping(self) + throw MoyaError.jsonMapping(self) } return try Unbox.unbox(dictionary: json, atKeyPath: atKeyPath) } public func unbox(array: T.Type) throws -> [T] { guard let jsonArray = try mapJSON() as? [UnboxableDictionary] else { - throw Error.jsonMapping(self) + throw MoyaError.jsonMapping(self) } return try Unbox.unbox(dictionaries: jsonArray) } public func unbox(array: T.Type, atKey: String) throws -> [T] { guard let json = try mapJSON() as? UnboxableDictionary else { - throw Error.jsonMapping(self) + throw MoyaError.jsonMapping(self) } return try Unbox.unbox(dictionary: json, atKey: atKey) } public func unbox(array: T.Type, atKeyPath: String) throws -> [T] { guard let json = try mapJSON() as? UnboxableDictionary else { - throw Error.jsonMapping(self) + throw MoyaError.jsonMapping(self) } return try Unbox.unbox(dictionary: json, atKeyPath: atKeyPath) }