Merge branch 'develop' into master

This commit is contained in:
Luciano Almeida 2018-09-30 16:16:11 -03:00 committed by GitHub
commit f155a8b766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 233 additions and 167 deletions

View File

@ -32,6 +32,39 @@ matrix:
- os: linux
env: TEST=iOS-Example
include:
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4 RxSwift.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4 RxCocoa.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4 RxBlocking.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4 RxTest.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4.2 RxSwift.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4.2 RxCocoa.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4.2 RxBlocking.podspec"
- osx_image: xcode10
os: osx
env: BUILD="pod lib lint --swift-version=4.2 RxTest.podspec"
notifications:
slack: rxswift:3ykt2Z61f8GkdvhCZTYPduOL
email: false
@ -43,19 +76,27 @@ install:
script:
- if [[ `uname` == "Linux" ]] ; then
swiftenv install swift-4.0 || true;
swiftenv install swift-4.2 || true;
fi
- if [[ "${DANGER}" -eq 1 ]] ; then
bundle install --path vendor/bundle;
bundle exec danger --verbose;
-
if [[ ! -z "${BUILD}" ]] ; then
if [[ "${BUILD}" =~ ^pod[[:space:]].* ]]; then
gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet;
fi;
eval "${BUILD}";
else
if [[ `uname` == "Darwin" ]] ; then
if [[ "${DANGER}" -eq 1 ]] ; then
bundle install --path vendor/bundle;
bundle exec danger --verbose;
else
if [[ `uname` == "Darwin" ]] ; then
xcodebuild -version;
xcodebuild -showsdks;
fi;
swift --version;
TRAVIS=1 ./scripts/all-tests.sh "${TEST}";
fi;
swift --version;
TRAVIS=1 ./scripts/all-tests.sh "${TEST}";
fi
fi;
after_success:
- sleep 5 # workaround https://github.com/travis-ci/travis-ci/issues/4725

View File

@ -9,6 +9,12 @@ All notable changes to this project will be documented in this file.
* Increase minimum requirement to Swift 4.1
* Adds `Event`, `SingleEvent`, `MaybeEvent` and `Recorded` conditional conformance to `Equatable` where their `Element` is equatable on `RXTest`.
## [4.3.1](https://github.com/ReactiveX/RxSwift/releases/tag/4.3.1)
#### Anomalies
* Fixes issues with CocoaPods and Swift 4.2 version.
## [4.3.0](https://github.com/ReactiveX/RxSwift/releases/tag/4.3.0)
* Compatibility with Xcode 10.0

View File

