{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/comments/176014215","pull_request_review_id":105640073,"id":176014215,"diff_hunk":"@@ -1169,4 +1166,11 @@ def self.detect_from_symbol(symbol)\n       raise \"Unknown download strategy #{symbol} was requested.\"\n     end\n   end\n+\n+  def self.require_aws_sdk\n+    require \"aws-sdk-s3\"\n+  rescue LoadError\n+    Homebrew.install_gem_setup_path! \"aws-sdk-s3\", \"~> 1.8\", \"ruby\"","path":"Library/Homebrew/download_strategy.rb","position":65,"original_position":65,"commit_id":"fd915ae7424e8673f48c3d1ef98d999cb60a633e","original_commit_id":"fd915ae7424e8673f48c3d1ef98d999cb60a633e","user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars2.githubusercontent.com/u/125011?v=4","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":"Don't pass `ruby` here.","created_at":"2018-03-21T09:01:57Z","updated_at":"2018-03-21T09:02:31Z","html_url":"https://github.com/Homebrew/brew/pull/3949#discussion_r176014215","pull_request_url":"https://api.github.com/repos/Homebrew/brew/pulls/3949","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments/176014215"},"html":{"href":"https://github.com/Homebrew/brew/pull/3949#discussion_r176014215"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3949"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/brew/pulls/3949","id":176329652,"html_url":"https://github.com/Homebrew/brew/pull/3949","diff_url":"https://github.com/Homebrew/brew/pull/3949.diff","patch_url":"https://github.com/Homebrew/brew/pull/3949.patch","issue_url":"https://api.github.com/repos/Homebrew/brew/issues/3949","number":3949,"state":"open","locked":false,"title":"Upgraded use of AWS Ruby SDK for S3","user":{"login":"amancevice","id":157711,"avatar_url":"https://avatars0.githubusercontent.com/u/157711?v=4","gravatar_id":"","url":"https://api.github.com/users/amancevice","html_url":"https://github.com/amancevice","followers_url":"https://api.github.com/users/amancevice/followers","following_url":"https://api.github.com/users/amancevice/following{/other_user}","gists_url":"https://api.github.com/users/amancevice/gists{/gist_id}","starred_url":"https://api.github.com/users/amancevice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amancevice/subscriptions","organizations_url":"https://api.github.com/users/amancevice/orgs","repos_url":"https://api.github.com/users/amancevice/repos","events_url":"https://api.github.com/users/amancevice/events{/privacy}","received_events_url":"https://api.github.com/users/amancevice/received_events","type":"User","site_admin":false},"body":"`DownloadStrategyDetector` now detects URLs with the `s3://` prefix, e.g.:\r\n\r\n ```\r\ns3://my-bucket/path/to/key/tarball.tar.gz\r\n```\r\n\r\nWhen `S3DownloadStrategy` is detected in `DownloadStrategyDetector`, an attempt is made to require the `aws-sdk-s3` gem.\r\n\r\nIf the attempt fails it is installed using `Homebrew.install_gem_setup_path!` and required after installing.\r\n\r\nThe AWS S3 SDK is used to sign the URL and handed off to `curl_download`.\r\n\r\nThis PR is meant as a companion to https://github.com/Homebrew/brew/pull/3841.\r\n\r\nATTN @MikeMcQuaid, I couldn't figure out how to do this in `formula_installer.rb` because I don't think the `formula` object has access to the `@url` of the formula at that time. However, I think putting it in the `DownloadStrategyDetector` effectively front-runs the sandbox.\r\n\r\nI'm a newbie when it comes to writing rspec tests so I've done a pretty barebones job at this. If I get some guidance I can expand the tests.\r\n\r\n- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?\r\n- [x] Have you added an explanation of what your changes do and why you'd like us to include them?\r\n- [x] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/homebrew/pull/49031).\r\n- [x] Have you successfully run `brew style` with your changes locally?\r\n- [x] Have you successfully run `brew tests` with your changes locally?\r\n\r\n-----","created_at":"2018-03-20T21:36:52Z","updated_at":"2018-03-21T09:02:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce0386807b969481eb64b70299632ebd23fbba6f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/brew/pulls/3949/commits","review_comments_url":"https://api.github.com/repos/Homebrew/brew/pulls/3949/comments","review_comment_url":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/brew/issues/3949/comments","statuses_url":"https://api.github.com/repos/Homebrew/brew/statuses/fd915ae7424e8673f48c3d1ef98d999cb60a633e","head":{"label":"amancevice:aws-sdk-s3","ref":"aws-sdk-s3","sha":"fd915ae7424e8673f48c3d1ef98d999cb60a633e","user":{"login":"amancevice","id":157711,"avatar_url":"https://avatars0.githubusercontent.com/u/157711?v=4","gravatar_id":"","url":"https://api.github.com/users/amancevice","html_url":"https://github.com/amancevice","followers_url":"https://api.github.com/users/amancevice/followers","following_url":"https://api.github.com/users/amancevice/following{/other_user}","gists_url":"https://api.github.com/users/amancevice/gists{/gist_id}","starred_url":"https://api.github.com/users/amancevice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amancevice/subscriptions","organizations_url":"https://api.github.com/users/amancevice/orgs","repos_url":"https://api.github.com/users/amancevice/repos","events_url":"https://api.github.com/users/amancevice/events{/privacy}","received_events_url":"https://api.github.com/users/amancevice/received_events","type":"User","site_admin":false},"repo":{"id":126080765,"name":"brew","full_name":"amancevice/brew","owner":{"login":"amancevice","id":157711,"avatar_url":"https://avatars0.githubusercontent.com/u/157711?v=4","gravatar_id":"","url":"https://api.github.com/users/amancevice","html_url":"https://github.com/amancevice","followers_url":"https://api.github.com/users/amancevice/followers","following_url":"https://api.github.com/users/amancevice/following{/other_user}","gists_url":"https://api.github.com/users/amancevice/gists{/gist_id}","starred_url":"https://api.github.com/users/amancevice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amancevice/subscriptions","organizations_url":"https://api.github.com/users/amancevice/orgs","repos_url":"https://api.github.com/users/amancevice/repos","events_url":"https://api.github.com/users/amancevice/events{/privacy}","received_events_url":"https://api.github.com/users/amancevice/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amancevice/brew","description":"🍺 The missing package manager for macOS","fork":true,"url":"https://api.github.com/repos/amancevice/brew","forks_url":"https://api.github.com/repos/amancevice/brew/forks","keys_url":"https://api.github.com/repos/amancevice/brew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amancevice/brew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amancevice/brew/teams","hooks_url":"https://api.github.com/repos/amancevice/brew/hooks","issue_events_url":"https://api.github.com/repos/amancevice/brew/issues/events{/number}","events_url":"https://api.github.com/repos/amancevice/brew/events","assignees_url":"https://api.github.com/repos/amancevice/brew/assignees{/user}","branches_url":"https://api.github.com/repos/amancevice/brew/branches{/branch}","tags_url":"https://api.github.com/repos/amancevice/brew/tags","blobs_url":"https://api.github.com/repos/amancevice/brew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amancevice/brew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amancevice/brew/git/refs{/sha}","trees_url":"https://api.github.com/repos/amancevice/brew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amancevice/brew/statuses/{sha}","languages_url":"https://api.github.com/repos/amancevice/brew/languages","stargazers_url":"https://api.github.com/repos/amancevice/brew/stargazers","contributors_url":"https://api.github.com/repos/amancevice/brew/contributors","subscribers_url":"https://api.github.com/repos/amancevice/brew/subscribers","subscription_url":"https://api.github.com/repos/amancevice/brew/subscription","commits_url":"https://api.github.com/repos/amancevice/brew/commits{/sha}","git_commits_url":"https://api.github.com/repos/amancevice/brew/git/commits{/sha}","comments_url":"https://api.github.com/repos/amancevice/brew/comments{/number}","issue_comment_url":"https://api.github.com/repos/amancevice/brew/issues/comments{/number}","contents_url":"https://api.github.com/repos/amancevice/brew/contents/{+path}","compare_url":"https://api.github.com/repos/amancevice/brew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amancevice/brew/merges","archive_url":"https://api.github.com/repos/amancevice/brew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amancevice/brew/downloads","issues_url":"https://api.github.com/repos/amancevice/brew/issues{/number}","pulls_url":"https://api.github.com/repos/amancevice/brew/pulls{/number}","milestones_url":"https://api.github.com/repos/amancevice/brew/milestones{/number}","notifications_url":"https://api.github.com/repos/amancevice/brew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amancevice/brew/labels{/name}","releases_url":"https://api.github.com/repos/amancevice/brew/releases{/id}","deployments_url":"https://api.github.com/repos/amancevice/brew/deployments","created_at":"2018-03-20T20:50:31Z","updated_at":"2018-03-20T20:50:36Z","pushed_at":"2018-03-20T23:53:00Z","git_url":"git://github.com/amancevice/brew.git","ssh_url":"git@github.com:amancevice/brew.git","clone_url":"https://github.com/amancevice/brew.git","svn_url":"https://github.com/amancevice/brew","homepage":"https://brew.sh","size":23088,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"540f1545c380d3e7a04dba1557829943f805cb0c","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars2.githubusercontent.com/u/1503512?v=4","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://avatars2.githubusercontent.com/u/1503512?v=4","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":"🍺 The missing package manager for macOS","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":"2018-03-21T08:56:48Z","pushed_at":"2018-03-21T08:56:40Z","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":"https://brew.sh","size":23091,"stargazers_count":11513,"watchers_count":11513,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2729,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":2729,"open_issues":30,"watchers":11513,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3949"},"html":{"href":"https://github.com/Homebrew/brew/pull/3949"},"issue":{"href":"https://api.github.com/repos/Homebrew/brew/issues/3949"},"comments":{"href":"https://api.github.com/repos/Homebrew/brew/issues/3949/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3949/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/brew/pulls/3949/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/brew/statuses/fd915ae7424e8673f48c3d1ef98d999cb60a633e"}},"author_association":"NONE"}}
{"actor":{"display_login":"MikeMcQuaid"}}