Skip to content

Commit d489b4e

Browse files
committed
Rename Remote.enqueuePublisher to enqueue for consistency.
1 parent 318084a commit d489b4e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Networking/Networking/Remote/AccountRemote.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class AccountRemote: Remote {
6161
let request = DotcomRequest(wordpressApiVersion: .mark1_1, method: .get, path: path, parameters: parameters)
6262
let mapper = SiteListMapper()
6363

64-
return enqueuePublisher(request, mapper: mapper)
64+
return enqueue(request, mapper: mapper)
6565
}
6666

6767
/// Loads the site plan for the default site associated with the WordPress.com user.

Networking/Networking/Remote/Remote.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public class Remote {
140140
/// - mapper: Mapper entity that will be used to attempt to parse the Backend's Response.
141141
///
142142
/// - Returns: A publisher that emits result upon completion.
143-
func enqueuePublisher<M: Mapper>(_ request: URLRequestConvertible, mapper: M) -> AnyPublisher<Result<M.Output, Error>, Never> {
143+
func enqueue<M: Mapper>(_ request: URLRequestConvertible, mapper: M) -> AnyPublisher<Result<M.Output, Error>, Never> {
144144
network.responseDataPublisher(for: request)
145145
.map { (result: Result<Data, Error>) -> Result<M.Output, Error> in
146146
switch result {

Networking/NetworkingTests/Remote/RemoteTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ final class RemoteTests: XCTestCase {
8686

8787
// When
8888
let result = waitFor { promise in
89-
remote.enqueuePublisher(self.request, mapper: mapper).sink { result in
89+
remote.enqueue(self.request, mapper: mapper).sink { result in
9090
promise(result)
9191
}.store(in: &self.cancellables)
9292
}
@@ -159,7 +159,7 @@ final class RemoteTests: XCTestCase {
159159

160160
// When
161161
waitForExpectation { expectation in
162-
remote.enqueuePublisher(request, mapper: mapper).sink { _ in
162+
remote.enqueue(request, mapper: mapper).sink { _ in
163163
expectation.fulfill()
164164
}.store(in: &cancellables)
165165
}
@@ -253,7 +253,7 @@ final class RemoteTests: XCTestCase {
253253
// When
254254
let expectationForNotification = expectation(forNotification: .RemoteDidReceiveJetpackTimeoutError, object: nil, handler: nil)
255255
let result: Result<Any, Error> = waitFor { promise in
256-
remote.enqueuePublisher(self.request, mapper: mapper).sink { result in
256+
remote.enqueue(self.request, mapper: mapper).sink { result in
257257
promise(result)
258258
}.store(in: &self.cancellables)
259259
}

0 commit comments

Comments
 (0)