From c4a4223cfba67b4f26718a97f9a8c9dcc4c30dd4 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sun, 22 Oct 2017 20:43:01 +0200 Subject: [PATCH] Fixes SPM integration. --- .travis.yml | 1 + Package.pins | 12 ------------ Package.resolved | 16 ++++++++++++++++ Package.swift | 19 ++++++++++++------- .../RxFeedbackDriverTests.swift | 4 ++-- .../RxFeedbackObservableTests.swift | 8 ++++---- 6 files changed, 35 insertions(+), 25 deletions(-) delete mode 100644 Package.pins create mode 100644 Package.resolved diff --git a/.travis.yml b/.travis.yml index 2d198f7..8ade463 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ env: - BUILD="swift build" - BUILD="carthage update --platform ios && carthage build --no-skip-current --platform iOS" - BUILD="carthage update --platform tvOS && carthage build --no-skip-current --platform tvOS" + - BUILD="swift test" script: eval "${BUILD}" diff --git a/Package.pins b/Package.pins deleted file mode 100644 index 56493f7..0000000 --- a/Package.pins +++ /dev/null @@ -1,12 +0,0 @@ -{ - "autoPin": true, - "pins": [ - { - "package": "RxSwift", - "reason": null, - "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", - "version": "3.4.0" - } - ], - "version": 1 -} \ No newline at end of file diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..b77b108 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "RxSwift", + "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", + "state": { + "branch": null, + "revision": "12cccb171ad9038251af6883807f0290c1d75a5b", + "version": "4.0.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index a70cd3f..65e2dca 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,16 @@ +// swift-tools-version:4.0 import PackageDescription let package = Package( - name: "RxFeedback", - targets: [ - Target(name: "RxFeedback", dependencies: []) - ], - dependencies: [ - .Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 4) - ] + name: "RxDataSources", + products: [ + .library(name: "RxFeedback", targets: ["RxFeedback"]) + ], + dependencies: [ + .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "4.0.0")), + ], + targets: [ + .target(name: "RxFeedback", dependencies: ["RxSwift", "RxCocoa"]), + .testTarget(name: "RxFeedbackTests", dependencies: ["RxFeedback", "RxSwift", "RxCocoa", "RxBlocking"]), + ] ) diff --git a/Tests/RxFeedbackTests/RxFeedbackDriverTests.swift b/Tests/RxFeedbackTests/RxFeedbackDriverTests.swift index 7ac7c6d..8db8492 100644 --- a/Tests/RxFeedbackTests/RxFeedbackDriverTests.swift +++ b/Tests/RxFeedbackTests/RxFeedbackDriverTests.swift @@ -225,7 +225,7 @@ extension RxFeedbackDriverTests { reduce: { oldState, append in return oldState + append }, - feedback: bind { (stateAndScheduler) in + feedback: RxFeedback.bind { (stateAndScheduler) in let results = stateAndScheduler.flatMap { state -> Signal in if state == "initial" { return Signal.just("_a").delay(0.01) @@ -268,7 +268,7 @@ extension RxFeedbackDriverTests { reduce: { oldState, append in return oldState + append }, - feedback: bind(owner) { (_, stateAndScheduler) in + feedback: RxFeedback.bind(owner) { (_, stateAndScheduler) in let results = stateAndScheduler.flatMap { state -> Signal in if state == "initial" { return Signal.just("_a").delay(0.01) diff --git a/Tests/RxFeedbackTests/RxFeedbackObservableTests.swift b/Tests/RxFeedbackTests/RxFeedbackObservableTests.swift index 999d8f8..771fa6a 100644 --- a/Tests/RxFeedbackTests/RxFeedbackObservableTests.swift +++ b/Tests/RxFeedbackTests/RxFeedbackObservableTests.swift @@ -254,7 +254,7 @@ extension RxFeedbackObservableTests { return oldState + append }, scheduler: MainScheduler.instance, - scheduledFeedback: UI.bind { (stateAndScheduler) in + scheduledFeedback: RxFeedback.bind { (stateAndScheduler) in let results = stateAndScheduler.flatMap { state -> Observable in if state == "initial" { return Observable.just("_a").delay(0.01, scheduler: MainScheduler.instance) @@ -269,7 +269,7 @@ extension RxFeedbackObservableTests { return Observable.never() } } - return UI.Bindings(subscriptions: [], events: [results]) + return Bindings(subscriptions: [], events: [results]) }) let result = (try? @@ -297,7 +297,7 @@ extension RxFeedbackObservableTests { return oldState + append }, scheduler: MainScheduler.instance, - scheduledFeedback: UI.bind(owner) { (_, stateAndScheduler) in + scheduledFeedback: RxFeedback.bind(owner) { (_, stateAndScheduler) in let results = stateAndScheduler.flatMap { state -> Observable in if state == "initial" { return Observable.just("_a").delay(0.01, scheduler: MainScheduler.instance) @@ -312,7 +312,7 @@ extension RxFeedbackObservableTests { return Observable.never() } } - return UI.Bindings(subscriptions: [], events: [results]) + return Bindings(subscriptions: [], events: [results]) }) let result = (try?