@ -1554,13 +1554,6 @@
remoteGlobalIDString = C8A56AD61AD7424700B4673B;
remoteInfo = "RxSwift-iOS";
};
C83509781C38712F0027C24C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C8A56ACE1AD7424700B4673B /* Project object */;
proxyType = 1;
remoteGlobalIDString = C80938F51B8A71760088E94D;
remoteInfo = "RxCocoa-iOS";
};
C835097A1C3871340027C24C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C8A56ACE1AD7424700B4673B /* Project object */;
@ -1743,6 +1736,13 @@
remoteGlobalIDString = C8F0BF901BBBFB8B001B112F;
remoteInfo = "RxSwift-watchOS";
};
C8B52BC5215434D600EAA87C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C8A56ACE1AD7424700B4673B /* Project object */;
proxyType = 1;
remoteGlobalIDString = C80938F51B8A71760088E94D;
remoteInfo = "RxCocoa-iOS";
};
C8E8BA5B1E2C181A00A4AC2C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C8A56ACE1AD7424700B4673B /* Project object */;
@ -3475,10 +3475,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C80939691B8A71760088E94D /* Build configuration list for PBXNativeTarget "RxCocoa-iOS" */;
buildPhases = (
C80938F61B8A71760088E94D /* Sources */,
C80939631B8A71760088E94D /* Frameworks */,
C80939641B8A71760088E94D /* Headers */,
C80938F61B8A71760088E94D /* Sources */,
C80939681B8A71760088E94D /* Resources */,
C80939631B8A71760088E94D /* Frameworks */,
);
buildRules = (
);
@ -3494,10 +3494,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C80939E31B8A71840088E94D /* Build configuration list for PBXNativeTarget "RxCocoa-macOS" */;
buildPhases = (
C80939701B8A71840088E94D /* Sources */,
C80939DD1B8A71840088E94D /* Frameworks */,
C80939DE1B8A71840088E94D /* Headers */,
C80939701B8A71840088E94D /* Sources */,
C80939E21B8A71840088E94D /* Resources */,
C80939DD1B8A71840088E94D /* Frameworks */,
);
buildRules = (
);
@ -3513,10 +3513,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C8093BC31B8A71F00088E94D /* Build configuration list for PBXNativeTarget "RxBlocking-iOS" */;
buildPhases = (
C8093B4C1B8A71F00088E94D /* Sources */,
C8093BB91B8A71F00088E94D /* Frameworks */,
C8093BBA1B8A71F00088E94D /* Headers */,
C8093B4C1B8A71F00088E94D /* Sources */,
C8093BBE1B8A71F00088E94D /* Resources */,
C8093BB91B8A71F00088E94D /* Frameworks */,
);
buildRules = (
);
@ -3532,10 +3532,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C8093C411B8A71FC0088E94D /* Build configuration list for PBXNativeTarget "RxBlocking-macOS" */;
buildPhases = (
C8093BCA1B8A71FC0088E94D /* Sources */,
C8093C371B8A71FC0088E94D /* Frameworks */,
C8093C381B8A71FC0088E94D /* Headers */,
C8093BCA1B8A71FC0088E94D /* Sources */,
C8093C3C1B8A71FC0088E94D /* Resources */,
C8093C371B8A71FC0088E94D /* Frameworks */,
);
buildRules = (
);
@ -3552,15 +3552,15 @@
buildConfigurationList = C83508CE1C386F6F0027C24C /* Build configuration list for PBXNativeTarget "AllTests-iOS" */;
buildPhases = (
C83508BF1C386F6F0027C24C /* Sources */,
C83508C01C386F6F0027C24C /* Frameworks */,
C83508C11C386F6F0027C24C /* Resources */,
C83508C01C386F6F0027C24C /* Frameworks */,
);
buildRules = (
);
dependencies = (
C8B52BC6215434D600EAA87C /* PBXTargetDependency */,
C835097D1C3871380027C24C /* PBXTargetDependency */,
C835097B1C3871340027C24C /* PBXTargetDependency */,
C83509791C38712F0027C24C /* PBXTargetDependency */,
C83508CA1C386F6F0027C24C /* PBXTargetDependency */,
);
name = "AllTests-iOS";
@ -3573,8 +3573,8 @@
buildConfigurationList = C835098C1C38740E0027C24C /* Build configuration list for PBXNativeTarget "AllTests-tvOS" */;
buildPhases = (
C83509801C38740E0027C24C /* Sources */,
C83509811C38740E0027C24C /* Frameworks */,
C83509821C38740E0027C24C /* Resources */,
C83509811C38740E0027C24C /* Frameworks */,
);
buildRules = (
);
@ -3594,8 +3594,8 @@
buildConfigurationList = C835099C1C38742C0027C24C /* Build configuration list for PBXNativeTarget "AllTests-macOS" */;
buildPhases = (
C83509901C38742C0027C24C /* Sources */,
C83509911C38742C0027C24C /* Frameworks */,
C83509921C38742C0027C24C /* Resources */,
C83509911C38742C0027C24C /* Frameworks */,
);
buildRules = (
);
@ -3635,10 +3635,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C88BB86E1B07E5ED0064D411 /* Build configuration list for PBXNativeTarget "RxSwift-macOS" */;
buildPhases = (
C88BB81B1B07E5ED0064D411 /* Sources */,
C88BB8681B07E5ED0064D411 /* Frameworks */,
C88BB8691B07E5ED0064D411 /* Headers */,
C88BB81B1B07E5ED0064D411 /* Sources */,
C88BB86D1B07E5ED0064D411 /* Resources */,
C88BB8681B07E5ED0064D411 /* Frameworks */,
);
buildRules = (
);
@ -3653,10 +3653,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C88FA5081C25C44800CCFEA4 /* Build configuration list for PBXNativeTarget "RxTest-iOS" */;
buildPhases = (
C88FA5001C25C44800CCFEA4 /* Sources */,
C88FA5051C25C44800CCFEA4 /* Frameworks */,
C88FA5061C25C44800CCFEA4 /* Headers */,
C88FA5001C25C44800CCFEA4 /* Sources */,
C88FA5071C25C44800CCFEA4 /* Resources */,
C88FA5051C25C44800CCFEA4 /* Frameworks */,
);
buildRules = (
);
@ -3672,10 +3672,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C88FA5191C25C4B500CCFEA4 /* Build configuration list for PBXNativeTarget "RxTest-macOS" */;
buildPhases = (
C88FA5111C25C4B500CCFEA4 /* Sources */,
C88FA5161C25C4B500CCFEA4 /* Frameworks */,
C88FA5171C25C4B500CCFEA4 /* Headers */,
C88FA5111C25C4B500CCFEA4 /* Sources */,
C88FA5181C25C4B500CCFEA4 /* Resources */,
C88FA5161C25C4B500CCFEA4 /* Frameworks */,
);
buildRules = (
);
@ -3691,10 +3691,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C88FA52A1C25C4C000CCFEA4 /* Build configuration list for PBXNativeTarget "RxTest-tvOS" */;
buildPhases = (
C88FA5221C25C4C000CCFEA4 /* Sources */,
C88FA5271C25C4C000CCFEA4 /* Frameworks */,
C88FA5281C25C4C000CCFEA4 /* Headers */,
C88FA5221C25C4C000CCFEA4 /* Sources */,
C88FA5291C25C4C000CCFEA4 /* Resources */,
C88FA5271C25C4C000CCFEA4 /* Frameworks */,
);
buildRules = (
);
@ -3710,10 +3710,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C88FA53B1C25C4CC00CCFEA4 /* Build configuration list for PBXNativeTarget "RxTest-watchOS" */;
buildPhases = (
C88FA5331C25C4CC00CCFEA4 /* Sources */,
C88FA5381C25C4CC00CCFEA4 /* Frameworks */,
C88FA5391C25C4CC00CCFEA4 /* Headers */,
C88FA5331C25C4CC00CCFEA4 /* Sources */,
C88FA53A1C25C4CC00CCFEA4 /* Resources */,
C88FA5381C25C4CC00CCFEA4 /* Frameworks */,
);
buildRules = (
);
@ -3729,10 +3729,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C8A56AED1AD7424700B4673B /* Build configuration list for PBXNativeTarget "RxSwift-iOS" */;
buildPhases = (
C8A56AD21AD7424700B4673B /* Sources */,
C8A56AD31AD7424700B4673B /* Frameworks */,
C8A56AD41AD7424700B4673B /* Headers */,
C8A56AD21AD7424700B4673B /* Sources */,
C8A56AD51AD7424700B4673B /* Resources */,
C8A56AD31AD7424700B4673B /* Frameworks */,
);
buildRules = (
);
@ -3766,10 +3766,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C8F0BFFE1BBBFB8B001B112F /* Build configuration list for PBXNativeTarget "RxSwift-watchOS" */;
buildPhases = (
C8F0BF911BBBFB8B001B112F /* Sources */,
C8F0BFFB1BBBFB8B001B112F /* Frameworks */,
C8F0BFFC1BBBFB8B001B112F /* Headers */,
C8F0BF911BBBFB8B001B112F /* Sources */,
C8F0BFFD1BBBFB8B001B112F /* Resources */,
C8F0BFFB1BBBFB8B001B112F /* Frameworks */,
);
buildRules = (
);
@ -3784,10 +3784,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C8F0C0471BBBFBB9001B112F /* Build configuration list for PBXNativeTarget "RxCocoa-watchOS" */;
buildPhases = (
C8F0C0051BBBFBB9001B112F /* Sources */,
C8F0C03E1BBBFBB9001B112F /* Frameworks */,
C8F0C0401BBBFBB9001B112F /* Headers */,
C8F0C0051BBBFBB9001B112F /* Sources */,
C8F0C0461BBBFBB9001B112F /* Resources */,
C8F0C03E1BBBFBB9001B112F /* Frameworks */,
);
buildRules = (
);
@ -3803,10 +3803,10 @@
isa = PBXNativeTarget;
buildConfigurationList = C8F0C0541BBBFBCE001B112F /* Build configuration list for PBXNativeTarget "RxBlocking-watchOS" */;
buildPhases = (
C8F0C04E1BBBFBCE001B112F /* Sources */,
C8F0C0501BBBFBCE001B112F /* Frameworks */,
C8F0C0521BBBFBCE001B112F /* Headers */,
C8F0C04E1BBBFBCE001B112F /* Sources */,
C8F0C0531BBBFBCE001B112F /* Resources */,
C8F0C0501BBBFBCE001B112F /* Frameworks */,
);
buildRules = (
);
@ -3822,10 +3822,10 @@
isa = PBXNativeTarget;
buildConfigurationList = D2138C7A1BB9BE9800339B5C /* Build configuration list for PBXNativeTarget "RxCocoa-tvOS" */;
buildPhases = (
D2138C701BB9BE9800339B5C /* Sources */,
D2138C711BB9BE9800339B5C /* Frameworks */,
D2138C721BB9BE9800339B5C /* Headers */,
D2138C701BB9BE9800339B5C /* Sources */,
D2138C731BB9BE9800339B5C /* Resources */,
D2138C711BB9BE9800339B5C /* Frameworks */,
);
buildRules = (
);
@ -3841,10 +3841,10 @@
isa = PBXNativeTarget;
buildConfigurationList = D2EA28141BB9B5A200880ED3 /* Build configuration list for PBXNativeTarget "RxSwift-tvOS" */;
buildPhases = (
D2EA28071BB9B5A200880ED3 /* Sources */,
D2EA28081BB9B5A200880ED3 /* Frameworks */,
D2EA28091BB9B5A200880ED3 /* Headers */,
D2EA28071BB9B5A200880ED3 /* Sources */,
D2EA280A1BB9B5A200880ED3 /* Resources */,
D2EA28081BB9B5A200880ED3 /* Frameworks */,
);
buildRules = (
);
@ -3859,10 +3859,10 @@
isa = PBXNativeTarget;
buildConfigurationList = D2EBEB861BB9B99E003A27DC /* Build configuration list for PBXNativeTarget "RxBlocking-tvOS" */;
buildPhases = (
D2EBEB7C1BB9B99D003A27DC /* Sources */,
D2EBEB7D1BB9B99D003A27DC /* Frameworks */,
D2EBEB7E1BB9B99D003A27DC /* Headers */,
D2EBEB7C1BB9B99D003A27DC /* Sources */,
D2EBEB7F1BB9B99D003A27DC /* Resources */,
D2EBEB7D1BB9B99D003A27DC /* Frameworks */,
);
buildRules = (
);
@ -5797,11 +5797,6 @@
target = C8A56AD61AD7424700B4673B /* RxSwift-iOS */;
targetProxy = C83508C91C386F6F0027C24C /* PBXContainerItemProxy */;
};
C83509791C38712F0027C24C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C80938F51B8A71760088E94D /* RxCocoa-iOS */;
targetProxy = C83509781C38712F0027C24C /* PBXContainerItemProxy */;
};
C835097B1C3871340027C24C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C88FA4FD1C25C44800CCFEA4 /* RxTest-iOS */;
@ -5932,6 +5927,11 @@
target = C8F0BF901BBBFB8B001B112F /* RxSwift-watchOS */;
targetProxy = C88FA5321C25C4CC00CCFEA4 /* PBXContainerItemProxy */;
};
C8B52BC6215434D600EAA87C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C80938F51B8A71760088E94D /* RxCocoa-iOS */;
targetProxy = C8B52BC5215434D600EAA87C /* PBXContainerItemProxy */;
};
C8E8BA5C1E2C181A00A4AC2C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C8A56AD61AD7424700B4673B /* RxSwift-iOS */;

