From 4ee1ebc0ff1b17156090c22f757017150f51bfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mickae=CC=88l=20Menu?= Date: Tue, 27 Oct 2020 09:54:23 +0100 Subject: [PATCH] Bump version to 2.0.0-alpha.2 Fix Xcode 11 build --- .travis.yml | 4 ++-- CHANGELOG.md | 3 +++ R2Shared.podspec | 4 ++-- r2-shared-swift/Publication/Publication+Deprecated.swift | 2 +- .../Publication/Services/Positions/PositionsService.swift | 2 +- r2-shared-swift/Toolkit/Deferred.swift | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10c90582..4199e4e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: swift osx_image: xcode11 xcode_project: r2-shared-swift.xcodeproj xcode_scheme: r2-shared-swift -xcode_destination: platform=iOS Simulator,OS=11.3,name=iPhone X -xcode_sdk: iphonesimulator13.0 +xcode_destination: platform=iOS Simulator,OS=13.7,name=iPhone X +xcode_sdk: iphonesimulator13.7 branches: only: diff --git a/CHANGELOG.md b/CHANGELOG.md index 374e27f8..fa199a7a 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-alpha.2] + ### Added * The [Publication Services API](https://readium.org/architecture/proposals/004-publication-helpers-services) allows to extend a `Publication` with custom implementations of known services. This version ships with a few predefined services: @@ -51,3 +53,4 @@ All notable changes to this project will be documented in this file. [unreleased]: https://github.com/readium/r2-shared-swift/compare/master...HEAD [2.0.0-alpha.1]: https://github.com/readium/r2-shared-swift/compare/1.4.3...2.0.0-alpha.1 +[2.0.0-alpha.2]: https://github.com/readium/r2-shared-swift/compare/2.0.0-alpha.1...2.0.0-alpha.2 diff --git a/R2Shared.podspec b/R2Shared.podspec index 74251afb..2a65420e 100644 --- a/R2Shared.podspec +++ b/R2Shared.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'R2Shared' - s.version = '2.0.0-alpha.1' + s.version = '2.0.0-alpha.2' s.license = 'BSD 3-Clause License' s.summary = 'R2 Shared' s.homepage = 'http://readium.github.io' s.author = { "Aferdita Muriqi" => "aferdita.muriqi@gmail.com" } - s.source = { :git => 'https://github.com/readium/r2-shared-swift.git', :tag => '2.0.0-alpha.1' } + s.source = { :git => 'https://github.com/readium/r2-shared-swift.git', :tag => '2.0.0-alpha.2' } s.exclude_files = ["**/Info*.plist", "r2-shared-swift/Toolkit/Archive/ZIPFoundation.swift"] s.requires_arc = true s.resources = ['r2-shared-swift/Resources/**'] diff --git a/r2-shared-swift/Publication/Publication+Deprecated.swift b/r2-shared-swift/Publication/Publication+Deprecated.swift index 6478ac6e..850efc71 100644 --- a/r2-shared-swift/Publication/Publication+Deprecated.swift +++ b/r2-shared-swift/Publication/Publication+Deprecated.swift @@ -263,7 +263,7 @@ extension Link { public var typeLink: String? { type } @available(*, deprecated, renamed: "rels") - public var rel: [String] { rels.map(\.string) } + public var rel: [String] { rels.map { $0.string } } @available(*, deprecated, renamed: "href") public var absoluteHref: String? { href } diff --git a/r2-shared-swift/Publication/Services/Positions/PositionsService.swift b/r2-shared-swift/Publication/Services/Positions/PositionsService.swift index 765654cb..e7f630c6 100644 --- a/r2-shared-swift/Publication/Services/Positions/PositionsService.swift +++ b/r2-shared-swift/Publication/Services/Positions/PositionsService.swift @@ -76,7 +76,7 @@ public extension Publication { return positions } - let positionsByResource = Dictionary(grouping: positionsFromManifest(), by: \.href) + let positionsByResource = Dictionary(grouping: positionsFromManifest(), by: { $0.href }) return readingOrder.map { positionsByResource[$0.href] ?? [] } } diff --git a/r2-shared-swift/Toolkit/Deferred.swift b/r2-shared-swift/Toolkit/Deferred.swift index 3b5557ef..0d8dc402 100644 --- a/r2-shared-swift/Toolkit/Deferred.swift +++ b/r2-shared-swift/Toolkit/Deferred.swift @@ -87,7 +87,7 @@ public final class Deferred { /// Shortcut to build a Deferred from a cancellation. /// /// Can be useful to return early a value in a `.flatMap` or `deferred { ... }` construct. - public class var cancelled: Self { Self { $0(.cancelled) } } + public class var cancelled: Deferred { Deferred { $0(.cancelled) } } /// Fires the deferred closure to resolve its value and forward it to the given traditional /// completion closure.