{"action":"created","comment":{"url":"https://api.github.com/repos/danthorpe/Operations/pulls/comments/60790652","id":60790652,"diff_hunk":"@@ -0,0 +1,51 @@\n+//\n+//  ActivityIndicatorViewObserver.swift\n+//  Operations\n+//\n+//  Created by Matthew Holden 16/04/2016.\n+//\n+//\n+\n+import UIKit\n+\n+public protocol ActivityIndicatorViewAnimationInterface {\n+    func startAnimating()\n+    func stopAnimating()\n+}\n+\n+extension UIActivityIndicatorView: ActivityIndicatorViewAnimationInterface {}\n+\n+/**\n+ An OperationObserverType that can update the state of an associated `UIActivityIndicatorView`\n+ when the observed operation starts and finishes.\n+ \n+ - note: Any type conforming to `ActivityIndicatorViewAnimationInterface` can be provided as \n+         the activity indicator.\n+ */\n+public class ActivityIndicatorViewObserver: OperationDidStartObserver, OperationDidFinishObserver {\n+\n+    private let activityIndicator: ActivityIndicatorViewAnimationInterface\n+\n+    /**\n+     Initialize the observer with an `ActivityIndicatorViewAnimationInterface`-conforming type.\n+     - parameter activityIndicator: the object to start and stop animating\n+     - returns: an observer\n+     - note: The activity indicator's `startAninating` and `stopAnimating` methods \n+             are guaranteed to execute on the main queue.\n+     */\n+    public init(activityIndicator: ActivityIndicatorViewAnimationInterface) {","path":"Sources/Core/iOS/ActivityIndicatorViewObserver.swift","position":36,"original_position":36,"commit_id":"29dbf0fec071f58a98713dd54f4e530bfa765c1e","original_commit_id":"0ae7cee10a6f0f527a0947b4746f90be40d9d81e","user":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"body":"Yeah, that's partly why my comment was with a \"?\". Naming stuff is hard. Maybe\r\n\r\n```swift\r\nlet observer = ActivityIndicatorViewObserver(indicator: myIndicator)\r\n```\r\n\r\nI guess I am just trying to be less overly verbose and Objective-C-ish.","created_at":"2016-04-22T19:23:59Z","updated_at":"2016-04-22T19:23:59Z","html_url":"https://github.com/danthorpe/Operations/pull/297#discussion_r60790652","pull_request_url":"https://api.github.com/repos/danthorpe/Operations/pulls/297","_links":{"self":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/comments/60790652"},"html":{"href":"https://github.com/danthorpe/Operations/pull/297#discussion_r60790652"},"pull_request":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/297"}}},"pull_request":{"url":"https://api.github.com/repos/danthorpe/Operations/pulls/297","id":67556899,"html_url":"https://github.com/danthorpe/Operations/pull/297","diff_url":"https://github.com/danthorpe/Operations/pull/297.diff","patch_url":"https://github.com/danthorpe/Operations/pull/297.patch","issue_url":"https://api.github.com/repos/danthorpe/Operations/issues/297","number":297,"state":"open","locked":false,"title":"Implements AcitivityIndicatorViewObserver","user":{"login":"matt-holden","id":459027,"avatar_url":"https://avatars.githubusercontent.com/u/459027?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-holden","html_url":"https://github.com/matt-holden","followers_url":"https://api.github.com/users/matt-holden/followers","following_url":"https://api.github.com/users/matt-holden/following{/other_user}","gists_url":"https://api.github.com/users/matt-holden/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-holden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-holden/subscriptions","organizations_url":"https://api.github.com/users/matt-holden/orgs","repos_url":"https://api.github.com/users/matt-holden/repos","events_url":"https://api.github.com/users/matt-holden/events{/privacy}","received_events_url":"https://api.github.com/users/matt-holden/received_events","type":"User","site_admin":false},"body":"(For earlier discussion, refer to #202.)\r\n    \r\n`ActivityIndicatorViewObserver` is initialized with an `ActivityIndicatorViewAnimationInterface` type.\r\n    \r\nThe observer will call that activity indicator's `startAnimating()` and `stopAnimating()` in response to the observed operation's start and finish.\r\n","created_at":"2016-04-22T18:55:59Z","updated_at":"2016-04-22T19:23:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1c7f375f3eb0b23988e18d7ce543692f5f9327c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/danthorpe/Operations/pulls/297/commits","review_comments_url":"https://api.github.com/repos/danthorpe/Operations/pulls/297/comments","review_comment_url":"https://api.github.com/repos/danthorpe/Operations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danthorpe/Operations/issues/297/comments","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/29dbf0fec071f58a98713dd54f4e530bfa765c1e","head":{"label":"matt-holden:feature/OPR-202_uiactivityindicatorview_observer","ref":"feature/OPR-202_uiactivityindicatorview_observer","sha":"29dbf0fec071f58a98713dd54f4e530bfa765c1e","user":{"login":"matt-holden","id":459027,"avatar_url":"https://avatars.githubusercontent.com/u/459027?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-holden","html_url":"https://github.com/matt-holden","followers_url":"https://api.github.com/users/matt-holden/followers","following_url":"https://api.github.com/users/matt-holden/following{/other_user}","gists_url":"https://api.github.com/users/matt-holden/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-holden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-holden/subscriptions","organizations_url":"https://api.github.com/users/matt-holden/orgs","repos_url":"https://api.github.com/users/matt-holden/repos","events_url":"https://api.github.com/users/matt-holden/events{/privacy}","received_events_url":"https://api.github.com/users/matt-holden/received_events","type":"User","site_admin":false},"repo":{"id":56278301,"name":"Operations","full_name":"matt-holden/Operations","owner":{"login":"matt-holden","id":459027,"avatar_url":"https://avatars.githubusercontent.com/u/459027?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-holden","html_url":"https://github.com/matt-holden","followers_url":"https://api.github.com/users/matt-holden/followers","following_url":"https://api.github.com/users/matt-holden/following{/other_user}","gists_url":"https://api.github.com/users/matt-holden/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-holden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-holden/subscriptions","organizations_url":"https://api.github.com/users/matt-holden/orgs","repos_url":"https://api.github.com/users/matt-holden/repos","events_url":"https://api.github.com/users/matt-holden/events{/privacy}","received_events_url":"https://api.github.com/users/matt-holden/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matt-holden/Operations","description":"A Swift framework inspired by WWDC 2015 Advanced NSOperations session.","fork":true,"url":"https://api.github.com/repos/matt-holden/Operations","forks_url":"https://api.github.com/repos/matt-holden/Operations/forks","keys_url":"https://api.github.com/repos/matt-holden/Operations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matt-holden/Operations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matt-holden/Operations/teams","hooks_url":"https://api.github.com/repos/matt-holden/Operations/hooks","issue_events_url":"https://api.github.com/repos/matt-holden/Operations/issues/events{/number}","events_url":"https://api.github.com/repos/matt-holden/Operations/events","assignees_url":"https://api.github.com/repos/matt-holden/Operations/assignees{/user}","branches_url":"https://api.github.com/repos/matt-holden/Operations/branches{/branch}","tags_url":"https://api.github.com/repos/matt-holden/Operations/tags","blobs_url":"https://api.github.com/repos/matt-holden/Operations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matt-holden/Operations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matt-holden/Operations/git/refs{/sha}","trees_url":"https://api.github.com/repos/matt-holden/Operations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matt-holden/Operations/statuses/{sha}","languages_url":"https://api.github.com/repos/matt-holden/Operations/languages","stargazers_url":"https://api.github.com/repos/matt-holden/Operations/stargazers","contributors_url":"https://api.github.com/repos/matt-holden/Operations/contributors","subscribers_url":"https://api.github.com/repos/matt-holden/Operations/subscribers","subscription_url":"https://api.github.com/repos/matt-holden/Operations/subscription","commits_url":"https://api.github.com/repos/matt-holden/Operations/commits{/sha}","git_commits_url":"https://api.github.com/repos/matt-holden/Operations/git/commits{/sha}","comments_url":"https://api.github.com/repos/matt-holden/Operations/comments{/number}","issue_comment_url":"https://api.github.com/repos/matt-holden/Operations/issues/comments{/number}","contents_url":"https://api.github.com/repos/matt-holden/Operations/contents/{+path}","compare_url":"https://api.github.com/repos/matt-holden/Operations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matt-holden/Operations/merges","archive_url":"https://api.github.com/repos/matt-holden/Operations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matt-holden/Operations/downloads","issues_url":"https://api.github.com/repos/matt-holden/Operations/issues{/number}","pulls_url":"https://api.github.com/repos/matt-holden/Operations/pulls{/number}","milestones_url":"https://api.github.com/repos/matt-holden/Operations/milestones{/number}","notifications_url":"https://api.github.com/repos/matt-holden/Operations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matt-holden/Operations/labels{/name}","releases_url":"https://api.github.com/repos/matt-holden/Operations/releases{/id}","deployments_url":"https://api.github.com/repos/matt-holden/Operations/deployments","created_at":"2016-04-15T00:21:36Z","updated_at":"2016-04-15T00:21:37Z","pushed_at":"2016-04-22T18:59:54Z","git_url":"git://github.com/matt-holden/Operations.git","ssh_url":"git@github.com:matt-holden/Operations.git","clone_url":"https://github.com/matt-holden/Operations.git","svn_url":"https://github.com/matt-holden/Operations","homepage":"","size":3432,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"danthorpe:development","ref":"development","sha":"bd68fea7c884f2447947060cae162822fd4b1932","user":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"repo":{"id":38116404,"name":"Operations","full_name":"danthorpe/Operations","owner":{"login":"danthorpe","id":309420,"avatar_url":"https://avatars.githubusercontent.com/u/309420?v=3","gravatar_id":"","url":"https://api.github.com/users/danthorpe","html_url":"https://github.com/danthorpe","followers_url":"https://api.github.com/users/danthorpe/followers","following_url":"https://api.github.com/users/danthorpe/following{/other_user}","gists_url":"https://api.github.com/users/danthorpe/gists{/gist_id}","starred_url":"https://api.github.com/users/danthorpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danthorpe/subscriptions","organizations_url":"https://api.github.com/users/danthorpe/orgs","repos_url":"https://api.github.com/users/danthorpe/repos","events_url":"https://api.github.com/users/danthorpe/events{/privacy}","received_events_url":"https://api.github.com/users/danthorpe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danthorpe/Operations","description":"A Swift framework inspired by WWDC 2015 Advanced NSOperations session.","fork":false,"url":"https://api.github.com/repos/danthorpe/Operations","forks_url":"https://api.github.com/repos/danthorpe/Operations/forks","keys_url":"https://api.github.com/repos/danthorpe/Operations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danthorpe/Operations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danthorpe/Operations/teams","hooks_url":"https://api.github.com/repos/danthorpe/Operations/hooks","issue_events_url":"https://api.github.com/repos/danthorpe/Operations/issues/events{/number}","events_url":"https://api.github.com/repos/danthorpe/Operations/events","assignees_url":"https://api.github.com/repos/danthorpe/Operations/assignees{/user}","branches_url":"https://api.github.com/repos/danthorpe/Operations/branches{/branch}","tags_url":"https://api.github.com/repos/danthorpe/Operations/tags","blobs_url":"https://api.github.com/repos/danthorpe/Operations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danthorpe/Operations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danthorpe/Operations/git/refs{/sha}","trees_url":"https://api.github.com/repos/danthorpe/Operations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danthorpe/Operations/statuses/{sha}","languages_url":"https://api.github.com/repos/danthorpe/Operations/languages","stargazers_url":"https://api.github.com/repos/danthorpe/Operations/stargazers","contributors_url":"https://api.github.com/repos/danthorpe/Operations/contributors","subscribers_url":"https://api.github.com/repos/danthorpe/Operations/subscribers","subscription_url":"https://api.github.com/repos/danthorpe/Operations/subscription","commits_url":"https://api.github.com/repos/danthorpe/Operations/commits{/sha}","git_commits_url":"https://api.github.com/repos/danthorpe/Operations/git/commits{/sha}","comments_url":"https://api.github.com/repos/danthorpe/Operations/comments{/number}","issue_comment_url":"https://api.github.com/repos/danthorpe/Operations/issues/comments{/number}","contents_url":"https://api.github.com/repos/danthorpe/Operations/contents/{+path}","compare_url":"https://api.github.com/repos/danthorpe/Operations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danthorpe/Operations/merges","archive_url":"https://api.github.com/repos/danthorpe/Operations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danthorpe/Operations/downloads","issues_url":"https://api.github.com/repos/danthorpe/Operations/issues{/number}","pulls_url":"https://api.github.com/repos/danthorpe/Operations/pulls{/number}","milestones_url":"https://api.github.com/repos/danthorpe/Operations/milestones{/number}","notifications_url":"https://api.github.com/repos/danthorpe/Operations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danthorpe/Operations/labels{/name}","releases_url":"https://api.github.com/repos/danthorpe/Operations/releases{/id}","deployments_url":"https://api.github.com/repos/danthorpe/Operations/deployments","created_at":"2015-06-26T14:44:38Z","updated_at":"2016-04-21T02:22:59Z","pushed_at":"2016-04-22T18:59:55Z","git_url":"git://github.com/danthorpe/Operations.git","ssh_url":"git@github.com:danthorpe/Operations.git","clone_url":"https://github.com/danthorpe/Operations.git","svn_url":"https://github.com/danthorpe/Operations","homepage":"","size":3657,"stargazers_count":221,"watchers_count":221,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":19,"forks":38,"open_issues":19,"watchers":221,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/297"},"html":{"href":"https://github.com/danthorpe/Operations/pull/297"},"issue":{"href":"https://api.github.com/repos/danthorpe/Operations/issues/297"},"comments":{"href":"https://api.github.com/repos/danthorpe/Operations/issues/297/comments"},"review_comments":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/297/comments"},"review_comment":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danthorpe/Operations/pulls/297/commits"},"statuses":{"href":"https://api.github.com/repos/danthorpe/Operations/statuses/29dbf0fec071f58a98713dd54f4e530bfa765c1e"}}}}