Skip to content

Commit

Permalink
Drop Result
Browse files Browse the repository at this point in the history
  • Loading branch information
larryonoff committed May 15, 2019
1 parent 5b560a1 commit cf61a5b
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 39 deletions.
1 change: 0 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
github "Alamofire/Alamofire" ~> 4.1
github "ReactiveCocoa/ReactiveSwift" ~> 6.0
github "ReactiveX/RxSwift" ~> 5.0
github "antitypical/Result" ~> 4.1
1 change: 0 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ github "Quick/Nimble" "v8.0.1"
github "Quick/Quick" "v2.1.0"
github "ReactiveCocoa/ReactiveSwift" "6.0.0"
github "ReactiveX/RxSwift" "5.0.1"
github "antitypical/Result" "4.1.0"
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Changed
- **Breaking Change** Minimum version of `RxSwift` is now 5.0. [#1846](https://github.com/Moya/Moya/pull/1846) by [@LucianoPAlmeida](https://github.com/LucianoPAlmeida).
- **Breaking Change** Minimum version of `ReactiveSwift` is now 6.0. [#1849](https://github.com/Moya/Moya/pull/1849) by [@sunshinejr](https://github.com/sunshinejr).
- **Breaking Change** Removed `Result` depndency in favor of `Result` introduced in Swift 5. [#1858](https://github.com/Moya/Moya/pull/1858) by [@larryonoff](https://github.com/larryonoff).

# [13.0.1] - 2019-05-01

Expand Down
1 change: 0 additions & 1 deletion Moya.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Pod::Spec.new do |s|
s.subspec "Core" do |ss|
ss.source_files = "Sources/Moya/", "Sources/Moya/Plugins/"
ss.dependency "Alamofire", "~> 4.1"
ss.dependency "Result", "~> 4.1"
ss.framework = "Foundation"
end

Expand Down
12 changes: 2 additions & 10 deletions Moya.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@
1446FBB31F214C5200C1EFF2 /* URL+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1446FBB21F214C5200C1EFF2 /* URL+Moya.swift */; };
1463B87B1F8A8A79002D9C4F /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8731F8A8A5B002D9C4F /* Alamofire.framework */; };
1463B87C1F8A8A79002D9C4F /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8731F8A8A5B002D9C4F /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1463B87D1F8A8A79002D9C4F /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8721F8A8A5A002D9C4F /* Result.framework */; };
1463B87E1F8A8A79002D9C4F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8721F8A8A5A002D9C4F /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1463B8801F8A8A7F002D9C4F /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8731F8A8A5B002D9C4F /* Alamofire.framework */; };
1463B8811F8A8A7F002D9C4F /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8731F8A8A5B002D9C4F /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1463B8821F8A8A7F002D9C4F /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8721F8A8A5A002D9C4F /* Result.framework */; };
1463B8831F8A8A7F002D9C4F /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1463B8721F8A8A5A002D9C4F /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
147E26EC1F5B14B300C1F513 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 147E26EB1F5B14B300C1F513 /* Task.swift */; };
148FAF0DFB395B4A64314803 /* ReactiveMoya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62A8C06CC9BA491AE62A431B /* ReactiveMoya.framework */; };
149675EB1F8133B00085EDEE /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559D567FD0DA37D6CC98FF92 /* Moya.framework */; };
149675EC1F81340B0085EDEE /* GitHubAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 469A06B01F705DDE001153A0 /* GitHubAPI.swift */; };
149675ED1F81340D0085EDEE /* GiphyAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 469A06AE1F705DDD001153A0 /* GiphyAPI.swift */; };
149675EE1F81340F0085EDEE /* GitHubUserContentAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 469A06AD1F705DDD001153A0 /* GitHubUserContentAPI.swift */; };
Expand Down Expand Up @@ -80,6 +75,7 @@
BAFB3C28D3BF17C52FDA8FE4 /* testImage.png in Resources */ = {isa = PBXBuildFile; fileRef = CA93F1BAD55FF95EDE17EE61 /* testImage.png */; };
BEAA605B30BE7651BA5C61A4 /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A693AF0E88E83E91A47A99 /* Plugin.swift */; };
C1B5E2325B210232599B0D1A /* ErrorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F112022D8F42844A7D5CB5C /* ErrorTests.swift */; };
CCB85FCA228B3D1800AAB253 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559D567FD0DA37D6CC98FF92 /* Moya.framework */; };
D00AA2514CD6B1276B845BA7 /* ReactiveMoya.h in Headers */ = {isa = PBXBuildFile; fileRef = 019BF5A88BB928EBDFD944FE /* ReactiveMoya.h */; settings = {ATTRIBUTES = (Public, ); }; };
D6A04B657A83CA2FF80ABCF4 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559D567FD0DA37D6CC98FF92 /* Moya.framework */; };
DA631A5B37F36DA17E135F14 /* SignalProducer+MoyaSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1AFAFEA29CDFABC559F0BE2 /* SignalProducer+MoyaSpec.swift */; };
Expand Down Expand Up @@ -122,7 +118,6 @@
dstSubfolderSpec = 10;
files = (
1463B87C1F8A8A79002D9C4F /* Alamofire.framework in Embed Frameworks */,
1463B87E1F8A8A79002D9C4F /* Result.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -134,7 +129,6 @@
dstSubfolderSpec = 10;
files = (
1463B8811F8A8A7F002D9C4F /* Alamofire.framework in Embed Frameworks */,
1463B8831F8A8A7F002D9C4F /* Result.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -228,8 +222,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1463B8821F8A8A7F002D9C4F /* Result.framework in Frameworks */,
149675EB1F8133B00085EDEE /* Moya.framework in Frameworks */,
CCB85FCA228B3D1800AAB253 /* Moya.framework in Frameworks */,
1463B8801F8A8A7F002D9C4F /* Alamofire.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -238,7 +231,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1463B87D1F8A8A79002D9C4F /* Result.framework in Frameworks */,
469A06B21F705ECF001153A0 /* Moya.framework in Frameworks */,
1463B87B1F8A8A79002D9C4F /* Alamofire.framework in Frameworks */,
);
Expand Down
9 changes: 0 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@
"version": "6.0.0"
}
},
{
"package": "Result",
"repositoryURL": "https://github.com/antitypical/Result.git",
"state": {
"branch": null,
"revision": "2ca499ba456795616fbc471561ff1d963e6ae160",
"version": "4.1.0"
}
},
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
Expand Down
4 changes: 1 addition & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "4.1.0")),
.package(url: "https://github.com/antitypical/Result.git", .upToNextMajor(from: "4.1.0")),
.package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", .upToNextMajor(from: ("6.0.0"))),
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0"))
],
targets: [
.target(
name: "Moya",
dependencies: [
"Alamofire",
"Result"],
"Alamofire"],
exclude: [
"Tests",
"Sources/Supporting Files",
Expand Down
10 changes: 5 additions & 5 deletions Sources/Moya/MoyaProvider+Internal.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

// MARK: - Method

Expand Down Expand Up @@ -250,15 +249,16 @@ private extension MoyaProvider {
// Inform all plugins about the response
plugins.forEach { $0.didReceive(result, target: target) }
if let progressCompletion = progressCompletion {
let value = try? result.get()
switch progressAlamoRequest {
case let downloadRequest as DownloadRequest:
progressCompletion(ProgressResponse(progress: downloadRequest.progress, response: result.value))
progressCompletion(ProgressResponse(progress: downloadRequest.progress, response: value))
case let uploadRequest as UploadRequest:
progressCompletion(ProgressResponse(progress: uploadRequest.uploadProgress, response: result.value))
progressCompletion(ProgressResponse(progress: uploadRequest.uploadProgress, response: value))
case let dataRequest as DataRequest:
progressCompletion(ProgressResponse(progress: dataRequest.progress, response: result.value))
progressCompletion(ProgressResponse(progress: dataRequest.progress, response: value))
default:
progressCompletion(ProgressResponse(response: result.value))
progressCompletion(ProgressResponse(response: value))
}
}
completion(result)
Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/MoyaProvider.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

/// Closure to be executed when a request has completed.
public typealias Completion = (_ result: Result<Moya.Response, MoyaError>) -> Void
Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/Plugin.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

/// A Moya Plugin receives callbacks to perform side effects wherever a request is sent or received.
///
Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/Plugins/AccessTokenPlugin.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

// MARK: - AccessTokenAuthorizable

Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/Plugins/CredentialsPlugin.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

/// Provides each request with optional URLCredentials.
public final class CredentialsPlugin: PluginType {
Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/Plugins/NetworkActivityPlugin.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

/// Network activity change notification type.
public enum NetworkActivityChangeType {
Expand Down
1 change: 0 additions & 1 deletion Sources/Moya/Plugins/NetworkLoggerPlugin.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import Result

/// Logs network activity (outgoing requests and incoming responses).
public final class NetworkLoggerPlugin: PluginType {
Expand Down
1 change: 0 additions & 1 deletion Tests/AccessTokenPluginSpec.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Quick
import Nimble
import Moya
import Result

final class AccessTokenPluginSpec: QuickSpec {
struct TestTarget: TargetType, AccessTokenAuthorizable {
Expand Down
1 change: 0 additions & 1 deletion Tests/NetworkLoggerPluginSpec.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Quick
import Nimble
import Moya
import Result
import enum Alamofire.AFError

final class NetworkLoggerPluginSpec: QuickSpec {
Expand Down
1 change: 0 additions & 1 deletion Tests/TestPlugin.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import enum Result.Result
@testable import Moya

final class TestingPlugin: PluginType {
Expand Down

0 comments on commit cf61a5b

Please sign in to comment.