View File

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Rx.playground">
</FileRef>
<FileRef
location = "group:Package.swift">
</FileRef>
@ -63,9 +60,15 @@
<Group
location = "group:Documentation"
name = "Documentation">
<FileRef
location = "group:ComparisonWithOtherLibraries.md">
</FileRef>
<FileRef
location = "group:DesignRationale.md">
</FileRef>
<FileRef
location = "group:ExampleApp.md">
</FileRef>
<FileRef
location = "group:Examples.md">
</FileRef>
@ -79,7 +82,10 @@
location = "group:MathBehindRx.md">
</FileRef>
<FileRef
location = "group:Migration.md">
location = "group:NewFeatureRequestTemplate.md">
</FileRef>
<FileRef
location = "group:Playgrounds.md">
</FileRef>
<FileRef
location = "group:Schedulers.md">
@ -87,12 +93,21 @@
<FileRef
location = "group:Subjects.md">
</FileRef>
<FileRef
location = "group:Tips.md">
</FileRef>
<FileRef
location = "group:Traits.md">
</FileRef>
<FileRef
location = "group:UnitTests.md">
</FileRef>
<FileRef
location = "group:Warnings.md">
</FileRef>
<FileRef
location = "group:Why.md">
</FileRef>
</Group>
<FileRef
location = "group:Rx.xcodeproj">

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxBlocking"
s.version = "4.3.0"
s.version = "4.3.1"
s.summary = "RxSwift Blocking operatos"
s.description = <<-DESC
Set of blocking operators for RxSwift. These operators are mostly intended for unit/integration tests

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<string>4.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxCocoa"
s.version = "4.3.0"
s.version = "4.3.1"
s.summary = "RxSwift Cocoa extensions"
s.description = <<-DESC
* UI extensions

