mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Add support for relative urls for delta updates (#2741)
This commit is contained in:
3 files changed
+10
-1
No files matched your search
Vendored
+1
-1
@@ -335,7 +335,7 @@ static NSString *SUAppcastItemDeltaFromSparkleLocalesKey = @"SUAppcastItemDeltaF
|
||||
// Initializer used for making delta items
|
||||
- (nullable instancetype)initWithDictionary:(NSDictionary *)dict relativeToURL:(NSURL * _Nullable)appcastURL state:(SPUAppcastItemState * _Nullable)state SPU_OBJC_DIRECT
|
||||
{
|
||||
return [self initWithDictionary:dict relativeToURL:nil stateResolver:nil resolvedState:state failureReason:nil];
|
||||
return [self initWithDictionary:dict relativeToURL:appcastURL stateResolver:nil resolvedState:state failureReason:nil];
|
||||
}
|
||||
|
||||
// Exported public initializer
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
<pubDate>Sat, 26 Jul 2014 15:20:12 +0000</pubDate>
|
||||
<sparkle:releaseNotesLink>notes/relnote-3.0.txt</sparkle:releaseNotesLink>
|
||||
<enclosure url="release-3.0.zip" sparkle:version="3.0" length="1346234" />
|
||||
<sparkle:deltas>
|
||||
<enclosure url="3.0_from_2.0.delta" sparkle:deltaFrom="2.0" length="1235" type="application/octet-stream" />
|
||||
<enclosure url="3.0_from_1.0.delta" sparkle:deltaFrom="1.0" length="5222" type="application/octet-stream" />
|
||||
</sparkle:deltas>
|
||||
</item>
|
||||
<item>
|
||||
<title>Version 2.0</title>
|
||||
|
||||
@@ -998,6 +998,11 @@ class SUAppcastTest: XCTestCase {
|
||||
XCTAssertEqual("https://fake.sparkle-project.org/updates/release-3.0.zip", items[0].fileURL?.absoluteString)
|
||||
XCTAssertEqual("https://fake.sparkle-project.org/updates/notes/relnote-3.0.txt", items[0].releaseNotesURL?.absoluteString)
|
||||
|
||||
XCTAssertEqual(2, items[0].deltaUpdates!.count)
|
||||
|
||||
XCTAssertEqual("https://fake.sparkle-project.org/updates/3.0_from_2.0.delta", items[0].deltaUpdates!["2.0"]!.fileURL?.absoluteString)
|
||||
XCTAssertEqual("https://fake.sparkle-project.org/updates/3.0_from_1.0.delta", items[0].deltaUpdates!["1.0"]!.fileURL?.absoluteString)
|
||||
|
||||
XCTAssertEqual("https://fake.sparkle-project.org/info/info-2.0.txt", items[1].infoURL?.absoluteString)
|
||||
|
||||
XCTAssertEqual("https://fake.sparkle-project.org/updates/notes/fullnotes.txt", items[2].fullReleaseNotesURL?.absoluteString)
|
||||
|
||||
Reference in new issue
Block a user