Skip to content

Commit 998e32c

Browse files
committed
Fix Swift 5.2 closures and new cache for jazzy
1 parent a640a70 commit 998e32c

File tree

11 files changed

+90
-90
lines changed

11 files changed

+90
-90
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ jobs:
109109
uses: actions/cache@v2
110110
with:
111111
path: vendor/bundle
112-
key: ${{ runner.os }}-gem-v2-${{ hashFiles('**/Gemfile.lock') }}
112+
key: ${{ runner.os }}-gem-v3-${{ hashFiles('**/Gemfile.lock') }}
113113
restore-keys: |
114-
${{ runner.os }}-gem-v2
114+
${{ runner.os }}-gem-v3
115115
- name: Install Bundle
116116
run: |
117117
bundle config path vendor/bundle

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
uses: actions/cache@v2
2727
with:
2828
path: vendor/bundle
29-
key: ${{ runner.os }}-gem-v2-${{ hashFiles('**/Gemfile.lock') }}
29+
key: ${{ runner.os }}-gem-v3-${{ hashFiles('**/Gemfile.lock') }}
3030
restore-keys: |
31-
${{ runner.os }}-gem-v2
31+
${{ runner.os }}-gem-v3
3232
- name: Install Bundle
3333
run: |
3434
bundle config path vendor/bundle

Sources/ParseSwift/Authentication/Protocols/ParseAuthentication+combine.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public extension ParseUser {
4949
authData: [String: String],
5050
options: API.Options = []) -> Future<Self, ParseError> {
5151
Future { promise in
52-
login(type,
53-
authData: authData,
54-
options: options,
55-
completion: promise)
52+
Self.login(type,
53+
authData: authData,
54+
options: options,
55+
completion: promise)
5656
}
5757
}
5858