View File

@ -395,8 +395,13 @@ extension Reactive where Base: UISegmentedControl {
if value != nil {
let transition = CATransition()
transition.duration = 0.25
#if swift(>=4.2)
transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
transition.type = CATransitionType(rawValue: transitionType)
#else
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
transition.type = transitionType
#endif
control.layer?.add(transition, forKey: kCATransition)
}
}

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<string>4.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

View File

@ -17,30 +17,17 @@ extension Reactive where Base: NSButton {
public var tap: ControlEvent<Void> {
return controlEvent
}
#if swift(>=4.0)
/// Reactive wrapper for `state` property`.
public var state: ControlProperty<NSControl.StateValue> {
return base.rx.controlProperty(
getter: { control in
return control.state
}, setter: { (control: NSButton, state: NSControl.StateValue) in
control.state = state
}
)
}
#else
/// Reactive wrapper for `state` property`.
public var state: ControlProperty<Int> {
return base.rx.controlProperty(
getter: { control in
return control.state
}, setter: { (control: NSButton, state: Int) in
control.state = state
}
)
}
#endif
/// Reactive wrapper for `state` property`.
public var state: ControlProperty<NSControl.StateValue> {
return base.rx.controlProperty(
getter: { control in
return control.state
}, setter: { (control: NSButton, state: NSControl.StateValue) in
control.state = state
}
)
}
}
#endif

