Skip to content

Commit 8b82336

Browse files
committed
Update to Nuke 11.0
1 parent 806b92c commit 8b82336

File tree

3 files changed

+16
-22
lines changed

3 files changed

+16
-22
lines changed

Package.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
// swift-tools-version:5.3
1+
// swift-tools-version:5.6
22
import PackageDescription
33

44
let package = Package(
55
name: "RxNuke",
66
platforms: [
7-
.macOS(.v10_13),
8-
.iOS(.v11),
9-
.tvOS(.v11),
10-
.watchOS(.v4)
7+
.macOS(.v10_15),
8+
.iOS(.v13),
9+
.tvOS(.v13),
10+
.watchOS(.v6)
1111
],
1212
products: [
1313
.library(name: "RxNuke", targets: ["RxNuke"]),
1414
],
1515
dependencies: [
1616
.package(
1717
url: "https://github.com/kean/Nuke.git",
18-
from: "10.0.0"
18+
from: "11.0.0"
1919
),
2020
.package(
2121
url: "https://github.com/ReactiveX/RxSwift.git",

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,10 @@ final class ImageCell: UICollectionViewCell {
158158
<a name="h_requirements"></a>
159159
# Requirements
160160

161-
| RxNuke | Swift | Xcode | Platforms |
162-
|------------------|-----------------------|----------------------|----------------------------------------------------|
163-
| RxNuke 3.0 | Swift 5.3 | Xcode 12.0 | iOS 11.0 / watchOS 4.0 / macOS 10.13 / tvOS 11.0 |
164-
| RxNuke 1.0 | Swift 5.1 | Xcode 11.0 | iOS 11.0 / watchOS 4.0 / macOS 10.13 / tvOS 11.0 |
165-
| RxNuke 0.8 | Swift 4.25.0 | Xcode 10.110.2 | iOS 10.0 / watchOS 3.0 / macOS 10.12 / tvOS 10.0 |
161+
| RxNuke | Swift | Xcode | Platforms |
162+
|-------------|------------------|--------------------|---------------------------------------------------|
163+
| RxNuke 4.0 | Swift 5.6 | Xcode 13.3 | iOS 13.0 / watchOS 6.0 / macOS 10.15 / tvOS 13.0 |
164+
| RxNuke 3.0 | Swift 5.3 | Xcode 12.0 | iOS 11.0 / watchOS 4.0 / macOS 10.13 / tvOS 11.0 |
166165

167166
# License
168167

Source/RxNuke.swift

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
// The MIT License (MIT)
22
//
3-
// Copyright (c) 2017-2021 Alexander Grebenyuk (github.com/kean).
3+
// Copyright (c) 2017-2022 Alexander Grebenyuk (github.com/kean).
44

55
import Nuke
66
import RxSwift
7-
8-
#if !os(macOS)
9-
import UIKit
10-
#else
11-
import AppKit
12-
#endif
7+
import Foundation
138

149
extension ImagePipeline: ReactiveCompatible {}
1510

16-
public extension Reactive where Base: ImagePipeline {
11+
extension Reactive where Base: ImagePipeline {
1712
/// Loads an image with a given url. Emits the value synchronously if the
1813
/// image was found in memory cache.
19-
func loadImage(with url: URL) -> Single<ImageResponse> {
14+
public func loadImage(with url: URL) -> Single<ImageResponse> {
2015
return self.loadImage(with: ImageRequest(url: url))
2116
}
2217

2318
/// Loads an image with a given request. Emits the value synchronously if the
2419
/// image was found in memory cache.
25-
func loadImage(with request: ImageRequest) -> Single<ImageResponse> {
20+
public func loadImage(with request: ImageRequest) -> Single<ImageResponse> {
2621
return Single<ImageResponse>.create { single in
2722
if let image = self.base.cache[request] {
28-
single(.success(ImageResponse(container: image))) // return synchronously
23+
single(.success(ImageResponse(container: image, request: request))) // return synchronously
2924
return Disposables.create() // nop
3025
} else {
3126
let task = self.base.loadImage(with: request, completion: { result in

0 commit comments

Comments
 (0)