Skip to content

Commit

Permalink
Merge pull request #37 from Carthage/rac4-alpha3
Browse files Browse the repository at this point in the history
Update RAC to 4.0-alpha.3
  • Loading branch information
ikesyo committed Oct 30, 2015
2 parents 30160d1 + 9c12444 commit 801e295
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7
osx_image: xcode7.1
xcode_workspace: ReactiveTask.xcworkspace
xcode_scheme: ReactiveTask
script: script/cibuild
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.2"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.3"
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Quick" ~> 0.7
github "Quick/Nimble" ~> 2.0
github "Quick/Quick" ~> 0.8
github "Quick/Nimble" ~> 3.0
github "jspahrsummers/xcconfigs" "ec5753493605deed7358dec5f9260f503d3ed650"
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github "Quick/Nimble" "v2.0.0"
github "Quick/Quick" "v0.7.0"
github "antitypical/Result" "0.6.0-beta.3"
github "Quick/Nimble" "v3.0.0"
github "Quick/Quick" "v0.8.0"
github "antitypical/Result" "0.6.0-beta.5"
github "jspahrsummers/xcconfigs" "ec5753493605deed7358dec5f9260f503d3ed650"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.2"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.3"
48 changes: 21 additions & 27 deletions ReactiveTask/Task.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private final class Pipe {
} else if error == ECANCELED {
observer.sendInterrupted()
} else {
observer.sendError(.POSIXError(error))
observer.sendFailed(.POSIXError(error))
}

close(self.readFD)
Expand All @@ -143,7 +143,7 @@ private final class Pipe {
if error == ECANCELED {
observer.sendInterrupted()
} else if error != 0 {
observer.sendError(.POSIXError(error))
observer.sendFailed(.POSIXError(error))
}

if done {
Expand Down Expand Up @@ -174,7 +174,7 @@ private final class Pipe {
} else if error == ECANCELED {
observer.sendInterrupted()
} else {
observer.sendError(.POSIXError(error))
observer.sendFailed(.POSIXError(error))
}

close(self.writeFD)
Expand All @@ -191,7 +191,7 @@ private final class Pipe {
if error == ECANCELED {
observer.sendInterrupted()
} else if error != 0 {
observer.sendError(.POSIXError(error))
observer.sendFailed(.POSIXError(error))
}
}
}, completed: {
Expand Down Expand Up @@ -252,14 +252,12 @@ private func aggregateDataReadFromPipe(pipe: Pipe) -> SignalProducer<ReadData, R
} else {
buffer = data
}
}, error: { error in
observer.sendError(error)
}, completed: {
}, failed: observer.sendFailed
, completed: {
observer.sendNext(.aggregated(buffer))
observer.sendCompleted()
}, interrupted: {
observer.sendInterrupted()
}))
}, interrupted: observer.sendInterrupted
))
}
}
}
Expand Down Expand Up @@ -426,7 +424,7 @@ public func launchTask(taskDescription: TaskDescription) -> SignalProducer<TaskE
})

case let .Failure(error):
observer.sendError(error)
observer.sendFailed(error)
return
}
}
Expand All @@ -451,14 +449,12 @@ public func launchTask(taskDescription: TaskDescription) -> SignalProducer<TaskE
case let .Aggregated(data):
stdoutAggregatedObserver.sendNext(data)
}
}, error: { error in
observer.sendError(error)
stdoutAggregatedObserver.sendError(error)
}, completed: {
stdoutAggregatedObserver.sendCompleted()
}, interrupted: {
stdoutAggregatedObserver.sendInterrupted()
}))
}, failed: { error in
observer.sendFailed(error)
stdoutAggregatedObserver.sendFailed(error)
}, completed: stdoutAggregatedObserver.sendCompleted
, interrupted: stdoutAggregatedObserver.sendInterrupted
))
}

stderrProducer.startWithSignal { signal, signalDisposable in
Expand All @@ -472,14 +468,12 @@ public func launchTask(taskDescription: TaskDescription) -> SignalProducer<TaskE
case let .Aggregated(data):
stderrAggregatedObserver.sendNext(data)
}
}, error: { error in
observer.sendError(error)
stderrAggregatedObserver.sendError(error)
}, completed: {
stderrAggregatedObserver.sendCompleted()
}, interrupted: {
stderrAggregatedObserver.sendInterrupted()
}))
}, failed: { error in
observer.sendFailed(error)
stderrAggregatedObserver.sendFailed(error)
}, completed: stderrAggregatedObserver.sendCompleted
, interrupted: stderrAggregatedObserver.sendInterrupted
))
}

task.standardOutput = stdoutPipe.writeHandle
Expand Down

0 comments on commit 801e295

Please sign in to comment.