From db57a74db153dcf77ef8afb674a1e4d9a9f6d402 Mon Sep 17 00:00:00 2001 From: Julien Regnauld Date: Mon, 24 Aug 2015 16:26:16 -0600 Subject: [PATCH 1/3] Update Alamofire NSError -> ErrorType and SwiftyJson --- Alamofire | 2 +- Source/Alamofire-SwiftyJSON.swift | 4 ++-- Tests/Alamofire_SwiftyJSONTests.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Alamofire b/Alamofire index 97531ad..e489c5f 160000 --- a/Alamofire +++ b/Alamofire @@ -1 +1 @@ -Subproject commit 97531ad0137a335653c83bb911bae33c67621f1e +Subproject commit e489c5fece971352b05b6ef185eca53f68bee1bc diff --git a/Source/Alamofire-SwiftyJSON.swift b/Source/Alamofire-SwiftyJSON.swift index 4dcf65c..ed1e087 100644 --- a/Source/Alamofire-SwiftyJSON.swift +++ b/Source/Alamofire-SwiftyJSON.swift @@ -22,7 +22,7 @@ extension Request { :returns: The request. */ - public func responseSwiftyJSON(completionHandler: (NSURLRequest, NSHTTPURLResponse?, SwiftyJSON.JSON, NSError?) -> Void) -> Self { + public func responseSwiftyJSON(completionHandler: (NSURLRequest, NSHTTPURLResponse?, SwiftyJSON.JSON, ErrorType?) -> Void) -> Self { return responseSwiftyJSON(nil, options:NSJSONReadingOptions.AllowFragments, completionHandler:completionHandler) } @@ -35,7 +35,7 @@ extension Request { :returns: The request. */ - public func responseSwiftyJSON(queue: dispatch_queue_t? = nil, options: NSJSONReadingOptions = .AllowFragments, completionHandler: (NSURLRequest, NSHTTPURLResponse?, JSON, NSError?) -> Void) -> Self { + public func responseSwiftyJSON(queue: dispatch_queue_t? = nil, options: NSJSONReadingOptions = .AllowFragments, completionHandler: (NSURLRequest, NSHTTPURLResponse?, JSON, ErrorType?) -> Void) -> Self { return response(queue: queue, responseSerializer: Request.JSONResponseSerializer(options: options), completionHandler: { (request, response, result) -> Void in dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { diff --git a/Tests/Alamofire_SwiftyJSONTests.swift b/Tests/Alamofire_SwiftyJSONTests.swift index 218d0c7..1869600 100644 --- a/Tests/Alamofire_SwiftyJSONTests.swift +++ b/Tests/Alamofire_SwiftyJSONTests.swift @@ -22,7 +22,7 @@ class Alamofire_SwiftyJSONTests: XCTestCase { expectation.fulfill() XCTAssertNotNil(request, "request should not be nil") XCTAssertNotNil(response, "response should not be nil") - XCTAssertNil(error, "error should be nil") + XCTAssertTrue(error == nil, "result error should be nil") XCTAssertEqual(responseJSON["args"], SwiftyJSON.JSON(["foo": "bar"] as NSDictionary), "args should be equal") }) waitForExpectationsWithTimeout(10) { (error) in From 9cb5a7759d53e2a30d1692a336b6c84c22e99096 Mon Sep 17 00:00:00 2001 From: Julien Regnauld Date: Mon, 24 Aug 2015 16:41:18 -0600 Subject: [PATCH 2/3] update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 297ddd5..e7c6e43 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! -pod 'Alamofire', :git => 'https://github.com/SwiftyJSON/Alamofire-SwiftyJSON.git', :branch => 'swift-2.0' +pod 'Alamofire-SwiftyJSON' + ``` ## Usage From ce3abd70a59aee211db694ab92e6002fc54a1893 Mon Sep 17 00:00:00 2001 From: Julien Regnauld Date: Thu, 27 Aug 2015 14:49:14 -0600 Subject: [PATCH 3/3] Update Alamofire - xcode 7.0 beta 6 --- Alamofire | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alamofire b/Alamofire index e489c5f..0fd77fe 160000 --- a/Alamofire +++ b/Alamofire @@ -1 +1 @@ -Subproject commit e489c5fece971352b05b6ef185eca53f68bee1bc +Subproject commit 0fd77fec2a33e237ab99069c36410eb7101126c6