Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Unschedules dispatch queue when stopping notifier (ProcedureKit#360) (ProcedureKit#410)

* Makes Operation's conditions property public accessible (ProcedureKit#412)

* [3.1.1]: Adds CHANGELOG

* [3.1.1]: Updates version
  • Loading branch information
danthorpe authored Aug 23, 2016
1 parent 3d31ea1 commit bd97bf7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .jazzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author_url": "http://danthorpe.me",
"github_url": "https://github.com/danthorpe/Operations",
"module": "Operations",
"module_version": "3.1.0",
"module_version": "3.1.1",
"readme": "README.md",
"swift_version": "2.2",
"xcodebuild_arguments": [
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 3.1.1

1. [OPR-410](https://github.com/danthorpe/Operations/pull/410) Thanks to [@paulpires](https://github.com/paulpires) for fixing a bug in the `ReachabilityManager`.
2. [OPR-412](https://github.com/danthorpe/Operations/pull/412) Makes the `condition` property of `Operation` publicly accessible.

# 3.1.0

## Improvements to Result Injection
Expand Down
2 changes: 1 addition & 1 deletion Operations.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Operations"
s.version = "3.1.0"
s.version = "3.1.1"
s.summary = "Powerful NSOperation subclasses in Swift."
s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/Shared/Operation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class Operation: NSOperation {
private let disableAutomaticFinishing: Bool

internal private(set) var directDependencies = Set<NSOperation>()
internal private(set) var conditions = Set<Condition>()
public private(set) var conditions = Set<Condition>()

internal var indirectDependencies: Set<NSOperation> {
return Set(conditions
Expand Down
1 change: 1 addition & 0 deletions Sources/Features/Shared/Reachability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ class DeviceReachability: NetworkReachabilityType {
if let reachability = try? defaultRouteReachability() {
SCNetworkReachabilityUnscheduleFromRunLoop(reachability, CFRunLoopGetCurrent(), kCFRunLoopCommonModes)
SCNetworkReachabilitySetCallback(reachability, nil, nil)
SCNetworkReachabilitySetDispatchQueue(reachability, nil)
}
notifierIsRunning = false
}
Expand Down
2 changes: 1 addition & 1 deletion Supporting Files/Operations.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//


OPERATIONS_VERSION = 3.1.0
OPERATIONS_VERSION = 3.1.1

DEFINES_MODULE = YES
INFOPLIST_FILE = $(SRCROOT)/Supporting Files/Info.plist
Expand Down
6 changes: 6 additions & 0 deletions Tests/Features/ReachabilityTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,4 +316,10 @@ class DeviceReachabilityTests: XCTestCase, NetworkReachabilityDelegate {
XCTFail("Unexpected error thrown: \(error)")
}
}

func test__stopNotifier_unschedules_reachability_callbacks_queue() {
do { try device.startNotifierOnQueue(queue) } catch { XCTFail() }
device.stopNotifier()
do { try device.startNotifierOnQueue(queue) } catch { XCTFail() }
}
}

0 comments on commit bd97bf7

Please sign in to comment.