{"action":"closed","number":29,"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/29","id":54427523,"html_url":"https://github.com/Homebrew/homebrew-services/pull/29","diff_url":"https://github.com/Homebrew/homebrew-services/pull/29.diff","patch_url":"https://github.com/Homebrew/homebrew-services/pull/29.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew-services/issues/29","number":29,"state":"closed","locked":false,"title":"Refactor out the use of global variables","user":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"body":"Hey,\r\n\r\nThis PR shouldn't change the existing behaviour, it just reduces the number of global variables used by passing target directly into the method. Also makes the `restart` method much nicer.\r\n\r\nNotice the use of `Array(x)` vs `[x]`, these do not have the same effect. `Array(x)` won't wrap a passed in array, while `[x]` will do that:\r\n\r\n```ruby\r\nirb(main):001:0> Array(1) == Array([1])\r\n=> true\r\nirb(main):002:0> [1] == [[1]]\r\n=> false\r\n```","created_at":"2015-12-22T23:37:34Z","updated_at":"2015-12-27T20:53:29Z","closed_at":"2015-12-27T20:53:29Z","merged_at":"2015-12-27T20:53:29Z","merge_commit_sha":"a486398be0e102903ca6ce7e9ccab9cb534204f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/29/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/29/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-services/issues/29/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew-services/statuses/ab97c3329897fda13a3729923d12652cc6b217cb","head":{"label":"antstorm:refactor-global-variables","ref":"refactor-global-variables","sha":"ab97c3329897fda13a3729923d12652cc6b217cb","user":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"repo":{"id":47078080,"name":"homebrew-services","full_name":"antstorm/homebrew-services","owner":{"login":"antstorm","id":118353,"avatar_url":"https://avatars.githubusercontent.com/u/118353?v=3","gravatar_id":"","url":"https://api.github.com/users/antstorm","html_url":"https://github.com/antstorm","followers_url":"https://api.github.com/users/antstorm/followers","following_url":"https://api.github.com/users/antstorm/following{/other_user}","gists_url":"https://api.github.com/users/antstorm/gists{/gist_id}","starred_url":"https://api.github.com/users/antstorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antstorm/subscriptions","organizations_url":"https://api.github.com/users/antstorm/orgs","repos_url":"https://api.github.com/users/antstorm/repos","events_url":"https://api.github.com/users/antstorm/events{/privacy}","received_events_url":"https://api.github.com/users/antstorm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antstorm/homebrew-services","description":":rocket: Starts Homebrew formulae's plists with launchctl.","fork":true,"url":"https://api.github.com/repos/antstorm/homebrew-services","forks_url":"https://api.github.com/repos/antstorm/homebrew-services/forks","keys_url":"https://api.github.com/repos/antstorm/homebrew-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antstorm/homebrew-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antstorm/homebrew-services/teams","hooks_url":"https://api.github.com/repos/antstorm/homebrew-services/hooks","issue_events_url":"https://api.github.com/repos/antstorm/homebrew-services/issues/events{/number}","events_url":"https://api.github.com/repos/antstorm/homebrew-services/events","assignees_url":"https://api.github.com/repos/antstorm/homebrew-services/assignees{/user}","branches_url":"https://api.github.com/repos/antstorm/homebrew-services/branches{/branch}","tags_url":"https://api.github.com/repos/antstorm/homebrew-services/tags","blobs_url":"https://api.github.com/repos/antstorm/homebrew-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antstorm/homebrew-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antstorm/homebrew-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/antstorm/homebrew-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antstorm/homebrew-services/statuses/{sha}","languages_url":"https://api.github.com/repos/antstorm/homebrew-services/languages","stargazers_url":"https://api.github.com/repos/antstorm/homebrew-services/stargazers","contributors_url":"https://api.github.com/repos/antstorm/homebrew-services/contributors","subscribers_url":"https://api.github.com/repos/antstorm/homebrew-services/subscribers","subscription_url":"https://api.github.com/repos/antstorm/homebrew-services/subscription","commits_url":"https://api.github.com/repos/antstorm/homebrew-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/antstorm/homebrew-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/antstorm/homebrew-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/antstorm/homebrew-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/antstorm/homebrew-services/contents/{+path}","compare_url":"https://api.github.com/repos/antstorm/homebrew-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antstorm/homebrew-services/merges","archive_url":"https://api.github.com/repos/antstorm/homebrew-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antstorm/homebrew-services/downloads","issues_url":"https://api.github.com/repos/antstorm/homebrew-services/issues{/number}","pulls_url":"https://api.github.com/repos/antstorm/homebrew-services/pulls{/number}","milestones_url":"https://api.github.com/repos/antstorm/homebrew-services/milestones{/number}","notifications_url":"https://api.github.com/repos/antstorm/homebrew-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antstorm/homebrew-services/labels{/name}","releases_url":"https://api.github.com/repos/antstorm/homebrew-services/releases{/id}","created_at":"2015-11-29T20:00:51Z","updated_at":"2015-11-29T20:00:51Z","pushed_at":"2015-12-22T23:41:52Z","git_url":"git://github.com/antstorm/homebrew-services.git","ssh_url":"git@github.com:antstorm/homebrew-services.git","clone_url":"https://github.com/antstorm/homebrew-services.git","svn_url":"https://github.com/antstorm/homebrew-services","homepage":"","size":25,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Homebrew:master","ref":"master","sha":"0f7b1bf7efcaaee40488bd6be6974e8c391b5b34","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":24924435,"name":"homebrew-services","full_name":"Homebrew/homebrew-services","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/homebrew-services","description":":rocket: Starts Homebrew formulae's plists with launchctl.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew-services","forks_url":"https://api.github.com/repos/Homebrew/homebrew-services/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew-services/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew-services/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew-services/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew-services/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew-services/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew-services/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew-services/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew-services/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew-services/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew-services/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew-services/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew-services/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew-services/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew-services/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew-services/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew-services/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew-services/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew-services/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew-services/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew-services/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew-services/releases{/id}","created_at":"2014-10-08T04:22:00Z","updated_at":"2015-12-23T22:15:39Z","pushed_at":"2015-12-27T20:53:29Z","git_url":"git://github.com/Homebrew/homebrew-services.git","ssh_url":"git@github.com:Homebrew/homebrew-services.git","clone_url":"https://github.com/Homebrew/homebrew-services.git","svn_url":"https://github.com/Homebrew/homebrew-services","homepage":"","size":33,"stargazers_count":313,"watchers_count":313,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":1,"forks":19,"open_issues":1,"watchers":313,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/29"},"html":{"href":"https://github.com/Homebrew/homebrew-services/pull/29"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/issues/29"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew-services/statuses/ab97c3329897fda13a3729923d12652cc6b217cb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mikemcquaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemcquaid","html_url":"https://github.com/mikemcquaid","followers_url":"https://api.github.com/users/mikemcquaid/followers","following_url":"https://api.github.com/users/mikemcquaid/following{/other_user}","gists_url":"https://api.github.com/users/mikemcquaid/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemcquaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemcquaid/subscriptions","organizations_url":"https://api.github.com/users/mikemcquaid/orgs","repos_url":"https://api.github.com/users/mikemcquaid/repos","events_url":"https://api.github.com/users/mikemcquaid/events{/privacy}","received_events_url":"https://api.github.com/users/mikemcquaid/received_events","type":"User","site_admin":true},"comments":1,"review_comments":2,"commits":2,"additions":32,"deletions":56,"changed_files":1}}