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

Add system time zone monitor #65

Merged
merged 2 commits into from May 18, 2018

Conversation

angiemugo
Copy link
Collaborator

What is the purpose of this pull request?

Adds system time zone monitor

Background

#54

Checklist

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).
  • I have read the CONTRIBUTING guidelines.
  • My code follows the coding style of this project.
  • My change requires a change to the documentation.
  • I have documented all my changes.
  • I have added tests to cover my changes.
  • All new and existing tests pass.

/// to the time zone used by the system
///

public class SystemTimeZoneMonitor: BaseNotificationMonitor {

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)
}

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

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

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{

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)

@angiemugo angiemugo force-pushed the ft-system-time-zone-monitor branch 2 times, most recently from dc061ca to 04c93a3 Compare May 15, 2018 10:47
@codecov-io
Copy link

codecov-io commented May 15, 2018

Codecov Report

Merging #65 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...ources/Core/Foundation/SystemTimeZoneMonitor.swift 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3981af5...f912b00. Read the comment docs.

Copy link
Owner

@eBardX eBardX left a 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.

@angiemugo angiemugo force-pushed the ft-system-time-zone-monitor branch from 04c93a3 to 7beb263 Compare May 16, 2018 07:57
@angiemugo angiemugo force-pushed the ft-system-time-zone-monitor branch from 7beb263 to 7b51cb5 Compare May 16, 2018 07:59
@angiemugo
Copy link
Collaborator Author

@eBardX Fixed

@eBardX eBardX merged commit 7537c60 into eBardX:master May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants