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

RxSwift / RxCocoa update to 5.1.1 / Deployment Target to 10.0 #175

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ Carthage/Build

fastlane/report.xml
fastlane/screenshots
.DS_Store
6 changes: 3 additions & 3 deletions Intrepid.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Intrepid"
s.version = "0.15.1"
s.version = "0.16.0"
s.summary = "Swift Bag"
s.description = <<-DESC
Collection of extensions and utility classes by and for the developers at Intrepid Pursuits.
Expand Down Expand Up @@ -37,7 +37,7 @@ Pod::Spec.new do |s|

s.subspec "Rx" do |rx|
rx.source_files = "SwiftWisdom/Rx/**/**/*.swift"
rx.dependency 'RxSwift', '~> 4.5'
rx.dependency 'RxCocoa', '~> 4.5'
rx.dependency 'RxSwift', '~> 5.1.1'
rx.dependency 'RxCocoa', '~> 5.1.1'
end
end
6 changes: 3 additions & 3 deletions IntrepidTesting.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "IntrepidTesting"
s.version = "0.10.0"
s.version = "0.11.0"
s.summary = "A collection of test extensions to the Swift Standard Library"
s.description = <<-DESC
Collection of test extensions and utility classes by and for the developers at Intrepid Pursuits.
Expand All @@ -10,11 +10,11 @@ Pod::Spec.new do |s|
s.authors = { "Colden Prime" => "[email protected]" }
s.source = { :git => "https://github.com/IntrepidPursuits/swift-wisdom.git", :tag => "#{s.version}" }
s.platform = :ios
s.ios.deployment_target = "8.0"
s.ios.deployment_target = "10.0"
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
s.default_subspec = "Core"
s.swift_versions = ['4.2', '5.0']

s.subspec "Core" do |cs|
cs.frameworks = "XCTest"
cs.source_files = "SwiftWisdomTests/Testing/**/*.swift"
Expand Down
10 changes: 6 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
source 'https://github.com/CocoaPods/Specs'

platform :ios, '9.0'
platform :ios, '10.0'

use_frameworks!
inhibit_all_warnings!

def commonpods
pod 'IP-UIKit-Wisdom'
pod 'RxSwift', '~> 4.5'
pod 'RxCocoa', '~> 4.5'
pod 'RxSwift', '~> 5.1.1'
pod 'RxCocoa', '~> 5.1.1'

pod 'SwiftLint', '~> 0.40.0'
end

target 'SwiftWisdom' do
Expand All @@ -17,7 +19,7 @@ end

target 'SwiftWisdomTests' do
commonpods()
pod 'RxTest', '~> 4.5'
pod 'RxTest', '~> 5.1.1'
end

post_install do |installer|
Expand Down
37 changes: 23 additions & 14 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
PODS:
- IP-UIKit-Wisdom (0.0.10)
- RxCocoa (4.5.0):
- RxSwift (>= 4.4.2, ~> 4.4)
- RxSwift (4.5.0)
- RxTest (4.5.0):
- RxSwift (>= 4.4.2, ~> 4.4)
- RxCocoa (5.1.1):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxRelay (5.1.1):
- RxSwift (~> 5)
- RxSwift (5.1.1)
- RxTest (5.1.1):
- RxSwift (~> 5)
- SwiftLint (0.40.0)

DEPENDENCIES:
- IP-UIKit-Wisdom
- RxCocoa (~> 4.5)
- RxSwift (~> 4.5)
- RxTest (~> 4.5)
- RxCocoa (~> 5.1.1)
- RxSwift (~> 5.1.1)
- RxTest (~> 5.1.1)
- SwiftLint (~> 0.40.0)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
https://github.com/CocoaPods/Specs.git:
- IP-UIKit-Wisdom
- RxCocoa
- RxRelay
- RxSwift
- RxTest
- SwiftLint

SPEC CHECKSUMS:
IP-UIKit-Wisdom: b395a065344071b33659e5f6b918043a97c48a44
RxCocoa: cbf70265dc65a981d4ac982e513c10cf23df24a0
RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575
RxTest: 3ccb66bfbace0bf7df1c43a7c75d046f8ce60372
RxCocoa: 32065309a38d29b5b0db858819b5bf9ef038b601
RxRelay: d77f7d771495f43c556cbc43eebd1bb54d01e8e9
RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178
RxTest: 711632d5644dffbeb62c936a521b5b008a1e1faa
SwiftLint: 4154893c73a4c52d6240195507eb7a3e3c64087e

