Skip to content

Commit

Permalink
Merge pull request #1199 from Automattic/lantean/wiring-simplenote-en…
Browse files Browse the repository at this point in the history
…dpoints-spm

Integrates SimplenoteEndpoints Swift Package
  • Loading branch information
jleandroperez authored Jul 26, 2024
2 parents e10baeb + 262e53b commit 4138485
Show file tree
Hide file tree
Showing 24 changed files with 56 additions and 530 deletions.
77 changes: 17 additions & 60 deletions Simplenote.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion Simplenote.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "1f66ac352dc04da5870abacba5f42306bd560111ad295c7c60a13a7af5c25ec8",
"originHash" : "7f8dc02b0065be779873bdc5b585794a5005edfeb5a5e51a04644d5b3c18e322",
"pins" : [
{
"identity" : "automattic-tracks-ios",
Expand All @@ -19,6 +19,15 @@
"version" : "8.28.0"
}
},
{
"identity" : "simplenoteendpoints-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Automattic/SimplenoteEndpoints-Swift",
"state" : {
"revision" : "3d1c0a5db39ca798a7de10e7faeef8ae66e941e6",
"version" : "1.0.0"
}
},
{
"identity" : "simplenotefoundation-swift",
"kind" : "remoteSourceControl",
Expand Down
2 changes: 2 additions & 0 deletions Simplenote/AccountDeletionController.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import SimplenoteEndpoints


@objc
class AccountDeletionController: NSObject {
Expand Down
57 changes: 0 additions & 57 deletions Simplenote/AccountRemote.swift

This file was deleted.

2 changes: 2 additions & 0 deletions Simplenote/AccountVerificationController.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import SimplenoteEndpoints


// MARK: - AccountVerificationController
//
Expand Down
2 changes: 2 additions & 0 deletions Simplenote/AuthViewController+Swift.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import SimplenoteEndpoints


// MARK: - AuthViewController: Interface Initialization
//
Expand Down
46 changes: 0 additions & 46 deletions Simplenote/LoginRemote.swift

This file was deleted.

12 changes: 0 additions & 12 deletions Simplenote/LoginRemoteProtocol.swift

This file was deleted.

1 change: 1 addition & 0 deletions Simplenote/MagicLinkAuthenticator.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
import SimplenoteEndpoints


// MARK: - Notifications
Expand Down
75 changes: 0 additions & 75 deletions Simplenote/Remote.swift

This file was deleted.

12 changes: 0 additions & 12 deletions Simplenote/RemoteConstants.swift

This file was deleted.

42 changes: 0 additions & 42 deletions Simplenote/RemoteError.swift

This file was deleted.

27 changes: 0 additions & 27 deletions Simplenote/SignupRemote.swift

This file was deleted.

5 changes: 5 additions & 0 deletions Simplenote/SimperiumAuthenticatorProtocol.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import SimplenoteEndpoints
import Simperium_OSX


// MARK: - SimperiumAuthenticatorProtocol
Expand All @@ -9,3 +11,6 @@ protocol SimperiumAuthenticatorProtocol {


extension SPAuthenticator: SimperiumAuthenticatorProtocol { }


extension SPUser: UserProtocol { }
9 changes: 0 additions & 9 deletions Simplenote/URLSessionProtocol.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import Foundation
import SimplenoteEndpoints
@testable import Simplenote


extension AccountVerificationController {
func randomResult() -> Result<Data?, RemoteError> {
return Bool.random() ? .success(nil) : .failure(RemoteError.requestError(0, nil))
if Bool.random() {
return .success(nil)
}

let error = RemoteError(statusCode: .zero, response: nil, networkError: nil)
return .failure(error)
}
}
1 change: 1 addition & 0 deletions SimplenoteTests/AccountVerificationControllerTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import XCTest
import SimplenoteEndpoints
@testable import Simplenote

// MARK: - AccountVerificationControllerTests
Expand Down
Loading

0 comments on commit 4138485

Please sign in to comment.