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
Add system time zone monitor #65
Conversation
/// to the time zone used by the system | ||
/// | ||
|
||
public class SystemTimeZoneMonitor: BaseNotificationMonitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty Line After Opening Brace Violation: Don't put an empty line after an opening curly brace. (empty_line_after_opening_brace)
|
||
observe(.NSSystemTimeZoneDidChange) { [unowned self] _ in | ||
self.handler(.didChange) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty Line Before Closing Brace Violation: Don't put an empty line before a closing curly brace. (empty_line_before_closing_brace)
/// | ||
public enum Event { | ||
/// | ||
///The time zone has changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace Comment Start Violation: A comment should always start with a whitespace. (whitespace_comment_start)
} | ||
|
||
private let handler: (Event) -> Void | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
waitForExpectations(timeout: 1) | ||
monitor.stopMonitoring() | ||
|
||
if let event = expectedEvent{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening Brace Spacing Violation: Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace)
dc061ca
to
04c93a3
Compare
Codecov Report
@@ Coverage Diff @@
## master #65 +/- ##
==========================================
+ Coverage 92.7% 92.75% +0.05%
==========================================
Files 49 50 +1
Lines 1151 1160 +9
==========================================
+ Hits 1067 1076 +9
Misses 84 84
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except you forgot to uniquify the project files and you did not update the documentation.
04c93a3
to
7beb263
Compare
7beb263
to
7b51cb5
Compare
@eBardX Fixed |
What is the purpose of this pull request?
Adds system time zone monitor
Background
#54
Checklist