PODFILE CHECKSUM: afd51654925ed213b6b02f072f7fa09392e041f0
PODFILE CHECKSUM: 0b3531c5beefee7d976b641bf2b0ce80f252be63

COCOAPODS: 1.6.1
COCOAPODS: 1.9.3
6 changes: 5 additions & 1 deletion SwiftWisdom.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n if [ -e Pods/SwiftLint/swiftlint ]; then\n Pods/SwiftLint/swiftlint\n else \n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\n fi\nfi\n";
};
6F1F6BD10F68CC6443D86CE4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -935,12 +935,14 @@
"${PODS_ROOT}/Target Support Files/Pods-SwiftWisdom/Pods-SwiftWisdom-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/IP-UIKit-Wisdom/IP_UIKit_Wisdom.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IP_UIKit_Wisdom.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -975,13 +977,15 @@
"${PODS_ROOT}/Target Support Files/Pods-SwiftWisdomTests/Pods-SwiftWisdomTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/IP-UIKit-Wisdom/IP_UIKit_Wisdom.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
"${BUILT_PRODUCTS_DIR}/RxTest/RxTest.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IP_UIKit_Wisdom.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxTest.framework",
);
Expand Down
28 changes: 12 additions & 16 deletions SwiftWisdom.xcodeproj/xcshareddata/xcschemes/SwiftWisdom.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1150"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,8 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "80232B9E1BF2EE2E00818B6E"
BuildableName = "SwiftWisdom.app"
BlueprintName = "SwiftWisdom"
ReferencedContainer = "container:SwiftWisdom.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -40,17 +49,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "80232B9E1BF2EE2E00818B6E"
BuildableName = "SwiftWisdom.app"
BlueprintName = "SwiftWisdom"
ReferencedContainer = "container:SwiftWisdom.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -72,8 +70,6 @@
ReferencedContainer = "container:SwiftWisdom.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
2 changes: 1 addition & 1 deletion SwiftWisdom/Core/Foundation/Not.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Intrepid. All rights reserved.
//

