{"action":"closed","number":53,"pull_request":{"url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/53","id":27713611,"html_url":"https://github.com/radshag/PhoneGap-Geofencing/pull/53","diff_url":"https://github.com/radshag/PhoneGap-Geofencing/pull/53.diff","patch_url":"https://github.com/radshag/PhoneGap-Geofencing/pull/53.patch","issue_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues/53","number":53,"state":"closed","locked":false,"title":"Only listen when necessary, refactor geofencing checks, use Cordova callbacks","user":{"login":"jarseneault","id":779680,"avatar_url":"https://avatars.githubusercontent.com/u/779680?v=3","gravatar_id":"","url":"https://api.github.com/users/jarseneault","html_url":"https://github.com/jarseneault","followers_url":"https://api.github.com/users/jarseneault/followers","following_url":"https://api.github.com/users/jarseneault/following{/other_user}","gists_url":"https://api.github.com/users/jarseneault/gists{/gist_id}","starred_url":"https://api.github.com/users/jarseneault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarseneault/subscriptions","organizations_url":"https://api.github.com/users/jarseneault/orgs","repos_url":"https://api.github.com/users/jarseneault/repos","events_url":"https://api.github.com/users/jarseneault/events{/privacy}","received_events_url":"https://api.github.com/users/jarseneault/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nThis pull request changes a few things:\r\n\r\n1. It only starts listening for location updates when necessary instead of on instantiation.  This should save battery life on devices.\r\n\r\n2. I refactored the geofencing checks into their own method to reduce duplication.\r\n\r\n3. Methods where it makes sense to call the immediate Cordova success / failure callbacks (in addition to the set geofencing callbacks) will actually call them.  This allows some more flexibility from Javascript.\r\n\r\nNote that I only touched the Android side since that is the only side with which I'm currently working.","created_at":"2015-01-20T21:24:56Z","updated_at":"2015-01-21T05:28:03Z","closed_at":"2015-01-21T05:28:03Z","merged_at":"2015-01-21T05:28:03Z","merge_commit_sha":"88a8913bf7a11453e21367fc9b273e31940ad01f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/53/commits","review_comments_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/53/comments","review_comment_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/comments/{number}","comments_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues/53/comments","statuses_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/statuses/1d11c700a3748f8597bf572998cb3295f88ab0c0","head":{"label":"jarseneault:refactor_1","ref":"refactor_1","sha":"1d11c700a3748f8597bf572998cb3295f88ab0c0","user":{"login":"jarseneault","id":779680,"avatar_url":"https://avatars.githubusercontent.com/u/779680?v=3","gravatar_id":"","url":"https://api.github.com/users/jarseneault","html_url":"https://github.com/jarseneault","followers_url":"https://api.github.com/users/jarseneault/followers","following_url":"https://api.github.com/users/jarseneault/following{/other_user}","gists_url":"https://api.github.com/users/jarseneault/gists{/gist_id}","starred_url":"https://api.github.com/users/jarseneault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarseneault/subscriptions","organizations_url":"https://api.github.com/users/jarseneault/orgs","repos_url":"https://api.github.com/users/jarseneault/repos","events_url":"https://api.github.com/users/jarseneault/events{/privacy}","received_events_url":"https://api.github.com/users/jarseneault/received_events","type":"User","site_admin":false},"repo":{"id":29536105,"name":"PhoneGap-Geofencing","full_name":"jarseneault/PhoneGap-Geofencing","owner":{"login":"jarseneault","id":779680,"avatar_url":"https://avatars.githubusercontent.com/u/779680?v=3","gravatar_id":"","url":"https://api.github.com/users/jarseneault","html_url":"https://github.com/jarseneault","followers_url":"https://api.github.com/users/jarseneault/followers","following_url":"https://api.github.com/users/jarseneault/following{/other_user}","gists_url":"https://api.github.com/users/jarseneault/gists{/gist_id}","starred_url":"https://api.github.com/users/jarseneault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarseneault/subscriptions","organizations_url":"https://api.github.com/users/jarseneault/orgs","repos_url":"https://api.github.com/users/jarseneault/repos","events_url":"https://api.github.com/users/jarseneault/events{/privacy}","received_events_url":"https://api.github.com/users/jarseneault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jarseneault/PhoneGap-Geofencing","description":"Geofencing Plugin For Phonegap","fork":true,"url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing","forks_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/forks","keys_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/teams","hooks_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/hooks","issue_events_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/issues/events{/number}","events_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/events","assignees_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/assignees{/user}","branches_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/branches{/branch}","tags_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/tags","blobs_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/git/refs{/sha}","trees_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/statuses/{sha}","languages_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/languages","stargazers_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/stargazers","contributors_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/contributors","subscribers_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/subscribers","subscription_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/subscription","commits_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/commits{/sha}","git_commits_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/git/commits{/sha}","comments_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/comments{/number}","issue_comment_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/issues/comments/{number}","contents_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/contents/{+path}","compare_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/merges","archive_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/downloads","issues_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/issues{/number}","pulls_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/pulls{/number}","milestones_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/milestones{/number}","notifications_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/labels{/name}","releases_url":"https://api.github.com/repos/jarseneault/PhoneGap-Geofencing/releases{/id}","created_at":"2015-01-20T15:19:11Z","updated_at":"2015-01-20T15:19:12Z","pushed_at":"2015-01-20T21:20:07Z","git_url":"git://github.com/jarseneault/PhoneGap-Geofencing.git","ssh_url":"git@github.com:jarseneault/PhoneGap-Geofencing.git","clone_url":"https://github.com/jarseneault/PhoneGap-Geofencing.git","svn_url":"https://github.com/jarseneault/PhoneGap-Geofencing","homepage":null,"size":10934,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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":"master"}},"base":{"label":"radshag:master","ref":"master","sha":"11a4d3590f930520a265f253d229a092dc4c1618","user":{"login":"radshag","id":1615684,"avatar_url":"https://avatars.githubusercontent.com/u/1615684?v=3","gravatar_id":"","url":"https://api.github.com/users/radshag","html_url":"https://github.com/radshag","followers_url":"https://api.github.com/users/radshag/followers","following_url":"https://api.github.com/users/radshag/following{/other_user}","gists_url":"https://api.github.com/users/radshag/gists{/gist_id}","starred_url":"https://api.github.com/users/radshag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radshag/subscriptions","organizations_url":"https://api.github.com/users/radshag/orgs","repos_url":"https://api.github.com/users/radshag/repos","events_url":"https://api.github.com/users/radshag/events{/privacy}","received_events_url":"https://api.github.com/users/radshag/received_events","type":"User","site_admin":false},"repo":{"id":6258858,"name":"PhoneGap-Geofencing","full_name":"radshag/PhoneGap-Geofencing","owner":{"login":"radshag","id":1615684,"avatar_url":"https://avatars.githubusercontent.com/u/1615684?v=3","gravatar_id":"","url":"https://api.github.com/users/radshag","html_url":"https://github.com/radshag","followers_url":"https://api.github.com/users/radshag/followers","following_url":"https://api.github.com/users/radshag/following{/other_user}","gists_url":"https://api.github.com/users/radshag/gists{/gist_id}","starred_url":"https://api.github.com/users/radshag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radshag/subscriptions","organizations_url":"https://api.github.com/users/radshag/orgs","repos_url":"https://api.github.com/users/radshag/repos","events_url":"https://api.github.com/users/radshag/events{/privacy}","received_events_url":"https://api.github.com/users/radshag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/radshag/PhoneGap-Geofencing","description":"Geofencing Plugin For Phonegap","fork":false,"url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing","forks_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/forks","keys_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/teams","hooks_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/hooks","issue_events_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues/events{/number}","events_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/events","assignees_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/assignees{/user}","branches_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/branches{/branch}","tags_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/tags","blobs_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/git/refs{/sha}","trees_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/statuses/{sha}","languages_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/languages","stargazers_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/stargazers","contributors_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/contributors","subscribers_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/subscribers","subscription_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/subscription","commits_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/commits{/sha}","git_commits_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/git/commits{/sha}","comments_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/comments{/number}","issue_comment_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues/comments/{number}","contents_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/contents/{+path}","compare_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/merges","archive_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/downloads","issues_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues{/number}","pulls_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls{/number}","milestones_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/milestones{/number}","notifications_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/labels{/name}","releases_url":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/releases{/id}","created_at":"2012-10-17T09:26:56Z","updated_at":"2015-01-21T05:28:03Z","pushed_at":"2015-01-21T05:28:03Z","git_url":"git://github.com/radshag/PhoneGap-Geofencing.git","ssh_url":"git@github.com:radshag/PhoneGap-Geofencing.git","clone_url":"https://github.com/radshag/PhoneGap-Geofencing.git","svn_url":"https://github.com/radshag/PhoneGap-Geofencing","homepage":null,"size":11497,"stargazers_count":66,"watchers_count":66,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":29,"forks":45,"open_issues":29,"watchers":66,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/53"},"html":{"href":"https://github.com/radshag/PhoneGap-Geofencing/pull/53"},"issue":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues/53"},"comments":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/radshag/PhoneGap-Geofencing/statuses/1d11c700a3748f8597bf572998cb3295f88ab0c0"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"radshag","id":1615684,"avatar_url":"https://avatars.githubusercontent.com/u/1615684?v=3","gravatar_id":"","url":"https://api.github.com/users/radshag","html_url":"https://github.com/radshag","followers_url":"https://api.github.com/users/radshag/followers","following_url":"https://api.github.com/users/radshag/following{/other_user}","gists_url":"https://api.github.com/users/radshag/gists{/gist_id}","starred_url":"https://api.github.com/users/radshag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radshag/subscriptions","organizations_url":"https://api.github.com/users/radshag/orgs","repos_url":"https://api.github.com/users/radshag/repos","events_url":"https://api.github.com/users/radshag/events{/privacy}","received_events_url":"https://api.github.com/users/radshag/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":91,"deletions":53,"changed_files":1}}