-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Unbox with Codable; upgrade RxSwift; target macOS 10.14
- Loading branch information
1 parent
b46a8a3
commit c03f0a7
Showing
17 changed files
with
76 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import Unbox | ||
struct Photo: Codable { | ||
enum CodingKeys: CodingKey { | ||
case user | ||
case urls | ||
} | ||
|
||
struct Photo: Unboxable { | ||
let user: User? | ||
let urls: PhotoUrls? | ||
|
||
init(unboxer: Unboxer) throws { | ||
self.user = unboxer.unbox(key: "user") | ||
self.urls = unboxer.unbox(key: "urls") | ||
init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.user = try container.decodeIfPresent(User.self, forKey: .user) | ||
self.urls = try container.decodeIfPresent(PhotoUrls.self, forKey: .urls) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import Unbox | ||
struct PhotoUrls: Codable { | ||
enum CodingKeys: CodingKey { | ||
case custom | ||
} | ||
|
||
struct PhotoUrls: Unboxable { | ||
let custom: String? | ||
|
||
init(unboxer: Unboxer) throws { | ||
self.custom = unboxer.unbox(key: "custom") | ||
init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.custom = try container.decodeIfPresent(String.self, forKey: .custom) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import Unbox | ||
struct User: Codable { | ||
enum CodingKeys: CodingKey { | ||
case name | ||
case links | ||
} | ||
|
||
struct User: Unboxable { | ||
let name : String? | ||
let links: UserLinks? | ||
|
||
init(unboxer: Unboxer) throws { | ||
self.name = unboxer.unbox(key: "name") | ||
self.links = unboxer.unbox(key: "links") | ||
init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.name = try container.decodeIfPresent(String.self, forKey: .name) | ||
self.links = try container.decodeIfPresent(UserLinks.self, forKey: .links) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import Unbox | ||
struct UserLinks: Codable { | ||
enum CodingKeys: CodingKey { | ||
case html | ||
} | ||
|
||
struct UserLinks: Unboxable { | ||
let html: String? | ||
|
||
init(unboxer: Unboxer) throws { | ||
self.html = unboxer.unbox(key: "html") | ||
init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
self.html = try container.decodeIfPresent(String.self, forKey: .html) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,28 @@ | ||
PODS: | ||
- Nimble (7.3.4) | ||
- Quick (1.3.4) | ||
- RxSwift (4.3.1) | ||
- SwiftLint (0.25.1) | ||
- Unbox (3.0.0) | ||
- Nimble (8.0.2) | ||
- Quick (2.1.0) | ||
- RxSwift (5.0.0) | ||
- SwiftLint (0.34.0) | ||
|
||
DEPENDENCIES: | ||
- Nimble | ||
- Quick | ||
- RxSwift (~> 4.0) | ||
- RxSwift | ||
- SwiftLint | ||
- Unbox (~> 3.0) | ||
|
||
SPEC REPOS: | ||
https://github.com/cocoapods/specs.git: | ||
- Nimble | ||
- Quick | ||
- RxSwift | ||
- SwiftLint | ||
- Unbox | ||
|
||
SPEC CHECKSUMS: | ||
Nimble: 051e3d8912d40138fa5591c78594f95fb172af37 | ||
Quick: f4f7f063c524394c73ed93ac70983c609805d481 | ||
RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4 | ||
SwiftLint: ce933681be10c3266e82576dad676fa815a602e9 | ||
Unbox: 9ed33b2a31f7a8a049f54b94d40c4a52a28c4d9d | ||
Nimble: 622629381bda1dd5678162f21f1368cec7cbba60 | ||
Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d | ||
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f | ||
SwiftLint: 79d48a17c6565dc286c37efb8322c7b450f95c67 | ||
|
||
PODFILE CHECKSUM: 445cfd34da02ee18ec26b2b018630aa0b784a60d | ||
PODFILE CHECKSUM: c4e102af2eb5609201f4523b659b339ea988fe7c | ||
|
||
COCOAPODS: 1.5.3 |
Oops, something went wrong.