View File

@ -37,13 +37,21 @@ open class RxTextFieldDelegateProxy
fileprivate let textSubject = PublishSubject<String?>()
// MARK: Delegate methods
#if swift(>=4.2)
open func controlTextDidChange(_ notification: Notification) {
let textField: NSTextField = castOrFatalError(notification.object)
let nextValue = textField.stringValue
self.textSubject.on(.next(nextValue))
_forwardToDelegate?.controlTextDidChange?(notification)
}
#else
open override func controlTextDidChange(_ notification: Notification) {
let textField: NSTextField = castOrFatalError(notification.object)
let nextValue = textField.stringValue
self.textSubject.on(.next(nextValue))
_forwardToDelegate?.controlTextDidChange?(notification)
}
#endif
// MARK: Delegate proxy methods

View File

@ -1200,8 +1200,9 @@
};
C83366DC1AD0293800C668A7 = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = 783T66X79Y;
DevelopmentTeam = 2V65Z4JB29;
LastSwiftMigration = 0800;
ProvisioningStyle = Automatic;
};
C849EF601C3190360048AC4A = {
CreatedOnToolsVersion = 7.2;
@ -1871,13 +1872,15 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = 783T66X79Y;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2V65Z4JB29;
INFOPLIST_FILE = "RxExample/Info-iOS.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-objc_loadall";
PRODUCT_BUNDLE_IDENTIFIER = io.rx.example.4.3.0;
PRODUCT_NAME = "RxExample-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
};
name = Debug;
@ -1886,13 +1889,15 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = 783T66X79Y;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2V65Z4JB29;
INFOPLIST_FILE = "RxExample/Info-iOS.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-objc_loadall";
PRODUCT_BUNDLE_IDENTIFIER = io.rx.example.4.3.0;
PRODUCT_NAME = "RxExample-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
};
@ -2095,13 +2100,15 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = 783T66X79Y;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 2V65Z4JB29;
INFOPLIST_FILE = "RxExample/Info-iOS.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-objc_loadall";
PRODUCT_BUNDLE_IDENTIFIER = io.rx.example.4.3.0;
PRODUCT_NAME = "RxExample-iOS";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
};