/**
/*
Inverts a given boolean closure

let newNames = ["Joe", "Betty"].filter(!existingNames.contains)
Expand Down
8 changes: 4 additions & 4 deletions SwiftWisdom/Rx/Rx+DelayElements.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ extension ObservableType {
- returns: New observable sequence as described.
*/
public func ip_delayElements(
matching predicate: @escaping (E) -> Bool,
by delayTime: RxTimeInterval,
scheduler: SchedulerType = MainScheduler.instance
) -> Observable<E> {
matching predicate: @escaping (Element) -> Bool,
by delayTime: RxTimeInterval,
scheduler: SchedulerType = MainScheduler.instance
) -> Observable<Element> {
return
Observable.of(
filter(predicate).delay(delayTime, scheduler: scheduler),
Expand Down
47 changes: 11 additions & 36 deletions SwiftWisdom/Rx/Rx+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,38 @@ infix operator <-> : Binding
infix operator <- : Binding
infix operator >>> : Disposing

public func <- <T: ObserverType, O: ObservableType>(observer: T, observable: O) -> Disposable where T.E == O.E {
public func <- <T: ObserverType, O: ObservableType>(observer: T, observable: O) -> Disposable where T.Element == O.Element {
return observable.observeOn(MainScheduler.instance).bind(to: observer)
}

public func <- <T: ObserverType, O: ObservableType>(observer: T, observable: O) -> Disposable where T.E == O.E? {
public func <- <T: ObserverType, O: ObservableType>(observer: T, observable: O) -> Disposable where T.Element == O.Element? {
return observable.observeOn(MainScheduler.instance).bind(to: observer)
}

public func <- <T: ObserverType, O>(observer: T, variable: Variable<O>) -> Disposable where T.E == O {
return observer <- variable.asObservable()
public func <- <T: ObserverType, O>(observer: T, variable: O) -> Disposable where T.Element == O {
return observer <- BehaviorRelay(value: variable)
}

public func <- <T: ObserverType, O>(observer: T, variable: Variable<O>) -> Disposable where T.E == O? {
return observer <- variable.asObservable()
public func <- <T: ObserverType, O>(observer: T, variable: O) -> Disposable where T.Element == O? {
return observer <- BehaviorRelay(value: variable)
}

public func <- <T, O: ObservableType>(variable: Variable<T>, observable: O) -> Disposable where O.E == T {
return observable.bind(to: variable)
}

public func <- <T>(observer: Variable<T>, observable: Variable<T>) -> Disposable {
public func <- <T>(observer: BehaviorRelay<T>, observable: BehaviorRelay<T>) -> Disposable {
return observer <- observable.asObservable()
}

public func <- <T: ObserverType, O>(observer: T, behaviorRelay: BehaviorRelay<O>) -> Disposable where T.E == O {
public func <- <T: ObserverType, O>(observer: T, behaviorRelay: BehaviorRelay<O>) -> Disposable where T.Element == O {
return observer <- behaviorRelay.asObservable()
}

public func <- <T: ObserverType, O>(observer: T, behaviorRelay: BehaviorRelay<O>) -> Disposable where T.E == O? {
public func <- <T: ObserverType, O>(observer: T, behaviorRelay: BehaviorRelay<O>) -> Disposable where T.Element == O? {
return observer <- behaviorRelay.asObservable()
}

public func <- <T, O: ObservableType>(behaviorRelay: BehaviorRelay<T>, observable: O) -> Disposable where O.E == T {
public func <- <T, O: ObservableType>(behaviorRelay: BehaviorRelay<T>, observable: O) -> Disposable where O.Element == T {
return observable.bind(to: behaviorRelay)
}

public func <- <T>(observer: BehaviorRelay<T>, observable: BehaviorRelay<T>) -> Disposable {
return observer <- observable.asObservable()
}

public func >>> (disposable: Disposable, disposeBag: DisposeBag) {
disposeBag.insert(disposable)
}
Expand All @@ -79,23 +71,6 @@ public func >>> (disposable: Disposable, compositeDisposable: CompositeDisposabl
// Created by Krunoslav Zaher on 12/6/15.
// Copyright © 2015 Krunoslav Zaher. All rights reserved.
// https://github.com/ReactiveX/RxSwift/blob/master/RxExample/RxExample/Operators.swift
public func <-> <T>(property: ControlProperty<T>, variable: Variable<T>) -> Disposable {
let bindToUIDisposable = variable
.asObservable()
.bind(to: property)
let bindToVariable = property
.subscribe(
onNext: { next in
variable.value = next
},
onCompleted: {
bindToUIDisposable.dispose()
}
)

return Disposables.create(bindToUIDisposable, bindToVariable)
}

public func <-> <T>(property: ControlProperty<T>, behaviorRelay: BehaviorRelay<T>) -> Disposable {
let bindToUIDisposable = behaviorRelay
.asObservable()
Expand All @@ -114,7 +89,7 @@ public func <-> <T>(property: ControlProperty<T>, behaviorRelay: BehaviorRelay<T

extension ObservableType {
/// This function just exists to enable use of the trailing closure.
public func subscribeNext(_ on: @escaping (E) -> Swift.Void) -> Disposable {
public func subscribeNext(_ on: @escaping (Element) -> Swift.Void) -> Disposable {
return subscribe(onNext: on)
}
}
4 changes: 2 additions & 2 deletions SwiftWisdom/Rx/Rx+RepeatingTimeouts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ extension ObservableType {
*/
public func ip_repeatingTimeouts(
interval dueTime: RxTimeInterval,
element: E,
element: Element,
scheduler: SchedulerType = MainScheduler.instance
) -> Observable<E> {
) -> Observable<Element> {
return
Observable.of(
asObservable(),
Expand Down
24 changes: 12 additions & 12 deletions SwiftWisdomTests/Rx/Rx+DelayElementsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ final class RxDelayElementsTests: XCTestCase {
let scheduler = TestScheduler(initialClock: 0)
let observable =
scheduler.createColdObservable([
next(0, 0),
next(1, 1),
next(2, 2),
next(3, 3),
next(4, 4)
Recorded.next(0, 0),
Recorded.next(1, 1),
Recorded.next(2, 2),
Recorded.next(3, 3),
Recorded.next(4, 4)
])
.ip_delayElements(
matching: { $0 >= 2 },
by: 2,
by: .seconds(2),
scheduler: scheduler
)
let observer = scheduler.createObserver(Int.self)
Expand All @@ -50,15 +50,15 @@ final class RxDelayElementsTests: XCTestCase {
let scheduler = TestScheduler(initialClock: 0)
let observable =
scheduler.createColdObservable([
next(0, 0),
next(1, 1),
next(2, 2),
next(3, 3),
next(4, 4)
Recorded.next(0, 0),
Recorded.next(1, 1),
Recorded.next(2, 2),
Recorded.next(3, 3),
Recorded.next(4, 4)
])
.ip_delayElements(
matching: { $0 % 2 == 0 },
by: 2,
by: .seconds(2),
scheduler: scheduler
)
let observer = scheduler.createObserver(Int.self)
Expand Down
Loading