Commit ac7de0ce3c
Unsigned
Layout: unified · split
Hutch.xcodeproj/project.pbxproj +8 −8
| @@ -517,7 +517,7 @@ | ||
| 517 | 517 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 518 | 518 | CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements; |
| 519 | 519 | CODE_SIGN_STYLE = Automatic; |
| 520 | CURRENT_PROJECT_VERSION = 78; | |
| 520 | CURRENT_PROJECT_VERSION = 79; | |
| 521 | 521 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 522 | 522 | ENABLE_PREVIEWS = YES; |
| 523 | 523 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -534,7 +534,7 @@ | ||
| 534 | 534 | "$(inherited)", |
| 535 | 535 | "@executable_path/Frameworks", |
| 536 | 536 | ); |
| 537 | MARKETING_VERSION = 3.1.10; | |
| 537 | MARKETING_VERSION = 3.1.11; | |
| 538 | 538 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; |
| 539 | 539 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 540 | 540 | STRING_CATALOG_GENERATE_SYMBOLS = YES; |
| @@ -554,7 +554,7 @@ | ||
| 554 | 554 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 555 | 555 | CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements; |
| 556 | 556 | CODE_SIGN_STYLE = Automatic; |
| 557 | CURRENT_PROJECT_VERSION = 78; | |
| 557 | CURRENT_PROJECT_VERSION = 79; | |
| 558 | 558 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 559 | 559 | ENABLE_PREVIEWS = YES; |
| 560 | 560 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -571,7 +571,7 @@ | ||
| 571 | 571 | "$(inherited)", |
| 572 | 572 | "@executable_path/Frameworks", |
| 573 | 573 | ); |
| 574 | MARKETING_VERSION = 3.1.10; | |
| 574 | MARKETING_VERSION = 3.1.11; | |
| 575 | 575 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; |
| 576 | 576 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 577 | 577 | STRING_CATALOG_GENERATE_SYMBOLS = YES; |
| @@ -634,7 +634,7 @@ | ||
| 634 | 634 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 635 | 635 | CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements; |
| 636 | 636 | CODE_SIGN_STYLE = Automatic; |
| 637 | CURRENT_PROJECT_VERSION = 78; | |
| 637 | CURRENT_PROJECT_VERSION = 79; | |
| 638 | 638 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 639 | 639 | GENERATE_INFOPLIST_FILE = NO; |
| 640 | 640 | INFOPLIST_FILE = HutchWidgetExtension/Info.plist; |
| @@ -644,7 +644,7 @@ | ||
| 644 | 644 | "@executable_path/Frameworks", |
| 645 | 645 | "@executable_path/../../Frameworks", |
| 646 | 646 | ); |
| 647 | MARKETING_VERSION = 3.1.10; | |
| 647 | MARKETING_VERSION = 3.1.11; | |
| 648 | 648 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension; |
| 649 | 649 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 650 | 650 | SKIP_INSTALL = YES; |
| @@ -663,7 +663,7 @@ | ||
| 663 | 663 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 664 | 664 | CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements; |
| 665 | 665 | CODE_SIGN_STYLE = Automatic; |
| 666 | CURRENT_PROJECT_VERSION = 78; | |
| 666 | CURRENT_PROJECT_VERSION = 79; | |
| 667 | 667 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 668 | 668 | GENERATE_INFOPLIST_FILE = NO; |
| 669 | 669 | INFOPLIST_FILE = HutchWidgetExtension/Info.plist; |
| @@ -673,7 +673,7 @@ | ||
| 673 | 673 | "@executable_path/Frameworks", |
| 674 | 674 | "@executable_path/../../Frameworks", |
| 675 | 675 | ); |
| 676 | MARKETING_VERSION = 3.1.10; | |
| 676 | MARKETING_VERSION = 3.1.11; | |
| 677 | 677 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension; |
| 678 | 678 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 679 | 679 | SKIP_INSTALL = YES; |
HutchTests/BundleUserAgentTests.swift +6 −4
| @@ -9,7 +9,7 @@ import Testing | ||
| 9 | 9 | private final class CapturingURLProtocol: URLProtocol, @unchecked Sendable { |
| 10 | 10 | nonisolated(unsafe) static var capturedRequests: [URLRequest] = [] |
| 11 | 11 | |
| 12 | override class func canInit(with request: URLRequest) -> Bool { true } | |
| 12 | override class func canInit(with _: URLRequest) -> Bool { true } | |
| 13 | 13 | override class func canonicalRequest(for request: URLRequest) -> URLRequest { request } |
| 14 | 14 | |
| 15 | 15 | override func startLoading() { |
| @@ -25,7 +25,9 @@ private final class CapturingURLProtocol: URLProtocol, @unchecked Sendable { | ||
| 25 | 25 | client?.urlProtocolDidFinishLoading(self) |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | override func stopLoading() {} | |
| 28 | override func stopLoading() { | |
| 29 | // No cleanup is needed because the stub responds immediately in `startLoading()`. | |
| 30 | } | |
| 29 | 31 | |
| 30 | 32 | static func makeSession() -> URLSession { |
| 31 | 33 | let config = URLSessionConfiguration.ephemeral |
| @@ -79,10 +81,10 @@ struct BundleUserAgentTests { | ||
| 79 | 81 | } |
| 80 | 82 | |
| 81 | 83 | @Test |
| 82 | func sRHTClientSetsUserAgentOnFetchText() async { | |
| 84 | func sRHTClientSetsUserAgentOnFetchText() async throws { | |
| 83 | 85 | CapturingURLProtocol.capturedRequests = [] |
| 84 | 86 | let client = SRHTClient(session: CapturingURLProtocol.makeSession(), token: "test-token") |
| 85 | let url = try! #require(URL(string: "https://builds.sr.ht/~test/job/1/log")) | |
| 87 | let url = try #require(URL(string: "https://builds.sr.ht/~test/job/1/log")) | |
| 86 | 88 | |
| 87 | 89 | _ = try? await client.fetchText(url: url) |
| 88 | 90 | |