Skip to content

Commit

Permalink
RxCombine 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc committed Jan 1, 2021
1 parent 8e7cba7 commit 86ef794
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
20 changes: 10 additions & 10 deletions ExampleApp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PODS:
- RxCombine (1.6.0):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxRelay (5.1.0):
- RxSwift (~> 5)
- RxSwift (5.1.0)
- RxCombine (2.0.0):
- RxRelay (~> 6)
- RxSwift (~> 6)
- RxRelay (6.0.0):
- RxSwift (= 6.0.0)
- RxSwift (6.0.0)

DEPENDENCIES:
- RxCombine (from `../`)
Expand All @@ -19,10 +19,10 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
RxCombine: 81552341b3239e99d5ffea4e48bf11b3f9b638c3
RxRelay: a168bd6caf712d00c676ac344e9295afc93b418e
RxSwift: ad5874f24bb0dbffd1e9bb8443604e3578796c7a
RxCombine: 1d88b0392e4c9ccfc5187af3dbc8b10791a4b128
RxRelay: 8d593be109c06ea850df027351beba614b012ffb
RxSwift: c14e798c59b9f6e9a2df8fd235602e85cc044295

PODFILE CHECKSUM: 27ab59783b75a3dbb4fec21bad1cf7a4348abaa3

COCOAPODS: 1.9.1
COCOAPODS: 1.10.0
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import PackageDescription
let package = Package(
name: "RxCombine",
platforms: [
.macOS(.v10_10), .iOS(.v8), .tvOS(.v9), .watchOS(.v3)
.macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v3)
],
products: [
.library(
name: "RxCombine",
targets: ["RxCombine"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0")
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "6.0.0")
],
targets: [
.target(
Expand Down
8 changes: 4 additions & 4 deletions RxCombine.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxCombine"
s.version = "1.6.1"
s.version = "2.0.0"
s.summary = "RxSwift is a Swift implementation of Reactive Extensions"
s.description = <<-DESC
Bi-directional type conversions between RxSwift and Apple's Combine framework.
Expand All @@ -20,8 +20,8 @@ Pod::Spec.new do |s|

s.source_files = 'Sources/**/*.swift'
s.frameworks = ['Combine']
s.dependency 'RxSwift', '~> 5'
s.dependency 'RxRelay', '~> 5'
s.dependency 'RxSwift', '~> 6'
s.dependency 'RxRelay', '~> 6'

s.swift_version = '5.0'
s.swift_version = '5.1'
end
23 changes: 23 additions & 0 deletions Sources/Combine+Rx/Publisher+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,27 @@ public extension Publisher {
}
}
}

@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public extension Publisher where Failure == Never {
/// Returns an Observable<Output> representing the underlying
/// Publisher. Upon subscription, the Publisher's sink pushes
/// events into the Observable. Upon disposing of the subscription,
/// the sink is cancelled.
///
/// - returns: Observable<Output>
func asInfallible() -> Infallible<Output> {
Infallible<Output>.create { observer in
let cancellable = self.sink(
receiveCompletion: { completion in
observer(.completed)
},
receiveValue: { value in
observer(.next(value))
})

return Disposables.create { cancellable.cancel() }
}
}
}
#endif

0 comments on commit 86ef794

Please sign in to comment.