Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ReactiveSwift and Result #91

Merged
merged 2 commits into from
Mar 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .Package.test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import PackageDescription
let package = Package(
name: "ReactiveTask",
dependencies: [
.Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", majorVersion: 1),
.Package(url: "https://github.com/antitypical/Result.git", versions: Version(3, 2, 0)..<Version(3, .max, .max)),
.Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", versions: Version(1, 1, 0)..<Version(1, .max, .max)),
.Package(url: "https://github.com/Quick/Quick.git", majorVersion: 1, minor: 1),
.Package(url: "https://github.com/Quick/Nimble.git", majorVersion: 6),
]
Expand Down
3 changes: 2 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github "ReactiveCocoa/ReactiveSwift" ~> 1.0
github "antitypical/Result" ~> 3.2
github "ReactiveCocoa/ReactiveSwift" ~> 1.1
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github "Quick/Nimble" "v6.0.1"
github "Quick/Quick" "v1.1.0"
github "antitypical/Result" "3.1.0"
github "ReactiveCocoa/ReactiveSwift" "1.1.0"
github "antitypical/Result" "3.2.0"
github "jspahrsummers/xcconfigs" "3d9d99634cae6d586e272543d527681283b33eb0"
github "ReactiveCocoa/ReactiveSwift" "1.0.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/ReactiveSwift
Submodule ReactiveSwift updated 49 files
+2 −5 .Package.test.swift
+1 −0 .gitignore
+7 −6 .travis.yml
+2 −2 Cartfile.private
+2 −2 Cartfile.resolved
+1 −1 Carthage/Checkouts/Nimble
+1 −1 Carthage/Checkouts/Quick
+36 −1 Documentation/FrameworkOverview.md
+0 −3 Package.swift
+31 −15 README.md
+147 −0 ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Contents.swift
+88 −0 ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Sources/FormView.swift
+10 −0 ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Sources/StdlibExtensions.swift
+123 −0 ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Sources/UIKitExtensions.swift
+10 −0 ReactiveSwift-UIExamples.playground/Sources/PlaygroundUtility.swift
+2 −0 ReactiveSwift-UIExamples.playground/contents.xcplayground
+2 −2 ReactiveSwift.playground/contents.xcplayground
+3 −1 ReactiveSwift.podspec
+26 −0 ReactiveSwift.xcodeproj/project.pbxproj
+3 −0 ReactiveSwift.xcworkspace/contents.xcworkspacedata
+10 −11 Sources/Action.swift
+43 −32 Sources/Atomic.swift
+118 −10 Sources/Deprecations+Removals.swift
+2 −2 Sources/Disposable.swift
+6 −0 Sources/EventLogger.swift
+8 −10 Sources/Flatten.swift
+1 −1 Sources/FoundationExtensions.swift
+1 −1 Sources/Info.plist
+27 −5 Sources/Lifetime.swift
+3 −2 Sources/Observer.swift
+71 −16 Sources/Property.swift
+70 −45 Sources/Scheduler.swift
+160 −41 Sources/Signal.swift
+153 −30 Sources/SignalProducer.swift
+30 −52 Sources/UnidirectionalBinding.swift
+327 −0 Sources/ValidatingProperty.swift
+1 −0 Tests/LinuxMain.swift
+55 −2 Tests/ReactiveSwiftTests/ActionSpec.swift
+35 −0 Tests/ReactiveSwiftTests/DeprecationSpec.swift
+14 −4 Tests/ReactiveSwiftTests/FlattenSpec.swift
+1 −1 Tests/ReactiveSwiftTests/Info.plist
+47 −0 Tests/ReactiveSwiftTests/LifetimeSpec.swift
+36 −1 Tests/ReactiveSwiftTests/PropertySpec.swift
+261 −1 Tests/ReactiveSwiftTests/SignalProducerLiftingSpec.swift
+123 −1 Tests/ReactiveSwiftTests/SignalProducerSpec.swift
+254 −2 Tests/ReactiveSwiftTests/SignalSpec.swift
+7 −35 Tests/ReactiveSwiftTests/UnidirectionalBindingSpec.swift
+304 −0 Tests/ReactiveSwiftTests/ValidatingPropertySpec.swift
+12 −2 script/gen-docs
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PackageDescription
let package = Package(
name: "ReactiveTask",
dependencies: [
.Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", majorVersion: 1),
.Package(url: "https://github.com/antitypical/Result.git", versions: Version(3, 2, 0)..<Version(3, .max, .max)),
.Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", versions: Version(1, 1, 0)..<Version(1, .max, .max)),
]
)
8 changes: 2 additions & 6 deletions Sources/Task.swift
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,7 @@ extension Signal where Value: TaskEventType {
/// Ignores incremental standard output and standard error data from the given
/// task, sending only a single value with the final, aggregated result.
public func ignoreTaskData() -> Signal<Value.T, Error> {
return self
.map { event in
return event.value
}
.skipNil()
return self.filterMap { $0.value }
}
}

Expand Down Expand Up @@ -440,7 +436,7 @@ extension Task {
}
}

SignalProducer(result: Pipe.create(queue, group) &&& Pipe.create(queue, group))
SignalProducer(result: Pipe.create(queue, group).fanout(Pipe.create(queue, group)))
.flatMap(.merge) { stdoutPipe, stderrPipe -> SignalProducer<TaskEvent<Data>, TaskError> in
let stdoutProducer = stdoutPipe.transferReadsToProducer()
let stderrProducer = stderrPipe.transferReadsToProducer()
Expand Down
3 changes: 1 addition & 2 deletions Tests/ReactiveTaskTests/TaskSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ class TaskSpec: QuickSpec {
let data = strings.map { $0.data(using: .utf8)! }

let result = Task("/usr/bin/sort").launch(standardInput: SignalProducer(data))
.map { event in event.value }
.skipNil()
.filterMap { event in event.value }
.single()

expect(result).notTo(beNil())
Expand Down