From 408d07927d459b2ff866a8fe6ff6b1cfdcdf2cca Mon Sep 17 00:00:00 2001 From: Raphael Silva <5387088+peagasilva@users.noreply.github.com> Date: Sun, 3 Jan 2021 16:19:48 +0100 Subject: [PATCH] update RxSwfit to 6.0.0 --- Cartfile | 2 +- Cartfile.resolved | 12 ++++++------ Moya.podspec | 2 +- Package.swift | 2 +- Sources/RxMoya/MoyaProvider+Rx.swift | 2 +- Tests/MoyaTests/MoyaProvider+RxSpec.swift | 16 ++++++++-------- Tests/MoyaTests/Single+MoyaSpec.swift | 22 +++++++++++----------- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Cartfile b/Cartfile index 9ae3d21a6..320429136 100644 --- a/Cartfile +++ b/Cartfile @@ -1,3 +1,3 @@ github "Alamofire/Alamofire" ~> 5.0 github "ReactiveCocoa/ReactiveSwift" ~> 6.0 -github "ReactiveX/RxSwift" ~> 5.0 +github "ReactiveX/RxSwift" ~> 6.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 1a990af06..9a10beb4c 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,6 +1,6 @@ -github "Alamofire/Alamofire" "5.0.0" -github "AliSoftware/OHHTTPStubs" "9.0.0" -github "Quick/Nimble" "v8.0.5" -github "Quick/Quick" "v2.2.0" -github "ReactiveCocoa/ReactiveSwift" "6.2.0" -github "ReactiveX/RxSwift" "5.0.1" +github "Alamofire/Alamofire" "5.4.1" +github "AliSoftware/OHHTTPStubs" "9.1.0" +github "Quick/Nimble" "v8.1.2" +github "Quick/Quick" "v2.2.1" +github "ReactiveCocoa/ReactiveSwift" "6.5.0" +github "ReactiveX/RxSwift" "6.0.0" diff --git a/Moya.podspec b/Moya.podspec index 53527ab73..3839624a1 100644 --- a/Moya.podspec +++ b/Moya.podspec @@ -47,6 +47,6 @@ Pod::Spec.new do |s| s.subspec "RxSwift" do |ss| ss.source_files = "Sources/RxMoya/" ss.dependency "Moya/Core" - ss.dependency "RxSwift", "~> 5.0" + ss.dependency "RxSwift", "~> 6.0" end end diff --git a/Package.swift b/Package.swift index 48133216e..9d92757a8 100644 --- a/Package.swift +++ b/Package.swift @@ -29,7 +29,7 @@ let package = Package( dependencies: [ .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.0.0")), .package(url: "https://github.com/Moya/ReactiveSwift.git", .upToNextMajor(from: "6.1.0")), - .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0")), + .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0")), .package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "2.0.0")), // dev .package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "8.0.0")), // dev .package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0")) // dev diff --git a/Sources/RxMoya/MoyaProvider+Rx.swift b/Sources/RxMoya/MoyaProvider+Rx.swift index 7f91545bd..e6a7758c2 100644 --- a/Sources/RxMoya/MoyaProvider+Rx.swift +++ b/Sources/RxMoya/MoyaProvider+Rx.swift @@ -21,7 +21,7 @@ public extension Reactive where Base: MoyaProviderType { case let .success(response): single(.success(response)) case let .failure(error): - single(.error(error)) + single(.failure(error)) } } diff --git a/Tests/MoyaTests/MoyaProvider+RxSpec.swift b/Tests/MoyaTests/MoyaProvider+RxSpec.swift index 1d930512f..292b495ff 100644 --- a/Tests/MoyaTests/MoyaProvider+RxSpec.swift +++ b/Tests/MoyaTests/MoyaProvider+RxSpec.swift @@ -24,8 +24,8 @@ final class MoyaProviderRxSpec: QuickSpec { _ = provider.rx.request(.zen).subscribe { event in switch event { - case .success: called = true - case .error(let error): fail("errored: \(error)") + case .success: called = true + case .failure(let error): fail("errored: \(error)") } } @@ -39,7 +39,7 @@ final class MoyaProviderRxSpec: QuickSpec { _ = provider.rx.request(target).subscribe { event in switch event { case .success(let response): responseData = response.data - case .error(let error): fail("errored: \(error)") + case .failure(let error): fail("errored: \(error)") } } @@ -70,8 +70,8 @@ final class MoyaProviderRxSpec: QuickSpec { _ = provider.rx.request(.zen).subscribe { event in switch event { - case .success: fail("should have errored") - case .error(let error): receivedError = error as? MoyaError + case .success: fail("should have errored") + case .failure(let error): receivedError = error as? MoyaError } } @@ -90,7 +90,7 @@ final class MoyaProviderRxSpec: QuickSpec { _ = provider.rx.request(target).subscribe { event in switch event { case .success: fail("we should have errored") - case .error: errored = true + case .failure: errored = true } } @@ -123,7 +123,7 @@ final class MoyaProviderRxSpec: QuickSpec { receivedResponse = response expect(provider.inflightRequests.count).to(equal(1)) - case .error(let error): + case .failure(let error): fail("errored: \(error)") } } @@ -135,7 +135,7 @@ final class MoyaProviderRxSpec: QuickSpec { expect(receivedResponse).to(beIdenticalToResponse(response)) expect(provider.inflightRequests.count).to(equal(1)) - case .error(let error): + case .failure(let error): fail("errored: \(error)") } } diff --git a/Tests/MoyaTests/Single+MoyaSpec.swift b/Tests/MoyaTests/Single+MoyaSpec.swift index 3c1a0bb33..536691204 100644 --- a/Tests/MoyaTests/Single+MoyaSpec.swift +++ b/Tests/MoyaTests/Single+MoyaSpec.swift @@ -16,7 +16,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-correct status code: \(object)") - case .error: + case .failure: errored = true } } @@ -33,7 +33,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-correct status code: \(object)") - case .error: + case .failure: errored = true } } @@ -50,7 +50,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-correct status code: \(object)") - case .error: + case .failure: errored = true } } @@ -67,7 +67,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-correct status code: \(object)") - case .error: + case .failure: errored = true } } @@ -84,7 +84,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-success status code: \(object)") - case .error: + case .failure: errored = true } } @@ -113,7 +113,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-success status code: \(object)") - case .error: + case .failure: errored = true } } @@ -166,7 +166,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success(let object): fail("called on non-success status code: \(object)") - case .error: + case .failure: errored = true } } @@ -201,7 +201,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success: fail("next called for invalid data") - case .error(let error): + case .failure(let error): receivedError = error as? MoyaError } } @@ -245,7 +245,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success: fail("next called for invalid data") - case .error(let error): + case .failure(let error): receivedError = error as? MoyaError } } @@ -303,7 +303,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success: fail("next called for invalid data") - case .error(let error): + case .failure(let error): receivedError = error as? MoyaError } } @@ -570,7 +570,7 @@ final class SingleMoyaSpec: QuickSpec { switch event { case .success: fail("success called for invalid data") - case .error(let error): + case .failure(let error): receivedError = error } }