{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/74043506","id":74043506,"diff_hunk":"@@ -56,7 +56,7 @@ def test_equality\n \n class OptionsTests < Homebrew::TestCase\n   def setup\n-    @options = Options.new\n+    @options = Options.create","path":"Library/Homebrew/test/test_options.rb","position":5,"original_position":5,"commit_id":"7d58fc51a5f268c7ba5724b2cec7eb36fbed8864","original_commit_id":"8e4c9b4ad57912ecb0305810639f98064c656322","user":{"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},"body":"That syntax seems better to me. Another option is to have `Option.from_hash` and `Options.from_array` methods.\r\n\r\n\r\n\r\n> As it's worthy to mention that Options.create has been there long before this PR.\r\n\r\nSure and it may be worth removing. My main complaints are that you're have to alter so many tests to use it and stating that it shouldn't be used without using anything like `private` to ensure it is not.","created_at":"2016-08-09T11:56:24Z","updated_at":"2016-08-09T11:56:24Z","html_url":"https://github.com/Homebrew/brew/pull/566#discussion_r74043506","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/566","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/74043506"},"html":{"href":"https://github.com/Homebrew/brew/pull/566#discussion_r74043506"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/566"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/566","id":78266033,"html_url":"https://github.com/Homebrew/brew/pull/566","diff_url":"https://github.com/Homebrew/brew/pull/566.diff","patch_url":"https://github.com/Homebrew/brew/pull/566.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/566","number":566,"state":"open","locked":false,"title":"Option: also store value","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"body":"This fixes long term problem that `brew install` fails to remember the\r\nvalue part of args like `--with-foo=bar` passed by users. As result,\r\nsuch value will not be preserved when invoking `brew reinstall` or\r\n`brew upgrade`.\r\n\r\nA real formula example can be `homebrew/science/abyss`.\r\n\r\nSince there may have two options sharing the same name but different\r\nvalues. We will have to use Hash instead of set for `Options` object.\r\nThe Hash will be a map between option name to option object. When\r\nmerging options under the same name, we choose to keep old option if\r\npossible unless the new option has a value while the old one doesn't.","created_at":"2016-07-21T06:50:55Z","updated_at":"2016-08-09T11:56:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"292da558e9a27eae7a1b941fee200c054de3586f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/566/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/566/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/566/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/7d58fc51a5f268c7ba5724b2cec7eb36fbed8864","head":{"label":"xu-cheng:option-arg-value","ref":"option-arg-value","sha":"7d58fc51a5f268c7ba5724b2cec7eb36fbed8864","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"repo":{"id":53240163,"name":"brew","full_name":"xu-cheng/brew","owner":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xu-cheng/brew","description":":beer: The missing package manager for OS X","fork":true,"url":"https://api.github.com/repos/xu-cheng/brew","forks_url":"https://api.github.com/repos/xu-cheng/brew/forks","keys_url":"https://api.github.com/repos/xu-cheng/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xu-cheng/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xu-cheng/brew/teams","hooks_url":"https://api.github.com/repos/xu-cheng/brew/hooks","issue_events_url":"https://api.github.com/repos/xu-cheng/brew/issues/events{/number}","events_url":"https://api.github.com/repos/xu-cheng/brew/events","assignees_url":"https://api.github.com/repos/xu-cheng/brew/assignees{/user}","branches_url":"https://api.github.com/repos/xu-cheng/brew/branches{/branch}","tags_url":"https://api.github.com/repos/xu-cheng/brew/tags","blobs_url":"https://api.github.com/repos/xu-cheng/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xu-cheng/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xu-cheng/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/xu-cheng/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xu-cheng/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/xu-cheng/brew/languages","stargazers_url":"https://api.github.com/repos/xu-cheng/brew/stargazers","contributors_url":"https://api.github.com/repos/xu-cheng/brew/contributors","subscribers_url":"https://api.github.com/repos/xu-cheng/brew/subscribers","subscription_url":"https://api.github.com/repos/xu-cheng/brew/subscription","commits_url":"https://api.github.com/repos/xu-cheng/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/xu-cheng/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/xu-cheng/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/xu-cheng/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/xu-cheng/brew/contents/{+path}","compare_url":"https://api.github.com/repos/xu-cheng/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xu-cheng/brew/merges","archive_url":"https://api.github.com/repos/xu-cheng/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xu-cheng/brew/downloads","issues_url":"https://api.github.com/repos/xu-cheng/brew/issues{/number}","pulls_url":"https://api.github.com/repos/xu-cheng/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/xu-cheng/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/xu-cheng/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xu-cheng/brew/labels{/name}","releases_url":"https://api.github.com/repos/xu-cheng/brew/releases{/id}","deployments_url":"https://api.github.com/repos/xu-cheng/brew/deployments","created_at":"2016-03-06T05:54:41Z","updated_at":"2016-06-15T06:28:26Z","pushed_at":"2016-08-09T11:16:43Z","git_url":"git://github.com/xu-cheng/brew.git","ssh_url":"git@github.com:xu-cheng/brew.git","clone_url":"https://github.com/xu-cheng/brew.git","svn_url":"https://github.com/xu-cheng/brew","homepage":"","size":10484,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"Homebrew:master","ref":"master","sha":"38209aadbfe4fd0c6772467c4bc5c63325d53f6c","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":53238813,"name":"brew","full_name":"Homebrew/brew","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/brew","description":":beer: The missing package manager for OS X","fork":false,"url":"https://api.github.com/repos/Homebrew/brew","forks_url":"https://api.github.com/repos/Homebrew/brew/forks","keys_url":"https://api.github.com/repos/Homebrew/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/brew/teams","hooks_url":"https://api.github.com/repos/Homebrew/brew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/brew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/brew/events","assignees_url":"https://api.github.com/repos/Homebrew/brew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/brew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/brew/tags","blobs_url":"https://api.github.com/repos/Homebrew/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/brew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/brew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/brew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/brew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/brew/subscription","commits_url":"https://api.github.com/repos/Homebrew/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/brew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/brew/merges","archive_url":"https://api.github.com/repos/Homebrew/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/brew/downloads","issues_url":"https://api.github.com/repos/Homebrew/brew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/brew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/brew/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/brew/deployments","created_at":"2016-03-06T05:08:38Z","updated_at":"2016-08-09T11:00:46Z","pushed_at":"2016-08-09T09:00:50Z","git_url":"git://github.com/Homebrew/brew.git","ssh_url":"git@github.com:Homebrew/brew.git","clone_url":"https://github.com/Homebrew/brew.git","svn_url":"https://github.com/Homebrew/brew","homepage":"http://brew.sh","size":10995,"stargazers_count":2464,"watchers_count":2464,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":709,"mirror_url":null,"open_issues_count":64,"forks":709,"open_issues":64,"watchers":2464,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/566"},"html":{"href":"https://github.com/Homebrew/brew/pull/566"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/566"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/566/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/566/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/566/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/7d58fc51a5f268c7ba5724b2cec7eb36fbed8864"}}}}
{"actor":{"display_login":"MikeMcQuaid"}}