Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ DerivedData
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts
Carthage/Build
Carthage/


# MacOS
#
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "4.0.0"
github "ReactiveX/RxSwift" "4.1.2"
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
Current master
--------------

- Nothing yet!
- Update the dependencies in the Cartfile & Podfile. See [#57](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/57) - @Vkt0r
- Replace the deprecated `addDisposableTo(_:)` in favor of `disposed(by:)` in the DemoTest. See [#57](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/57) - @Vkt0r

4.2.0
-----
Expand Down
29 changes: 28 additions & 1 deletion Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,16 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "Ash Furrow";
TargetAttributes = {
5E9E831A1BF79B3000C85B46 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0920;
};
5E9E832E1BF79B3000C85B46 = {
CreatedOnToolsVersion = 7.1;
LastSwiftMigration = 0920;
};
};
};
Expand Down Expand Up @@ -393,13 +395,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -438,13 +448,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -463,6 +481,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -478,6 +497,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -491,6 +512,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -502,6 +525,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.DemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -513,6 +538,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.DemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
4 changes: 3 additions & 1 deletion Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
10 changes: 5 additions & 5 deletions Demo/Demo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true
}

func applicationWillResignActive(application: UIApplication) {
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(application: UIApplication) {
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(application: UIApplication) {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(application: UIApplication) {
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(application: UIApplication) {
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

Expand Down
29 changes: 12 additions & 17 deletions Demo/DemoTests/DemoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import Nimble
import RxSwift
import NSObject_Rx

class DisposeBagTest: HasDisposeBag {

}
class DisposeBagTest: HasDisposeBag {}

class Test: QuickSpec {
override func spec() {
it("respects setter") {

it("should respects the setter") {
var subject = NSObject()
let disposeBag = DisposeBag()
subject.rx.disposeBag = disposeBag
Expand All @@ -19,7 +18,7 @@ class Test: QuickSpec {
expect(subjectProtocol.disposeBag) === disposeBag
}

it("diposes when object is deallocated") {
it("should dispose when the object is deallocated") {
var executed = false
var executedProtocol = false

Expand All @@ -31,13 +30,11 @@ class Test: QuickSpec {
let subject = NSObject()
let subjectProtocol = DisposeBagTest()

variable.subscribe(onNext: { _ in
executed = true
}).addDisposableTo(subject.rx.disposeBag)

variableProtocol.subscribe(onNext: { _ in
executedProtocol = true
}).addDisposableTo(subjectProtocol.disposeBag)
variable.subscribe(onNext: { _ in executed = true })
.disposed(by: subject.rx.disposeBag)

variableProtocol.subscribe(onNext: { _ in executedProtocol = true })
.disposed(by: subjectProtocol.disposeBag)
}

// Force a new value through the subscription to test its been disposed of.
Expand All @@ -47,20 +44,18 @@ class Test: QuickSpec {
expect(executedProtocol) == false
}

it("disposes using rx.disposeBag") {
it("should disposes using rx.disposeBag") {
var executed = false
let variable = PublishSubject<Int>()

do {
let subject = NSObject()

variable.subscribe(onNext: { _ in
executed = true
}).addDisposableTo(subject.rx.disposeBag)
variable.subscribe(onNext: { _ in executed = true })
.disposed(by: subject.rx.disposeBag)
}

variable.onNext(1)

expect(executed) == false
}
}
Expand Down
12 changes: 6 additions & 6 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PODS:
- Nimble (7.0.2)
- Nimble (7.0.3)
- NSObject+Rx (4.2.0):
- RxSwift (~> 4.0)
- Quick (1.2.0)
- RxSwift (4.0.0)
- RxSwift (4.1.2)

DEPENDENCIES:
- Nimble
Expand All @@ -16,11 +16,11 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
Nimble: bfe1f814edabba69ff145cb1283e04ed636a67f2
NSObject+Rx: cbbc05e3cb3ad446cdbced3e00e39c9efaf02925
Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac
NSObject+Rx: 185a164d353211aac0e3243004d26b0db0476cd5
Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
RxSwift: e49536837d9901277638493ea537394d4b55f570

PODFILE CHECKSUM: 4f420ecd33a82075e360098bbed0ccaadfeb1728

COCOAPODS: 1.3.1
COCOAPODS: 1.4.0
12 changes: 6 additions & 6 deletions Demo/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

Loading