Skip to content

Commit fcedc2d

Browse files
committed
refactor: fix typos
1 parent 595277b commit fcedc2d

File tree

7 files changed

+75
-43
lines changed

7 files changed

+75
-43
lines changed

Examples/Examples.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
793895CC2954ABFF0044F2B8 /* RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793895CB2954ABFF0044F2B8 /* RootView.swift */; };
1313
793895CE2954AC000044F2B8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 793895CD2954AC000044F2B8 /* Assets.xcassets */; };
1414
793895D22954AC000044F2B8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 793895D12954AC000044F2B8 /* Preview Assets.xcassets */; };
15-
793E03092B2CED5D00AC7DED /* Contants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793E03082B2CED5D00AC7DED /* Contants.swift */; };
15+
793E03092B2CED5D00AC7DED /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793E03082B2CED5D00AC7DED /* Constants.swift */; };
1616
793E030B2B2CEDDA00AC7DED /* ActionState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793E030A2B2CEDDA00AC7DED /* ActionState.swift */; };
1717
793E030D2B2DAB5700AC7DED /* SignInWithApple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793E030C2B2DAB5700AC7DED /* SignInWithApple.swift */; };
1818
79401F332BC6FEAE004C9C0F /* SignInWithOAuth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79401F322BC6FEAE004C9C0F /* SignInWithOAuth.swift */; };
@@ -86,7 +86,7 @@
8686
793895CD2954AC000044F2B8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8787
793895CF2954AC000044F2B8 /* Examples.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Examples.entitlements; sourceTree = "<group>"; };
8888
793895D12954AC000044F2B8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
89-
793E03082B2CED5D00AC7DED /* Contants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Contants.swift; sourceTree = "<group>"; };
89+
793E03082B2CED5D00AC7DED /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
9090
793E030A2B2CEDDA00AC7DED /* ActionState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionState.swift; sourceTree = "<group>"; };
9191
793E030C2B2DAB5700AC7DED /* SignInWithApple.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInWithApple.swift; sourceTree = "<group>"; };
9292
79401F322BC6FEAE004C9C0F /* SignInWithOAuth.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInWithOAuth.swift; sourceTree = "<group>"; };
@@ -226,7 +226,7 @@
226226
794EF1232955F3DE008C9526 /* TodoListRow.swift */,
227227
796298982AEBBA77000AA957 /* MFAFlow.swift */,
228228
79AF04852B2CE586008761AD /* Debug.swift */,
229-
793E03082B2CED5D00AC7DED /* Contants.swift */,
229+
793E03082B2CED5D00AC7DED /* Constants.swift */,
230230
793E030A2B2CEDDA00AC7DED /* ActionState.swift */,
231231
79E2B55B2B97A2310042CD21 /* UIApplicationExtensions.swift */,
232232
797EFB672BABD90500098D6B /* Stringfy.swift */,
@@ -507,7 +507,7 @@
507507
79401F332BC6FEAE004C9C0F /* SignInWithOAuth.swift in Sources */,
508508
79B1C80E2BAC017C00D991AA /* AnyJSONView.swift in Sources */,
509509
79E2B5552B9788BF0042CD21 /* GoogleSignInSDKFlow.swift in Sources */,
510-
793E03092B2CED5D00AC7DED /* Contants.swift in Sources */,
510+
793E03092B2CED5D00AC7DED /* Constants.swift in Sources */,
511511
794C61D62BAD1E12000E6B0F /* UserIdentityList.swift in Sources */,
512512
793895CC2954ABFF0044F2B8 /* RootView.swift in Sources */,
513513
7956406A2955AFBD0088A06F /* ErrorText.swift in Sources */,

Examples/Examples/Contants.swift renamed to Examples/Examples/Constants.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Contants.swift
2+
// Constants.swift
33
// Examples
44
//
55
// Created by Guilherme Souza on 15/12/23.

Sources/Auth/Internal/Contants.swift renamed to Sources/Auth/Internal/Constants.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Contants.swift
2+
// Constants.swift
33
//
44
//
55
// Created by Guilherme Souza on 22/05/24.
@@ -21,7 +21,7 @@ extension HTTPField.Name {
2121
}
2222

2323
let apiVersions: [APIVersion.Name: APIVersion] = [
24-
._20240101: ._20240101,
24+
._20240101: ._20240101
2525
]
2626

