Skip to content

Commit

Permalink
Merge branch 'release/0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Mar 18, 2018
2 parents 954f391 + ea68b94 commit 9df1568
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## CHANGELOG

Latest version of Repeat is [0.5.0](https://github.com/malcommac/Repeat/releases/tag/0.5.0) published on 2018/03/17.
Latest version of Repeat is [0.5.1](https://github.com/malcommac/Repeat/releases/tag/0.5.1) published on 2018/03/18.

**Changelog - 0.5.1**:

- [#14](https://github.com/malcommac/Repeat/pull/14): Refactors equatable implementation to use an identity operator.

**Changelog - 0.5.0**:
* [#15](https://github.com/malcommac/Repeat/pull/15): Added `Debouncer` support.
Expand Down
2 changes: 1 addition & 1 deletion Configs/Repeat.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>0.5.0</string>
<string>0.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ All Apple platforms are supported:

## Latest Version

Latest version of Repeat is [0.5.0](https://github.com/malcommac/Repeat/releases/tag/0.5.0) published on 2018/03/17.
Latest version of Repeat is [0.5.1](https://github.com/malcommac/Repeat/releases/tag/0.5.1) published on 2018/03/18.
Full changelog is available in [CHANGELOG.md](CHANGELOG.md) file.

## Installation
Expand Down
2 changes: 1 addition & 1 deletion Repeat.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Repeat"
s.version = "0.5.0"
s.version = "0.5.1"
s.summary = "Modern NSTimer alternative in Swift"
s.description = <<-DESC
Repeat is a modern alternative to NSTimer; no strong references, multiple observers, reusable instances with start/stop/pause support in swifty syntax.
Expand Down
5 changes: 3 additions & 2 deletions Sources/Repeat/Repeater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ open class Repeater : Equatable {
private var queue: DispatchQueue? = nil

/// Unique identifier
public let id: UUID = UUID()
@available(*, deprecated, message: "Please use the equal-to operator (==) instead")
public let id = UUID()

/// Initialize a new timer.
///
Expand Down Expand Up @@ -421,6 +422,6 @@ open class Repeater : Equatable {
}

public static func == (lhs: Repeater, rhs: Repeater) -> Bool {
return (lhs.id == rhs.id)
return lhs === rhs
}
}
15 changes: 12 additions & 3 deletions Tests/RepeatTests/RepeatTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,16 @@ class RepeatTests: XCTestCase {
wait(for: [exp], timeout: 20)
}

static var allTests = [
("testExample", test_once),
]
func test_equality() {
let repeater1 = Repeater(interval: .seconds(1)) { _ in XCTFail() }
let repeater2 = Repeater(interval: .seconds(1)) { _ in XCTFail() }
XCTAssertEqual(repeater1, repeater1)
XCTAssertEqual(repeater2, repeater2)
XCTAssertNotEqual(repeater1, repeater2)
}

static var allTests = [
("testExample", test_once),
("test_equality", test_equality)
]
}

0 comments on commit 9df1568

Please sign in to comment.