1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-04-06 11:00:08 +02:00

♻️ Reworked how getting a CaskFile via URL works

This commit is contained in:
2025-11-18 15:39:43 +01:00
parent ec9102618c
commit d6fa3fc364
11 changed files with 216 additions and 44 deletions

View File

@@ -27,7 +27,7 @@ struct CaskFileParserTest {
}
@Test func can_extract_fields_from_cask_file() async throws {
guard let caskFile = await CaskFile.from(container, url: CaskFileParserTest.exampleFilePath) else {
guard let caskFile = try? await CaskFile.fromUrl(container, CaskFileParserTest.exampleFilePath) else {
Issue.record("The CaskFile could not be parsed, check the log for more info")
return
}
@@ -53,7 +53,7 @@ struct CaskFileParserTest {
@Test func can_extract_fields_from_remote_cask_file() async throws {
let url = URL(string: "https://raw.githubusercontent.com/nicoverbruggen/homebrew-cask/master/Casks/phpmon.rb")!
guard let caskFile = await CaskFile.from(container, url: url) else {
guard let caskFile = try? await CaskFile.fromUrl(container, url) else {
Issue.record("The remote CaskFile could not be parsed, check the log for more info")
return
}