2727
struct APIVersion {
@@ -33,9 +33,9 @@ struct APIVersion {
3333
}
3434

3535
static func date(for name: Name) -> Date {
36-
let formattar = ISO8601DateFormatter()
37-
formattar.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
38-
return formattar.date(from: "\(name.rawValue)T00:00:00.0Z")!
36+
let formatter = ISO8601DateFormatter()
37+
formatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
38+
return formatter.date(from: "\(name.rawValue)T00:00:00.0Z")!
3939
}
4040
}
4141

Tests/IntegrationTests/Potsgrest/PostgrestFilterTests.swift renamed to Tests/IntegrationTests/Postgrest/PostgrestFilterTests.swift

+65-33
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ final class PostgrestFilterTests: XCTestCase {
1414
configuration: PostgrestClient.Configuration(
1515
url: URL(string: "\(DotEnv.SUPABASE_URL)/rest/v1")!,
1616
headers: [
17-
"apikey": DotEnv.SUPABASE_ANON_KEY,
17+
"apikey": DotEnv.SUPABASE_ANON_KEY
1818
],
1919
logger: nil
2020
)
2121
)
2222

2323
func testNot() async throws {
24-
let res = try await client.from("users")
24+
let res =
25+
try await client.from("users")
2526
.select("status")
2627
.not("status", operator: .eq, value: "OFFLINE")
2728
.execute()
@@ -44,7 +45,8 @@ final class PostgrestFilterTests: XCTestCase {
4445
}
4546

4647
func testOr() async throws {
47-
let res = try await client.from("users")
48+
let res =
49+
try await client.from("users")
4850
.select("status,username")
4951
.or("status.eq.OFFLINE,username.eq.supabot")
5052
.execute()
@@ -66,7 +68,8 @@ final class PostgrestFilterTests: XCTestCase {
6668
}
6769

6870
func testEq() async throws {
69-
let res = try await client.from("users")
71+
let res =
72+
try await client.from("users")
7073
.select("username")
7174
.eq("username", value: "supabot")
7275
.execute()
@@ -83,7 +86,8 @@ final class PostgrestFilterTests: XCTestCase {
8386
}
8487

8588
func testNeq() async throws {
86-
let res = try await client.from("users")
89+
let res =
90+
try await client.from("users")
8791
.select("username")
8892
.neq("username", value: "supabot")
8993
.execute()
@@ -106,7 +110,8 @@ final class PostgrestFilterTests: XCTestCase {
106110
}
107111

108112
func testGt() async throws {
109-
let res = try await client.from("messages")
113+
let res =
114+
try await client.from("messages")
110115
.select("id")
111116
.gt("id", value: 1)
112117
.execute()
@@ -123,7 +128,8 @@ final class PostgrestFilterTests: XCTestCase {
123128
}
124129

125130
func testGte() async throws {
126-
let res = try await client.from("messages")
131+
let res =
132+
try await client.from("messages")
127133
.select("id")
128134
.gte("id", value: 1)
129135
.execute()
@@ -143,7 +149,8 @@ final class PostgrestFilterTests: XCTestCase {
143149
}
144150

145151
func testLe() async throws {
146-
let res = try await client.from("messages")
152+
let res =
153+
try await client.from("messages")
147154
.select("id")
148155
.lt("id", value: 2)
149156
.execute()
@@ -160,7 +167,8 @@ final class PostgrestFilterTests: XCTestCase {
160167
}
161168

162169
func testLte() async throws {
163-
let res = try await client.from("messages")
170+
let res =
171+
try await client.from("messages")
164172
.select("id")
165173
.lte("id", value: 2)
166174
.execute()
@@ -180,7 +188,8 @@ final class PostgrestFilterTests: XCTestCase {
180188
}
181189

182190
func testLike() async throws {
183-
let res = try await client.from("users")
191+
let res =
192+
try await client.from("users")
184193
.select("username")
185194
.like("username", pattern: "%supa%")
186195
.execute()
@@ -197,7 +206,8 @@ final class PostgrestFilterTests: XCTestCase {
197206
}
198207

199208
func testLikeAllOf() async throws {
200-
let res = try await client.from("users")
209+
let res =
210+
try await client.from("users")
201211
.select("username")
202212
.likeAllOf("username", patterns: ["%supa%", "%bot%"])
203213
.execute()
@@ -214,7 +224,8 @@ final class PostgrestFilterTests: XCTestCase {
214224
}
215225

216226
func testLikeAnyOf() async throws {
217-
let res = try await client.from("users")
227+
let res =
228+
try await client.from("users")
218229
.select("username")
219230
.likeAnyOf("username", patterns: ["%supa%", "%kiwi%"])
220231
.execute()
@@ -234,7 +245,8 @@ final class PostgrestFilterTests: XCTestCase {
234245
}
235246

236247
func testIlike() async throws {
237-
let res = try await client.from("users")
248+
let res =
249+
try await client.from("users")
238250
.select("username")
239251
.ilike("username", pattern: "%SUPA%")
240252
.execute()
@@ -251,7 +263,8 @@ final class PostgrestFilterTests: XCTestCase {
251263
}
252264

253265
func testIlikeAllOf() async throws {
254-
let res = try await client.from("users")
266+
let res =
267+
try await client.from("users")
255268
.select("username")
256269
.iLikeAllOf("username", patterns: ["%SUPA%", "%bot%"])
257270
.execute()
@@ -268,7 +281,8 @@ final class PostgrestFilterTests: XCTestCase {
268281
}
269282

270283
func testIlikeAnyOf() async throws {
271-
let res = try await client.from("users")
284+
let res =
285+
try await client.from("users")
272286
.select("username")
273287
.iLikeAnyOf("username", patterns: ["%supa%", "%KIWI%"])
274288
.execute()
@@ -288,7 +302,8 @@ final class PostgrestFilterTests: XCTestCase {
288302
}
289303

290304
func testIs() async throws {
291-
let res = try await client.from("users").select("data").is("data", value: nil)
305+
let res =
306+
try await client.from("users").select("data").is("data", value: nil)
292307
.execute()
293308
.value as AnyJSON
294309

@@ -314,7 +329,8 @@ final class PostgrestFilterTests: XCTestCase {
314329

315330
func testIn() async throws {
316331
let statuses = ["ONLINE", "OFFLINE"]
317-
let res = try await client.from("users").select("status").in("status", values: statuses)
332+
let res =
333+
try await client.from("users").select("status").in("status", values: statuses)
318334
.execute()
319335
.value as AnyJSON
320336

@@ -339,7 +355,8 @@ final class PostgrestFilterTests: XCTestCase {
339355
}
340356

341357
func testContains() async throws {
342-
let res = try await client.from("users").select("age_range").contains("age_range", value: "[1,2)")
358+
let res =
359+
try await client.from("users").select("age_range").contains("age_range", value: "[1,2)")
343360
.execute()
344361
.value as AnyJSON
345362

@@ -355,7 +372,8 @@ final class PostgrestFilterTests: XCTestCase {
355372
}
356373

357374
func testContainedBy() async throws {
358-
let res = try await client.from("users").select("age_range").containedBy("age_range", value: "[1,2)")
375+
let res =
376+
try await client.from("users").select("age_range").containedBy("age_range", value: "[1,2)")
359377
.execute()
360378
.value as AnyJSON
361379

@@ -371,7 +389,8 @@ final class PostgrestFilterTests: XCTestCase {
371389
}
372390

373391
func testRangeLt() async throws {
374-
let res = try await client.from("users").select("age_range").rangeLt("age_range", range: "[2,25)")
392+
let res =
393+
try await client.from("users").select("age_range").rangeLt("age_range", range: "[2,25)")
375394
.execute()
376395
.value as AnyJSON
377396

@@ -387,7 +406,8 @@ final class PostgrestFilterTests: XCTestCase {
387406
}
388407

389408
func testRangeGt() async throws {
390-
let res = try await client.from("users").select("age_range").rangeGt("age_range", range: "[2,25)")
409+
let res =
410+
try await client.from("users").select("age_range").rangeGt("age_range", range: "[2,25)")
391411
.execute()
392412
.value as AnyJSON
393413

@@ -406,7 +426,8 @@ final class PostgrestFilterTests: XCTestCase {
406426
}
407427

408428
func testRangeLte() async throws {
409-
let res = try await client.from("users").select("age_range").rangeLte("age_range", range: "[2,25)")
429+
let res =
430+
try await client.from("users").select("age_range").rangeLte("age_range", range: "[2,25)")
410431
.execute()
411432
.value as AnyJSON
412433

@@ -422,7 +443,8 @@ final class PostgrestFilterTests: XCTestCase {
422443
}
423444

424445
func testRangeGte() async throws {
425-
let res = try await client.from("users").select("age_range").rangeGte("age_range", range: "[2,25)")
446+
let res =
447+
try await client.from("users").select("age_range").rangeGte("age_range", range: "[2,25)")
426448
.execute()
427449
.value as AnyJSON
428450

@@ -444,7 +466,8 @@ final class PostgrestFilterTests: XCTestCase {
444466
}
445467

446468
func testRangeAdjacent() async throws {
447-
let res = try await client.from("users").select("age_range").rangeAdjacent("age_range", range: "[2,25)")
469+
let res =
470+
try await client.from("users").select("age_range").rangeAdjacent("age_range", range: "[2,25)")
448471
.execute()
449472
.value as AnyJSON
450473

@@ -466,7 +489,8 @@ final class PostgrestFilterTests: XCTestCase {
466489
}
467490

468491
func testOverlaps() async throws {
469-
let res = try await client.from("users").select("age_range").overlaps("age_range", value: "[2,25)")
492+
let res =
493+
try await client.from("users").select("age_range").overlaps("age_range", value: "[2,25)")
470494
.execute()
471495
.value as AnyJSON
472496

@@ -482,7 +506,8 @@ final class PostgrestFilterTests: XCTestCase {
482506
}
483507

484508
func testTextSearch() async throws {
485-
let res = try await client.from("users").select("catchphrase")
509+
let res =
510+
try await client.from("users").select("catchphrase")
486511
.textSearch("catchphrase", query: "'fat' & 'cat'", config: "english")
487512
.execute()
488513
.value as AnyJSON
@@ -499,7 +524,8 @@ final class PostgrestFilterTests: XCTestCase {
499524
}
500525

501526
func testTextSearchWithPlain() async throws {
502-
let res = try await client.from("users").select("catchphrase")
527+
let res =
528+
try await client.from("users").select("catchphrase")
503529
.textSearch("catchphrase", query: "'fat' & 'cat'", config: "english", type: .plain)
504530
.execute()
505531
.value as AnyJSON
@@ -516,7 +542,8 @@ final class PostgrestFilterTests: XCTestCase {
516542
}
517543

518544
func testTextSearchWithPhrase() async throws {
519-
let res = try await client.from("users").select("catchphrase")
545+
let res =
546+
try await client.from("users").select("catchphrase")
520547
.textSearch("catchphrase", query: "cat", config: "english", type: .phrase)
521548
.execute()
522549
.value as AnyJSON
@@ -536,7 +563,8 @@ final class PostgrestFilterTests: XCTestCase {
536563
}
537564

538565
func testTextSearchWithWebsearch() async throws {
539-
let res = try await client.from("users").select("catchphrase")
566+
let res =
567+
try await client.from("users").select("catchphrase")
540568
.textSearch("catchphrase", query: "'fat' & 'cat'", config: "english", type: .websearch)
541569
.execute()
542570
.value as AnyJSON
@@ -553,7 +581,8 @@ final class PostgrestFilterTests: XCTestCase {
553581
}
554582

555583
func testMultipleFilters() async throws {
556-
let res = try await client.from("users")
584+
let res =
585+
try await client.from("users")
557586
.select()
558587
.eq("username", value: "supabot")
559588
.is("data", value: nil)
@@ -579,7 +608,8 @@ final class PostgrestFilterTests: XCTestCase {
579608
}
580609

581610
func testFilter() async throws {
582-
let res = try await client.from("users")
611+
let res =
612+
try await client.from("users")
583613
.select("username")
584614
.filter("username", operator: "eq", value: "supabot")
585615
.execute()
@@ -597,7 +627,8 @@ final class PostgrestFilterTests: XCTestCase {
597627
}
598628

599629
func testMatch() async throws {
600-
let res = try await client.from("users")
630+
let res =
631+
try await client.from("users")
601632
.select("username,status")
602633
.match(["username": "supabot", "status": "ONLINE"])
603634
.execute()
@@ -616,7 +647,8 @@ final class PostgrestFilterTests: XCTestCase {
616647
}
617648

618649
func testFilterOnRpc() async throws {
619-
let res = try await client.rpc("get_username_and_status", params: ["name_param": "supabot"])
650+
let res =
651+
try await client.rpc("get_username_and_status", params: ["name_param": "supabot"])
620652
.neq("status", value: "ONLINE")
621653
.execute()
622654
.value as AnyJSON

0 commit comments

Comments
 (0)