Skip to content

Commit

Permalink
Release 3.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kzaher committed Jul 18, 2017
1 parent 2e63f16 commit 79ac3d0
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.

## Master

## [3.6.1](https://github.com/ReactiveX/RxSwift/releases/tag/3.6.1)

#### Anomalies

* Fixes compilation issue with Xcode 9b3. #1341

## [3.6.0](https://github.com/ReactiveX/RxSwift/releases/tag/3.6.0)

Expand Down
4 changes: 2 additions & 2 deletions Rx.playground/Sources/SupportCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Dispatch
- parameter description: example description
- parameter action: `Void` closure
*/
public func example(_ description: String, action: (Void) -> Void) {
public func example(_ description: String, action: () -> Void) {
printExampleHeader(description)
action()
}
Expand All @@ -24,7 +24,7 @@ public enum TestError: Swift.Error {
- parameter delay: time in seconds to wait before executing `closure`
- parameter closure: `Void` closure
*/
public func delay(_ delay: Double, closure: @escaping (Void) -> Void) {
public func delay(_ delay: Double, closure: @escaping () -> Void) {

DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
closure()
Expand Down
2 changes: 1 addition & 1 deletion RxBlocking.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxBlocking"
s.version = "3.6.0"
s.version = "3.6.1"
s.summary = "RxSwift Blocking operatos"
s.description = <<-DESC
Set of blocking operators for RxSwift. These operators are mostly intended for unit/integration tests
Expand Down
2 changes: 1 addition & 1 deletion RxBlocking/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.6.0</string>
<string>3.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxCocoa"
s.version = "3.6.0"
s.version = "3.6.1"
s.summary = "RxSwift Cocoa extensions"
s.description = <<-DESC
* UI extensions
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.6.0</string>
<string>3.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
6 changes: 5 additions & 1 deletion RxExample/RxExample/Services/ReachabilityService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import RxSwift
#endif

import class Dispatch.queue.DispatchQueue
#if swift(>=3.2)
import class Dispatch.DispatchQueue
#else
import class Dispatch.queue.DispatchQueue
#endif

public enum ReachabilityStatus {
case reachable(viaWiFi: Bool)
Expand Down
2 changes: 1 addition & 1 deletion RxSwift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxSwift"
s.version = "3.6.0"
s.version = "3.6.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)
Expand Down
2 changes: 1 addition & 1 deletion RxSwift/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.6.0</string>
<string>3.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RxTest.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxTest"
s.version = "3.6.0"
s.version = "3.6.1"
s.summary = "RxSwift Testing extensions"
s.description = <<-DESC
Unit testing extensions for RxSwift. This library contains mock schedulers, observables, and observers
Expand Down
2 changes: 1 addition & 1 deletion RxTest/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.6.0</string>
<string>3.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
26 changes: 17 additions & 9 deletions Tests/RxCocoaTests/KVOObservableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ extension KVOObservableTests {
XCTAssertTrue(latest == nil)
XCTAssertTrue(!isDisposed)

root.property = "a" as NSString
root.property = "a".duplicate()

XCTAssertTrue(latest == "a")
XCTAssertTrue(!isDisposed)
Expand Down Expand Up @@ -347,7 +347,7 @@ extension KVOObservableTests {
XCTAssertTrue(latest == nil)
XCTAssertTrue(!isDisposed)

let a: NSString! = "a"
let a: NSString! = "a".duplicate()

root.property = a

Expand Down Expand Up @@ -386,7 +386,7 @@ extension KVOObservableTests {
XCTAssertTrue(latest == nil)
XCTAssertTrue(isDisposed == false)

let one: NSString! = "1"
let one: NSString! = "1".duplicate()

child.property = one

Expand All @@ -410,7 +410,7 @@ extension KVOObservableTests {

root.property = child

let one: NSString! = "1"
let one: NSString! = "1".duplicate()

child.property = one

Expand Down Expand Up @@ -463,7 +463,7 @@ extension KVOObservableTests {
XCTAssertTrue(latest == nil)
XCTAssertTrue(isDisposed == false)

let one: NSString! = "1"
let one: NSString! = "1".duplicate()

child.property = one

Expand All @@ -487,7 +487,7 @@ extension KVOObservableTests {

root.property = child

let one: NSString! = "1"
let one: NSString! = "1".duplicate()

child.property = one

Expand Down Expand Up @@ -615,7 +615,7 @@ extension KVOObservableTests {

var latest: String? = nil

root.property = "a" as NSString
root.property = "a".duplicate()

XCTAssertTrue(latest == nil)

Expand Down Expand Up @@ -646,7 +646,7 @@ extension KVOObservableTests {

var latest: String? = nil

root.property = "a" as NSString
root.property = "a".duplicate()

XCTAssertTrue(latest == nil)

Expand All @@ -658,7 +658,7 @@ extension KVOObservableTests {

XCTAssertTrue(latest == nil)

root.property = "b" as NSString
root.property = "b".duplicate()

XCTAssertTrue(latest == "b")

Expand Down Expand Up @@ -1581,3 +1581,11 @@ extension KVOObservableTests {
}
}
#endif


extension NSString {
func duplicate() -> NSString {
return NSMutableString(string: self)
}
}

6 changes: 6 additions & 0 deletions scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ BOLDWHITE="\033[1m\033[37m"
if [[ `uname` == "Darwin" ]]; then
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-10-3 | wc -l` -eq 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.3
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-11-0 | wc -l` -eq 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/11.0
else
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.0
fi

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-3-2 | wc -l` -eq 1 ]; then
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.2
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.watchOS-4-0 | wc -l` -eq 1 ]; then
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/4.0
else
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.0
fi

if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-10-2 | wc -l` -eq 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.2
elif [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-11-0 | wc -l` -eq 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/11.0
else
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.0
fi
Expand Down
13 changes: 10 additions & 3 deletions scripts/package-spm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,11 @@ func buildAllTestsTarget(_ testsPath: String) throws {
let classMatches = splitClassesRegularExpression.matches(in: testContent as String, options: [], range: NSRange(location: 0, length: testContent.characters.count))
let matchIndexes = classMatches
.map { $0.range.location }
let classNames = classMatches.map { (testContent as NSString).substring(with: $0.rangeAt(1)) as NSString }

#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 ranges = zip([0] + matchIndexes, matchIndexes + [testContent.characters.count]).map { NSRange(location: $0, length: $1 - $0) }
let classRanges = ranges[1 ..< ranges.count]

Expand All @@ -173,7 +176,11 @@ func buildAllTestsTarget(_ testsPath: String) throws {
}

let methodMatches = testMethodsExpression.matches(in: classCode as String, options: [], range: NSRange(location: 0, length: classCode.length))
let methodNameRanges = methodMatches.map { $0.rangeAt(1) }
#if swift(>=4.0)
let methodNameRanges = methodMatches.map { $0.range(at: 1) }
#else
let methodNameRanges = methodMatches.map { $0.rangeAt(1) }
#endif
let testMethodNames = methodNameRanges
.map { classCode.substring(with: $0) }
.filter { !excludeTest($0) }
Expand Down
7 changes: 6 additions & 1 deletion scripts/validate-headers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ func validateRegexMatches(regularExpression: NSRegularExpression, content: Strin

return (matches[0 ..< matches.count].flatMap { m -> [String] in
return (1 ..< m.numberOfRanges).map { index in
return (content as NSString).substring(with: m.rangeAt(index))
#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)
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-podspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ done
function validate() {
local PODSPEC=$1

pod lib lint $PODSPEC --verbose --no-clean
pod lib lint $PODSPEC --verbose --no-clean --allow-warnings
}

for TARGET in ${TARGETS[@]}
Expand Down

0 comments on commit 79ac3d0

Please sign in to comment.