From c4e0976561ed00b0e979adcfb5f52b2e30a9181a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mickae=CC=88l=20Menu?= Date: Wed, 23 Dec 2020 14:44:28 +0100 Subject: [PATCH] Bump version to 2.0.0-beta.1 --- CHANGELOG.md | 3 +++ Cartfile | 2 +- Cartfile.resolved | 2 +- R2Streamer.podspec | 4 ++-- r2-streamer-swift/Parser/EPUB/EPUBParser.swift | 4 ++-- r2-streamer-swift/Streamer.swift | 2 +- r2-streamer-swiftTests/Server/PublicationServerTests.swift | 6 +++--- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80f6fc25..a401e7be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [2.0.0-beta.1] + ### Changed * `Streamer` is now expecting a `PublicationAsset` instead of a `File`. You can create custom implementations of @@ -45,3 +47,4 @@ All notable changes to this project will be documented in this file. [unreleased]: https://github.com/readium/r2-streamer-swift/compare/master...HEAD [2.0.0-alpha.1]: https://github.com/readium/r2-streamer-swift/compare/1.2.5...2.0.0-alpha.1 [2.0.0-alpha.2]: https://github.com/readium/r2-streamer-swift/compare/2.0.0-alpha.1...2.0.0-alpha.2 +[2.0.0-beta.1]: https://github.com/readium/r2-streamer-swift/compare/2.0.0-alpha.2...2.0.0-beta.1 diff --git a/Cartfile b/Cartfile index be622418..3ddd5a27 100644 --- a/Cartfile +++ b/Cartfile @@ -1,4 +1,4 @@ -github "readium/r2-shared-swift" "develop" +github "readium/r2-shared-swift" == 2.0.0-beta.1 github "dexman/Minizip" == 1.4.0 github "cezheng/Fuzi" == 3.1.2 github "krzyzanowskim/CryptoSwift" == 1.3.2 diff --git a/Cartfile.resolved b/Cartfile.resolved index 1e71bc8a..372db648 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -2,4 +2,4 @@ github "cezheng/Fuzi" "3.1.2" github "dexman/Minizip" "1.4.0" github "edrlab/GCDWebServer" "3.6.3" github "krzyzanowskim/CryptoSwift" "1.3.2" -github "readium/r2-shared-swift" "4ee1ebc0ff1b17156090c22f757017150f51bfac" +github "readium/r2-shared-swift" "2.0.0-beta.1" diff --git a/R2Streamer.podspec b/R2Streamer.podspec index 2e02c5da..30f7c577 100644 --- a/R2Streamer.podspec +++ b/R2Streamer.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "R2Streamer" - s.version = "2.0.0-alpha.2" + s.version = "2.0.0-beta.1" s.license = "BSD 3-Clause License" s.summary = "R2 Streamer" s.homepage = "http://readium.github.io" s.author = { "Aferdita Muriqi" => "aferdita.muriqi@gmail.com" } - s.source = { :git => "https://github.com/readium/r2-streamer-swift.git", :tag => "2.0.0-alpha.2" } + s.source = { :git => "https://github.com/readium/r2-streamer-swift.git", :tag => "2.0.0-beta.1" } s.exclude_files = ["**/Info*.plist"] s.requires_arc = true s.resources = ['r2-streamer-swift/Resources/**'] diff --git a/r2-streamer-swift/Parser/EPUB/EPUBParser.swift b/r2-streamer-swift/Parser/EPUB/EPUBParser.swift index c11bb0eb..df46c4be 100644 --- a/r2-streamer-swift/Parser/EPUB/EPUBParser.swift +++ b/r2-streamer-swift/Parser/EPUB/EPUBParser.swift @@ -81,9 +81,9 @@ final public class EPUBParser: PublicationParser { servicesBuilder: .init( positions: EPUBPositionsService.makeFactory() ), - setupPublication: { [self] publication in + setupPublication: { publication in publication.userProperties = userProperties - publication.userSettingsUIPreset = userSettingsPreset(for: publication.metadata) + publication.userSettingsUIPreset = self.userSettingsPreset(for: publication.metadata) } ) } diff --git a/r2-streamer-swift/Streamer.swift b/r2-streamer-swift/Streamer.swift index 03cd9642..362c9401 100644 --- a/r2-streamer-swift/Streamer.swift +++ b/r2-streamer-swift/Streamer.swift @@ -114,7 +114,7 @@ public final class Streamer: Loggable { /// Creates the leaf fetcher which will be passed to the content protections and parsers. private func makeFetcher(for asset: PublicationAsset, allowUserInteraction: Bool, credentials: String?, sender: Any?) -> Deferred { - deferred { [self] completion in + deferred { completion in asset.makeFetcher(using: .init(archiveFactory: self.archiveFactory), credentials: credentials, completion: completion) } } diff --git a/r2-streamer-swiftTests/Server/PublicationServerTests.swift b/r2-streamer-swiftTests/Server/PublicationServerTests.swift index 07555248..1d19e303 100644 --- a/r2-streamer-swiftTests/Server/PublicationServerTests.swift +++ b/r2-streamer-swiftTests/Server/PublicationServerTests.swift @@ -32,7 +32,7 @@ class PublicationServerTests: XCTestCase, Loggable { private func testPublication(at url: URL) { let expect = expectation(description: "Publication tested") - streamer.open(asset: FileAsset(url: url), allowUserInteraction: false) { [self] result in + streamer.open(asset: FileAsset(url: url), allowUserInteraction: false) { result in guard case .success(let publication) = result else { XCTFail("Failed to parse \(url)") return @@ -40,8 +40,8 @@ class PublicationServerTests: XCTestCase, Loggable { do { let endpoint = UUID().uuidString - try publicationServer.add(publication, at: endpoint) - verifyManifestJson(atEndpoint: endpoint) { expect.fulfill() } + try self.publicationServer.add(publication, at: endpoint) + self.verifyManifestJson(atEndpoint: endpoint) { expect.fulfill() } } catch { XCTFail("Failed to verify \(url)") }