View File

@ -32,11 +32,7 @@ class DefaultWireframe: Wireframe {
#if os(iOS)
UIApplication.shared.openURL(url)
#elseif os(macOS)
#if swift(>=4.0)
NSWorkspace.shared.open(url)
#else
NSWorkspace.shared.open(url)
#endif
NSWorkspace.shared.open(url)
#endif
}

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxSwift"
s.version = "4.3.0"
s.version = "4.3.1"
s.summary = "RxSwift is a Swift implementation of Reactive Extensions"
s.description = <<-DESC
This is a Swift port of [ReactiveX.io](https://github.com/ReactiveX)

View File

@ -22,7 +22,7 @@ public enum Event<Element> {
}
extension Event : CustomDebugStringConvertible {
/// - returns: Description of event.
/// Description of event.
public var debugDescription: String {
switch self {
case .next(let value):
@ -60,7 +60,7 @@ extension Event {
return nil
}
/// If `completed` event, returns true.
/// If `completed` event, returns `true`.
public var isCompleted: Bool {
if case .completed = self {
return true
@ -70,8 +70,8 @@ extension Event {
}
extension Event {
/// Maps sequence elements using transform. If error happens during the transform .error
/// will be returned as value
/// Maps sequence elements using transform. If error happens during the transform, `.error`
/// will be returned as value.
public func map<Result>(_ transform: (Element) throws -> Result) -> Event<Result> {
do {
switch self {

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<string>4.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

View File

@ -43,11 +43,7 @@ extension DispatchQueueConfiguration {
let compositeDisposable = CompositeDisposable()
let timer = DispatchSource.makeTimerSource(queue: queue)
#if swift(>=4.0)
timer.schedule(deadline: deadline, leeway: leeway)
#else
timer.scheduleOneshot(deadline: deadline, leeway: leeway)
#endif
timer.schedule(deadline: deadline, leeway: leeway)
// TODO:
// This looks horrible, and yes, it is.
@ -81,11 +77,7 @@ extension DispatchQueueConfiguration {
var timerState = state
let timer = DispatchSource.makeTimerSource(queue: queue)
#if swift(>=4.0)
timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: leeway)
#else
timer.scheduleRepeating(deadline: initial, interval: dispatchInterval(period), leeway: leeway)
#endif
timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: leeway)
// TODO:
// This looks horrible, and yes, it is.

View File

@ -8,22 +8,11 @@
import Foundation
#if swift(>=4.0)
typealias IntMax = Int64
public typealias RxAbstractInteger = FixedWidthInteger
extension SignedInteger {
func toIntMax() -> IntMax {
return IntMax(self)
}
typealias IntMax = Int64
public typealias RxAbstractInteger = FixedWidthInteger
extension SignedInteger {
func toIntMax() -> IntMax {
return IntMax(self)
}
#else
public typealias RxAbstractInteger = SignedInteger
extension Array {
public mutating func swapAt(_ i: Int, _ j: Int) {
swap(&self[i], &self[j])
}
}
#endif
}

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxTest"
s.version = "4.3.0"
s.version = "4.3.1"
s.summary = "RxSwift Testing extensions"
s.description = <<-DESC
Unit testing extensions for RxSwift. This library contains mock schedulers, observables, and observers

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<string>4.3.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

View File

@ -10,15 +10,20 @@ import RxSwift
import RxCocoa
import XCTest
#if os(macOS)
import AppKit
typealias View = NSView
let topLayoutAttribute = NSLayoutConstraint.Attribute.top
let equalLayoutRelation = NSLayoutConstraint.Relation.equal
import AppKit
typealias View = NSView
let topLayoutAttribute = NSLayoutConstraint.Attribute.top
let equalLayoutRelation = NSLayoutConstraint.Relation.equal
#else
import UIKit
typealias View = UIView
let topLayoutAttribute = NSLayoutAttribute.top
let equalLayoutRelation = NSLayoutRelation.equal
import UIKit
typealias View = UIView
#if swift(>=4.2)
let topLayoutAttribute = NSLayoutConstraint.Attribute.top
let equalLayoutRelation = NSLayoutConstraint.Relation.equal
#else
let topLayoutAttribute = NSLayoutAttribute.top
let equalLayoutRelation = NSLayoutRelation.equal
#endif
#endif
final class NSLayoutConstraintTest : RxTest {

View File

@ -46,7 +46,11 @@ extension NSTextFieldTests {
name: NSControl.textDidChangeNotification,
object: textField,
userInfo: ["NSFieldEditor" : NSText()])
(textField.delegate as! NSObject).controlTextDidChange(notification)
#if swift(>=4.2)
textField.delegate?.controlTextDidChange?(notification)
#else
(textField.delegate as! NSObject).controlTextDidChange(notification)
#endif
XCTAssertTrue(rxDidChange)
XCTAssertTrue(delegate.didChange)
@ -60,7 +64,13 @@ extension NSTextFieldTests {
fileprivate final class TextFieldDelegate: NSObject, NSTextFieldDelegate {
var didChange = false
#if swift(>=4.2)
func controlTextDidChange(_ notification: Notification) {
didChange = true
}
#else
override func controlTextDidChange(_ notification: Notification) {
didChange = true
}
#endif
}

View File

@ -22,7 +22,7 @@ extension RxTest {
var completed = false
var deallocated = false
var lastReturnedPropertyValue: T!
var lastReturnedPropertyValue: T?
autoreleasepool {
var control: C! = createControl()
@ -59,7 +59,12 @@ extension RxTest {
XCTAssertTrue(deallocated, "property not deallocated", file: file, line: line)
XCTAssertTrue(completed, "property not completed", file: file, line: line)
XCTAssertTrue(comparer(initialValue, lastReturnedPropertyValue), "last property value (\(lastReturnedPropertyValue)) does not match initial value (\(initialValue))", file: file, line: line)
XCTAssertTrue(
lastReturnedPropertyValue.map { comparer(initialValue, $0) } ?? false,
"last property value (\(lastReturnedPropertyValue.map { "\($0)" } ?? "nil"))) does not match initial value (\(initialValue))",
file: file,
line: line
)
}
func ensureEventDeallocated<C, T>(_ createControl: @escaping () -> C, file: StaticString = #file, line: UInt = #line, _ eventSelector: (C) -> ControlEvent<T>) where C: NSObject {

View File

@ -139,7 +139,11 @@ final class UICollectionViewTests : RxTest {
})
let testSupplementaryView = UICollectionReusableView(frame: CGRect(x: 0, y: 0, width: 1, height: 1))
let testElementKind = UICollectionElementKindSectionHeader
#if swift(>=4.2)
let testElementKind = UICollectionView.elementKindSectionHeader
#else
let testElementKind = UICollectionElementKindSectionHeader
#endif
let testIndexPath = IndexPath(row: 1, section: 0)
collectionView.delegate!.collectionView!(collectionView, willDisplaySupplementaryView: testSupplementaryView, forElementKind: testElementKind, at: testIndexPath)
@ -189,7 +193,11 @@ final class UICollectionViewTests : RxTest {
})
let testSupplementaryView = UICollectionReusableView(frame: CGRect(x: 0, y: 0, width: 1, height: 1))
let testElementKind = UICollectionElementKindSectionHeader
#if swift(>=4.2)
let testElementKind = UICollectionView.elementKindSectionHeader
#else
let testElementKind = UICollectionElementKindSectionHeader
#endif
let testIndexPath = IndexPath(row: 1, section: 0)
collectionView.delegate!.collectionView!(collectionView, didEndDisplayingSupplementaryView: testSupplementaryView, forElementOfKind: testElementKind, at: testIndexPath)

View File

@ -269,7 +269,7 @@ extension ObservableDelayTest {
let res = s.delay(0.01, scheduler: scheduler)
var array = [Int]()
var err: TestError!
var err: TestError?
let subscription = res.subscribe(
onNext: { i in
@ -277,7 +277,7 @@ extension ObservableDelayTest {
elementProcessed.onCompleted()
},
onError: { ex in
err = ex as! TestError
err = ex as? TestError
errorReceived.onCompleted()
})
@ -307,7 +307,7 @@ extension ObservableDelayTest {
let res = s.delay(0.01, scheduler: scheduler)
var array = [Int]()
var err: TestError!
var err: TestError?
let subscription = res.subscribe(
onNext: { i in
@ -316,7 +316,7 @@ extension ObservableDelayTest {
try! _ = acknowledged.toBlocking(timeout: 5.0).first()
},
onError: { ex in
err = ex as! TestError
err = ex as? TestError
errorReceived.onCompleted()
})

View File

@ -103,7 +103,12 @@ extension RxTest {
if self.startResourceCount < Resources.total {
// main schedulers need to finish work
print("Waiting for resource cleanup ...")
RunLoop.current.run(mode: RunLoopMode.defaultRunLoopMode, before: Date(timeIntervalSinceNow: 0.05) )
#if swift(>=4.2)
let mode = RunLoop.Mode.default
#else
let mode = RunLoopMode.defaultRunLoopMode
#endif
RunLoop.current.run(mode: mode, before: Date(timeIntervalSinceNow: 0.05))
}
else {
break

View File

@ -160,11 +160,7 @@ func buildAllTestsTarget(_ testsPath: String) throws {
let matchIndexes = classMatches
.map { $0.range.location }
#if swift(>=4.0)
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.range(at: 1)) as NSString }
#else
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.rangeAt(1)) as NSString }
#endif
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.range(at: 1)) as NSString }
let ranges = zip([0] + matchIndexes, matchIndexes + [testContent.count]).map { NSRange(location: $0, length: $1 - $0) }
let classRanges = ranges[1 ..< ranges.count]
@ -179,11 +175,7 @@ func buildAllTestsTarget(_ testsPath: String) throws {
let methodMatches = testMethodsExpression.matches(in: classCode as String, options: [], range: NSRange(location: 0, length: classCode.length))
#if swift(>=4.0)
let methodNameRanges = methodMatches.map { $0.range(at: 1) }
#else
let methodNameRanges = methodMatches.map { $0.rangeAt(1) }
#endif
let methodNameRanges = methodMatches.map { $0.range(at: 1) }
let testMethodNames = methodNameRanges
.map { classCode.substring(with: $0) }

View File

@ -90,12 +90,7 @@ func validateRegexMatches(regularExpression: NSRegularExpression, content: Strin
return (matches[0 ..< matches.count].flatMap { m -> [String] in
return (1 ..< m.numberOfRanges).map { index in
#if swift(>=4.0)
let range = m.range(at: index)
#else
let range = m.rangeAt(index)
#endif
return (content as NSString).substring(with: range)
}
}, true)