{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/47760069","id":47760069,"diff_hunk":"@@ -58,15 +59,18 @@ def install\n     args << \"--with-perl\" if build.with? \"perl\"\n     args << \"--with-webp=yes\" if build.with? \"webp\"\n \n-    if build.with? \"quantum-depth-32\"\n-      quantum_depth = 32\n-    elsif build.with? \"quantum-depth-16\"\n+    quantum_depth = { 8 => (build.with? \"quantum-depth-8\"),\n+                     16 => (build.with? \"quantum-depth-16\"),\n+                     32 => (build.with? \"quantum-depth-32\")}.select{|key, val| val}\n+    if quantum_depth.size == 0\n       quantum_depth = 16\n-    elsif build.with? \"quantum-depth-8\"\n-      quantum_depth = 8\n+    elsif quantum_depth.size == 1\n+      quantum_depth = quantum_depth.keys[0]\n+    else\n+      odie \"graphicsmagick: --with-quantum-depth-X options are mutually exclusive\"","path":"Library/Formula/graphicsmagick.rb","position":34,"original_position":34,"commit_id":"05d3ba1e8c68262df9e479d6c4ce880682c5d905","original_commit_id":"05d3ba1e8c68262df9e479d6c4ce880682c5d905","user":{"login":"UniqMartin","id":11892150,"avatar_url":"https://avatars.githubusercontent.com/u/11892150?v=3","gravatar_id":"","url":"https://api.github.com/users/UniqMartin","html_url":"https://github.com/UniqMartin","followers_url":"https://api.github.com/users/UniqMartin/followers","following_url":"https://api.github.com/users/UniqMartin/following{/other_user}","gists_url":"https://api.github.com/users/UniqMartin/gists{/gist_id}","starred_url":"https://api.github.com/users/UniqMartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniqMartin/subscriptions","organizations_url":"https://api.github.com/users/UniqMartin/orgs","repos_url":"https://api.github.com/users/UniqMartin/repos","events_url":"https://api.github.com/users/UniqMartin/events{/privacy}","received_events_url":"https://api.github.com/users/UniqMartin/received_events","type":"User","site_admin":false},"body":"This part seems a bit convoluted/repetitive and there's really no reason to use a hash. Here's what I would suggest:\r\n\r\n```ruby\r\nquantum_depth = [8, 16, 32].select { |n| build.with? \"quantum-depth-#{n}\" }\r\nif quantum_depth.length > 1\r\n  odie \"graphicsmagick: --with-quantum-depth-X options are mutually exclusive\"\r\nend\r\nquantum_depth = quantum_depth.first || 16 # user choice or default\r\n```","created_at":"2015-12-16T10:36:35Z","updated_at":"2015-12-16T10:36:35Z","html_url":"https://github.com/Homebrew/homebrew/pull/47014#discussion_r47760069","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/47760069"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/47014#discussion_r47760069"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014","id":53607526,"html_url":"https://github.com/Homebrew/homebrew/pull/47014","diff_url":"https://github.com/Homebrew/homebrew/pull/47014.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/47014.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/47014","number":47014,"state":"open","locked":false,"title":"graphicsmagick: set default quantum-depth to 16 (issue #46101 and #46248)","user":{"login":"carandraug","id":916140,"avatar_url":"https://avatars.githubusercontent.com/u/916140?v=3","gravatar_id":"","url":"https://api.github.com/users/carandraug","html_url":"https://github.com/carandraug","followers_url":"https://api.github.com/users/carandraug/followers","following_url":"https://api.github.com/users/carandraug/following{/other_user}","gists_url":"https://api.github.com/users/carandraug/gists{/gist_id}","starred_url":"https://api.github.com/users/carandraug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carandraug/subscriptions","organizations_url":"https://api.github.com/users/carandraug/orgs","repos_url":"https://api.github.com/users/carandraug/repos","events_url":"https://api.github.com/users/carandraug/events{/privacy}","received_events_url":"https://api.github.com/users/carandraug/received_events","type":"User","site_admin":false},"body":"This was originally discussed on issue #46101 which led to pull request #46248 . This was then discussed one more time and asked to reopen as new pull request with further changes (because the issue was closed, github does not update with more changes). This pull request addresses the following issues (in addition to the original issue of course):\r\n\r\n* bumping revision number to force rebuild of dependants\r\n* error out when incompatible options are passed (this issue already existed before)\r\n\r\nbut please see discussion on the originals reports. I will also open a bug report on `homebrew/science` and `homebrew/x11`.","created_at":"2015-12-14T19:08:09Z","updated_at":"2015-12-16T10:36:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa5653d476c2ca6701ff88b4e67b77108c15fbe1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/47014/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/05d3ba1e8c68262df9e479d6c4ce880682c5d905","head":{"label":"carandraug:gm-q16-issue-46101","ref":"gm-q16-issue-46101","sha":"05d3ba1e8c68262df9e479d6c4ce880682c5d905","user":{"login":"carandraug","id":916140,"avatar_url":"https://avatars.githubusercontent.com/u/916140?v=3","gravatar_id":"","url":"https://api.github.com/users/carandraug","html_url":"https://github.com/carandraug","followers_url":"https://api.github.com/users/carandraug/followers","following_url":"https://api.github.com/users/carandraug/following{/other_user}","gists_url":"https://api.github.com/users/carandraug/gists{/gist_id}","starred_url":"https://api.github.com/users/carandraug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carandraug/subscriptions","organizations_url":"https://api.github.com/users/carandraug/orgs","repos_url":"https://api.github.com/users/carandraug/repos","events_url":"https://api.github.com/users/carandraug/events{/privacy}","received_events_url":"https://api.github.com/users/carandraug/received_events","type":"User","site_admin":false},"repo":{"id":46451476,"name":"homebrew","full_name":"carandraug/homebrew","owner":{"login":"carandraug","id":916140,"avatar_url":"https://avatars.githubusercontent.com/u/916140?v=3","gravatar_id":"","url":"https://api.github.com/users/carandraug","html_url":"https://github.com/carandraug","followers_url":"https://api.github.com/users/carandraug/followers","following_url":"https://api.github.com/users/carandraug/following{/other_user}","gists_url":"https://api.github.com/users/carandraug/gists{/gist_id}","starred_url":"https://api.github.com/users/carandraug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carandraug/subscriptions","organizations_url":"https://api.github.com/users/carandraug/orgs","repos_url":"https://api.github.com/users/carandraug/repos","events_url":"https://api.github.com/users/carandraug/events{/privacy}","received_events_url":"https://api.github.com/users/carandraug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carandraug/homebrew","description":":beer: The missing package manager for OS X.","fork":true,"url":"https://api.github.com/repos/carandraug/homebrew","forks_url":"https://api.github.com/repos/carandraug/homebrew/forks","keys_url":"https://api.github.com/repos/carandraug/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carandraug/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carandraug/homebrew/teams","hooks_url":"https://api.github.com/repos/carandraug/homebrew/hooks","issue_events_url":"https://api.github.com/repos/carandraug/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/carandraug/homebrew/events","assignees_url":"https://api.github.com/repos/carandraug/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/carandraug/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/carandraug/homebrew/tags","blobs_url":"https://api.github.com/repos/carandraug/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carandraug/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carandraug/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/carandraug/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carandraug/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/carandraug/homebrew/languages","stargazers_url":"https://api.github.com/repos/carandraug/homebrew/stargazers","contributors_url":"https://api.github.com/repos/carandraug/homebrew/contributors","subscribers_url":"https://api.github.com/repos/carandraug/homebrew/subscribers","subscription_url":"https://api.github.com/repos/carandraug/homebrew/subscription","commits_url":"https://api.github.com/repos/carandraug/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/carandraug/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/carandraug/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/carandraug/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/carandraug/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/carandraug/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carandraug/homebrew/merges","archive_url":"https://api.github.com/repos/carandraug/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carandraug/homebrew/downloads","issues_url":"https://api.github.com/repos/carandraug/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/carandraug/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/carandraug/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/carandraug/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carandraug/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/carandraug/homebrew/releases{/id}","created_at":"2015-11-18T22:24:44Z","updated_at":"2015-11-18T22:25:13Z","pushed_at":"2015-12-14T21:14:20Z","git_url":"git://github.com/carandraug/homebrew.git","ssh_url":"git@github.com:carandraug/homebrew.git","clone_url":"https://github.com/carandraug/homebrew.git","svn_url":"https://github.com/carandraug/homebrew","homepage":"http://brew.sh","size":61218,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"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":"82879d8b002d8e2ba70807cacbcc88086f62686f","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":206084,"name":"homebrew","full_name":"Homebrew/homebrew","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","description":":beer: The missing package manager for OS X.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew","forks_url":"https://api.github.com/repos/Homebrew/homebrew/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew/releases{/id}","created_at":"2009-05-20T19:38:37Z","updated_at":"2015-12-16T10:08:52Z","pushed_at":"2015-12-16T09:31:47Z","git_url":"git://github.com/Homebrew/homebrew.git","ssh_url":"git@github.com:Homebrew/homebrew.git","clone_url":"https://github.com/Homebrew/homebrew.git","svn_url":"https://github.com/Homebrew/homebrew","homepage":"http://brew.sh","size":1400067,"stargazers_count":27916,"watchers_count":27916,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":13824,"mirror_url":null,"open_issues_count":452,"forks":13824,"open_issues":452,"watchers":27916,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/47014"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/47014"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/47014/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/47014/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew/statuses/05d3ba1e8c68262df9e479d6c4ce880682c5d905"}}}}