Skip to content

Commit

Permalink
Remove Result framework and use Swift.Result
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcmramos committed Jul 2, 2019
1 parent ad20b48 commit a7b3c4c
Show file tree
Hide file tree
Showing 34 changed files with 10 additions and 49 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- Added support for objects in query params
- Added support for nullable properties

### Changed:
- Remove Result 3rd party framework

## 4.1.0

### Added
Expand Down
1 change: 0 additions & 1 deletion Specs/Petstore/generated/Swift/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

github "Alamofire/Alamofire" ~> 4.8.2
github "antitypical/Result" ~> 4.1.0
2 changes: 0 additions & 2 deletions Specs/Petstore/generated/Swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.8.2")),
.package(url: "https://github.com/antitypical/Result.git", .exact("4.1.0")),
],
targets: [
.target(name: "Petstore", dependencies: [
"Alamofire",
"Result",
], path: "Sources")
]
)
1 change: 0 additions & 1 deletion Specs/Petstore/generated/Swift/Petstore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.9'
s.source_files = 'Sources/**/*.swift'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'Result', '~> 4.1.0'
end
2 changes: 1 addition & 1 deletion Specs/Petstore/generated/Swift/Sources/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Specs/Petstore/generated/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// https://github.com/yonaskolb/SwagGen
//

import Result

public typealias APIResult<T> = Result<T, APIClientError>
1 change: 0 additions & 1 deletion Specs/PetstoreTest/generated/Swift/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

github "Alamofire/Alamofire" ~> 4.8.2
github "antitypical/Result" ~> 4.1.0
2 changes: 0 additions & 2 deletions Specs/PetstoreTest/generated/Swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.8.2")),
.package(url: "https://github.com/antitypical/Result.git", .exact("4.1.0")),
],
targets: [
.target(name: "PetstoreTest", dependencies: [
"Alamofire",
"Result",
], path: "Sources")
]
)
1 change: 0 additions & 1 deletion Specs/PetstoreTest/generated/Swift/PetstoreTest.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.9'
s.source_files = 'Sources/**/*.swift'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'Result', '~> 4.1.0'
end
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Specs/PetstoreTest/generated/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// https://github.com/yonaskolb/SwagGen
//

import Result

public typealias APIResult<T> = Result<T, APIClientError>
1 change: 0 additions & 1 deletion Specs/Rocket/generated/Swift/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

github "Alamofire/Alamofire" ~> 4.8.2
github "antitypical/Result" ~> 4.1.0
2 changes: 0 additions & 2 deletions Specs/Rocket/generated/Swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.8.2")),
.package(url: "https://github.com/antitypical/Result.git", .exact("4.1.0")),
],
targets: [
.target(name: "Rocket", dependencies: [
"Alamofire",
"Result",
], path: "Sources")
]
)
1 change: 0 additions & 1 deletion Specs/Rocket/generated/Swift/Rocket.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ best suits the application they are developing.
s.osx.deployment_target = '10.9'
s.source_files = 'Sources/**/*.swift'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'Result', '~> 4.1.0'
end
2 changes: 1 addition & 1 deletion Specs/Rocket/generated/Swift/Sources/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Specs/Rocket/generated/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// https://github.com/yonaskolb/SwagGen
//

import Result

public typealias APIResult<T> = Result<T, APIClientError>
1 change: 0 additions & 1 deletion Specs/TBX/generated/Swift/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

github "Alamofire/Alamofire" ~> 4.8.2
github "antitypical/Result" ~> 4.1.0
2 changes: 0 additions & 2 deletions Specs/TBX/generated/Swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.8.2")),
.package(url: "https://github.com/antitypical/Result.git", .exact("4.1.0")),
],
targets: [
.target(name: "TBX", dependencies: [
"Alamofire",
"Result",
], path: "Sources")
]
)
2 changes: 1 addition & 1 deletion Specs/TBX/generated/Swift/Sources/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Specs/TBX/generated/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// https://github.com/yonaskolb/SwagGen
//

import Result

public typealias APIResult<T> = Result<T, APIClientError>
1 change: 0 additions & 1 deletion Specs/TBX/generated/Swift/TBX.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.9'
s.source_files = 'Sources/**/*.swift'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'Result', '~> 4.1.0'
end
1 change: 0 additions & 1 deletion Specs/TFL/generated/Swift/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

github "Alamofire/Alamofire" ~> 4.8.2
github "antitypical/Result" ~> 4.1.0
2 changes: 0 additions & 2 deletions Specs/TFL/generated/Swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.8.2")),
.package(url: "https://github.com/antitypical/Result.git", .exact("4.1.0")),
],
targets: [
.target(name: "TFL", dependencies: [
"Alamofire",
"Result",
], path: "Sources")
]
)
2 changes: 1 addition & 1 deletion Specs/TFL/generated/Swift/Sources/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Specs/TFL/generated/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// https://github.com/yonaskolb/SwagGen
//

import Result

public typealias APIResult<T> = Result<T, APIClientError>
1 change: 0 additions & 1 deletion Specs/TFL/generated/Swift/TFL.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.9'
s.source_files = 'Sources/**/*.swift'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'Result', '~> 4.1.0'
end
1 change: 0 additions & 1 deletion Specs/TestSpec/generated/Swift/Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

github "Alamofire/Alamofire" ~> 4.8.2
github "antitypical/Result" ~> 4.1.0
2 changes: 0 additions & 2 deletions Specs/TestSpec/generated/Swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .exact("4.8.2")),
.package(url: "https://github.com/antitypical/Result.git", .exact("4.1.0")),
],
targets: [
.target(name: "TestSpec", dependencies: [
"Alamofire",
"Result",
], path: "Sources")
]
)
2 changes: 1 addition & 1 deletion Specs/TestSpec/generated/Swift/Sources/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Specs/TestSpec/generated/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
// https://github.com/yonaskolb/SwagGen
//

import Result

public typealias APIResult<T> = Result<T, APIClientError>
1 change: 0 additions & 1 deletion Specs/TestSpec/generated/Swift/TestSpec.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.9'
s.source_files = 'Sources/**/*.swift'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'Result', '~> 4.1.0'
end
2 changes: 1 addition & 1 deletion Templates/Swift/Sources/APIResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extension APIResponse: CustomStringConvertible, CustomDebugStringConvertible {

public var debugDescription: String {
var string = description
if let response = result.value?.response {
if let response = try? result.get().response {
if let debugStringConvertible = response as? CustomDebugStringConvertible {
string += "\n\(debugStringConvertible.debugDescription)"
}
Expand Down
2 changes: 0 additions & 2 deletions Templates/Swift/Sources/APIResult.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% include "Includes/Header.stencil" %}

import Result

public typealias APIResult<T> = Result<T, APIClientError>
4 changes: 0 additions & 4 deletions Templates/Swift/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ options:
pod: Alamofire
github: Alamofire/Alamofire
version: 4.8.2
- name: Result
pod: Result
github: antitypical/Result
version: 4.1.0
templateFiles:
- path: README.md
- path: Package.swift
Expand Down

0 comments on commit a7b3c4c

Please sign in to comment.