Skip to content

Commit 40169a8

Browse files
committed
Update dependencies to RAC 4 RC 2
1 parent 715c07f commit 40169a8

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-RC.1"
1+
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-RC.2"

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "antitypical/Result" "1.0.1"
2-
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-RC.1"
2+
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-RC.2"

Source/Property.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ public struct AndProperty: PropertyType {
5050
}
5151
}
5252

53+
public var signal: Signal<Bool, NoError> {
54+
let signals = terms.map { $0.signal }
55+
return combineLatest(signals).map { values in
56+
return values.reduce(true) { $0 && $1 }
57+
}
58+
}
59+
5360
/// Creates a new property with an additional conjunctive term.
5461
public func and<P : PropertyType where P.Value == Bool>(other: P) -> AndProperty {
5562
return AndProperty(terms: terms + [AnyProperty(other)])
@@ -80,6 +87,13 @@ public struct OrProperty: PropertyType {
8087
}
8188
}
8289

90+
public var signal: Signal<Bool, NoError> {
91+
let signals = terms.map { $0.signal }
92+
return combineLatest(signals).map { values in
93+
return values.reduce(false) { $0 || $1 }
94+
}
95+
}
96+
8397
/// Creates a new property with an additional disjunctive term.
8498
public func or<P : PropertyType where P.Value == Bool>(other: P) -> OrProperty {
8599
return OrProperty(terms: terms + [AnyProperty(other)])
@@ -108,6 +122,10 @@ public struct NotProperty: PropertyType {
108122
return source.producer.map { $0 != self.invert }
109123
}
110124

125+
public var signal: Signal<Bool, NoError> {
126+
return source.signal.map { $0 != self.invert }
127+
}
128+
111129
/// A negated property of `self`.
112130
public func not() -> NotProperty {
113131
return NotProperty(source: source, invert: !invert)

Source/SignalProducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension SignalProducerType {
2626
lock.lock()
2727
var group = groups[key]
2828
if group == nil {
29-
let (producer, sink) = SignalProducer<Value, Error>.buffer()
29+
let (producer, sink) = SignalProducer<Value, Error>.buffer(Int.max)
3030
observer.sendNext(key, producer)
3131

3232
groups[key] = sink

Tests/SignalProducerTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import XCTest
1313
final class SignalProducerTests: XCTestCase {
1414

1515
func testGroupBy() {
16-
let (producer, sink) = SignalProducer<Int, NoError>.buffer()
16+
let (producer, sink) = SignalProducer<Int, NoError>.buffer(Int.max)
1717
var evens: [Int] = []
1818
var odds: [Int] = []
1919
let disposable = CompositeDisposable()

0 commit comments

Comments
 (0)