@@ -65,9 +65,9 @@ public extension ParseUser {
6565
func unlinkPublisher(_ type: String,
6666
options: API.Options = []) -> Future<Self, ParseError> {
6767
Future { promise in
68-
unlink(type,
69-
options: options,
70-
completion: promise)
68+
self.unlink(type,
69+
options: options,
70+
completion: promise)
7171
}
7272
}
7373

@@ -85,10 +85,10 @@ public extension ParseUser {
8585
authData: [String: String],
8686
options: API.Options = []) -> Future<Self, ParseError> {
8787
Future { promise in
88-
link(type,
89-
authData: authData,
90-
options: options,
91-
completion: promise)
88+
Self.link(type,
89+
authData: authData,
90+
options: options,
91+
completion: promise)
9292
}
9393
}
9494

Sources/ParseSwift/Objects/ParseInstallation+combine.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public extension ParseInstallation {
2525
*/
2626
func fetchPublisher(options: API.Options = []) -> Future<Self, ParseError> {
2727
Future { promise in
28-
fetch(options: options,
29-
completion: promise)
28+
self.fetch(options: options,
29+
completion: promise)
3030
}
3131
}
3232

@@ -40,8 +40,8 @@ public extension ParseInstallation {
4040
*/
4141
func savePublisher(options: API.Options = []) -> Future<Self, ParseError> {
4242
Future { promise in
43-
save(options: options,
44-
completion: promise)
43+
self.save(options: options,
44+
completion: promise)
4545
}
4646
}
4747

@@ -55,7 +55,7 @@ public extension ParseInstallation {
5555
*/
5656
func deletePublisher(options: API.Options = []) -> Future<Void, ParseError> {
5757
Future { promise in
58-
delete(options: options, completion: promise)
58+
self.delete(options: options, completion: promise)
5959
}
6060
}
6161
}
@@ -73,8 +73,8 @@ public extension Sequence where Element: ParseInstallation {
7373
*/
7474
func fetchAllPublisher(options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError> {
7575
Future { promise in
76-
fetchAll(options: options,
77-
completion: promise)
76+
self.fetchAll(options: options,
77+
completion: promise)
7878
}
7979
}
8080

@@ -87,8 +87,8 @@ public extension Sequence where Element: ParseInstallation {
8787
*/
8888
func saveAllPublisher(options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError> {
8989
Future { promise in
90-
saveAll(options: options,
91-
completion: promise)
90+
self.saveAll(options: options,
91+
completion: promise)
9292
}
9393
}
9494

@@ -101,7 +101,7 @@ public extension Sequence where Element: ParseInstallation {
101101
*/
102102
func deleteAllPublisher(options: API.Options = []) -> Future<[(Result<Void, ParseError>)], ParseError> {
103103
Future { promise in
104-
deleteAll(options: options, completion: promise)
104+
self.deleteAll(options: options, completion: promise)
105105
}
106106
}
107107
}

Sources/ParseSwift/Objects/ParseObject+combine.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public extension ParseObject {
2424
*/
2525
func fetchPublisher(options: API.Options = []) -> Future<Self, ParseError> {
2626
Future { promise in
27-
fetch(options: options,
28-
completion: promise)
27+
self.fetch(options: options,
28+
completion: promise)
2929
}
3030
}
3131

@@ -38,8 +38,8 @@ public extension ParseObject {
3838
*/
3939
func savePublisher(options: API.Options = []) -> Future<Self, ParseError> {
4040
Future { promise in
41-
save(options: options,
42-
completion: promise)
41+
self.save(options: options,
42+
completion: promise)
4343
}
4444
}
4545

@@ -52,7 +52,7 @@ public extension ParseObject {
5252
*/
5353
func deletePublisher(options: API.Options = []) -> Future<Void, ParseError> {
5454
Future { promise in
55-
delete(options: options, completion: promise)
55+
self.delete(options: options, completion: promise)
5656
}
5757
}
5858
}
@@ -70,8 +70,8 @@ public extension Sequence where Element: ParseObject {
7070
*/
7171
func fetchAllPublisher(options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError> {
7272
Future { promise in
73-
fetchAll(options: options,
74-
completion: promise)
73+
self.fetchAll(options: options,
74+
completion: promise)
7575
}
7676
}
7777

@@ -84,8 +84,8 @@ public extension Sequence where Element: ParseObject {
8484
*/
8585
func saveAllPublisher(options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError> {
8686
Future { promise in
87-
saveAll(options: options,
88-
completion: promise)
87+
self.saveAll(options: options,
88+
completion: promise)
8989
}
9090
}
9191

@@ -98,7 +98,7 @@ public extension Sequence where Element: ParseObject {
9898
*/
9999
func deleteAllPublisher(options: API.Options = []) -> Future<[(Result<Void, ParseError>)], ParseError> {
100100
Future { promise in
101-
deleteAll(options: options, completion: promise)
101+
self.deleteAll(options: options, completion: promise)
102102
}
103103
}
104104
}

Sources/ParseSwift/Objects/ParseUser+combine.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public extension ParseUser {
4747
*/
4848
func signupPublisher(options: API.Options = []) -> Future<Self, ParseError> {
4949
Future { promise in
50-
signup(options: options,
51-
completion: promise)
50+
self.signup(options: options,
51+
completion: promise)
5252
}
5353
}
5454

@@ -86,7 +86,7 @@ public extension ParseUser {
8686
*/
8787
func becomePublisher(sessionToken: String, options: API.Options = []) -> Future<Self, ParseError> {
8888
Future { promise in
89-
become(sessionToken: sessionToken, options: options, completion: promise)
89+
self.become(sessionToken: sessionToken, options: options, completion: promise)
9090
}
9191
}
9292

@@ -146,8 +146,8 @@ public extension ParseUser {
146146
*/
147147
func fetchPublisher(options: API.Options = []) -> Future<Self, ParseError> {
148148
Future { promise in
149-
fetch(options: options,
150-
completion: promise)
149+
self.fetch(options: options,
150+
completion: promise)
151151
}
152152
}
153153

@@ -161,8 +161,8 @@ public extension ParseUser {
161161
*/
162162
func savePublisher(options: API.Options = []) -> Future<Self, ParseError> {
163163
Future { promise in
164-
save(options: options,
165-
completion: promise)
164+
self.save(options: options,
165+
completion: promise)
166166
}
167167
}
168168

@@ -176,7 +176,7 @@ public extension ParseUser {
176176
*/
177177
func deletePublisher(options: API.Options = []) -> Future<Void, ParseError> {
178178
Future { promise in
179-
delete(options: options, completion: promise)
179+
self.delete(options: options, completion: promise)
180180
}
181181
}
182182
}
@@ -194,8 +194,8 @@ public extension Sequence where Element: ParseUser {
194194
*/
195195
func fetchAllPublisher(options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError> {
196196
Future { promise in
197-
fetchAll(options: options,
198-
completion: promise)
197+
self.fetchAll(options: options,
198+
completion: promise)
199199
}
200200
}
201201

@@ -208,8 +208,8 @@ public extension Sequence where Element: ParseUser {
208208
*/
209209
func saveAllPublisher(options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError> {
210210
Future { promise in
211-
saveAll(options: options,
212-
completion: promise)
211+
self.saveAll(options: options,
212+
completion: promise)
213213
}
214214
}
215215

@@ -222,7 +222,7 @@ public extension Sequence where Element: ParseUser {
222222
*/
223223
func deleteAllPublisher(options: API.Options = []) -> Future<[(Result<Void, ParseError>)], ParseError> {
224224
Future { promise in
225-
deleteAll(options: options, completion: promise)
225+
self.deleteAll(options: options, completion: promise)
226226
}
227227
}
228228
}

Sources/ParseSwift/Operations/ParseOperation+combine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public extension ParseOperation {
2323
*/
2424
func savePublisher(options: API.Options = []) -> Future<T, ParseError> {
2525
Future { promise in
26-
save(options: options,
27-
completion: promise)
26+
self.save(options: options,
27+
completion: promise)
2828
}
2929
}
3030
}

Sources/ParseSwift/Types/ParseCloud+combine.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public extension ParseCloud {
2424
*/
2525
func runFunctionPublisher(options: API.Options = []) -> Future<AnyCodable, ParseError> {
2626
Future { promise in
27-
runFunction(options: options,
28-
completion: promise)
27+
self.runFunction(options: options,
28+
completion: promise)
2929
}
3030
}
3131

@@ -39,8 +39,8 @@ public extension ParseCloud {
3939
*/
4040
func startJobPublisher(options: API.Options = []) -> Future<AnyCodable, ParseError> {
4141
Future { promise in
42-
startJob(options: options,
43-
completion: promise)
42+
self.startJob(options: options,
43+
completion: promise)
4444
}
4545
}
4646
}

Sources/ParseSwift/Types/ParseConfig+combine.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public extension ParseConfig {
2323
*/
2424
func fetchPublisher(options: API.Options = []) -> Future<Self, ParseError> {
2525
Future { promise in
26-
fetch(options: options,
27-
completion: promise)
26+
self.fetch(options: options,
27+
completion: promise)
2828
}
2929
}
3030

@@ -37,8 +37,8 @@ public extension ParseConfig {
3737
*/
3838
func savePublisher(options: API.Options = []) -> Future<Bool, ParseError> {
3939
Future { promise in
40-
save(options: options,
41-
completion: promise)
40+
self.save(options: options,
41+
completion: promise)
4242
}
4343
}
4444
}

Sources/ParseSwift/Types/ParseFile+combine.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public extension ParseFile {
2121
*/
2222
func fetchPublisher(options: API.Options = []) -> Future<Self, ParseError> {
2323
Future { promise in
24-
fetch(options: options,
25-
completion: promise)
24+
self.fetch(options: options,
25+
completion: promise)
2626
}
2727
}
2828

@@ -38,9 +38,9 @@ public extension ParseFile {
3838
progress: @escaping ((URLSessionDownloadTask,
3939
Int64, Int64, Int64) -> Void)) -> Future<Self, ParseError> {
4040
Future { promise in
41-
fetch(options: options,
42-
progress: progress,
43-
completion: promise)
41+
self.fetch(options: options,
42+
progress: progress,
43+
completion: promise)
4444
}
4545
}
4646

@@ -54,8 +54,8 @@ public extension ParseFile {
5454
*/
5555
func savePublisher(options: API.Options = []) -> Future<Self, ParseError> {
5656
Future { promise in
57-
save(options: options,
58-
completion: promise)
57+
self.save(options: options,
58+
completion: promise)
5959
}
6060
}
6161

@@ -72,9 +72,9 @@ public extension ParseFile {
7272
func savePublisher(options: API.Options = [],
7373
progress: ((URLSessionTask, Int64, Int64, Int64) -> Void)? = nil) -> Future<Self, ParseError> {
7474
Future { promise in
75-
save(options: options,
76-
progress: progress,
77-
completion: promise)
75+
self.save(options: options,
76+
progress: progress,
77+
completion: promise)
7878
}
7979
}
8080

@@ -86,7 +86,7 @@ public extension ParseFile {
8686
*/
8787
func deletePublisher(options: API.Options = []) -> Future<Void, ParseError> {
8888
Future { promise in
89-
delete(options: options, completion: promise)
89+
self.delete(options: options, completion: promise)
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)