{"action":"created","comment":{"url":"https://api.github.com/repos/rbenv/ruby-build/pulls/comments/47434803","id":47434803,"diff_hunk":"@@ -101,3 +101,20 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com\n   unstub curl\n   unstub shasum\n }\n+\n+\n+@test \"package URL with ruby-lang CDN with default mirror URL will bypasses mirror\" {\n+  export RUBY_BUILD_MIRROR_URL=\n+  local checksum=\"ba988b1bb4250dee0b9dd3d4d722f9c64b2bacfc805d1b6eba7426bda72dd3c5\"\n+\n+  stub shasum true \"echo $checksum\"\n+  stub curl \"-q -o * -*S* https://cache.ruby-lang.org/* : cp $FIXTURE_ROOT/\\${5##*/} \\$3\"\n+\n+  install_fixture definitions/skip-mirror\n+  echo \"$output\" >&2\n+  [ \"$status\" -eq 0 ]","path":"test/mirror.bats","position":15,"original_position":15,"commit_id":"a09ecc27e4f7471a7da0b3ee8a67d7ca0388a284","original_commit_id":"a09ecc27e4f7471a7da0b3ee8a67d7ca0388a284","user":{"login":"mislav","id":887,"avatar_url":"https://avatars.githubusercontent.com/u/887?v=3","gravatar_id":"","url":"https://api.github.com/users/mislav","html_url":"https://github.com/mislav","followers_url":"https://api.github.com/users/mislav/followers","following_url":"https://api.github.com/users/mislav/following{/other_user}","gists_url":"https://api.github.com/users/mislav/gists{/gist_id}","starred_url":"https://api.github.com/users/mislav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mislav/subscriptions","organizations_url":"https://api.github.com/users/mislav/orgs","repos_url":"https://api.github.com/users/mislav/repos","events_url":"https://api.github.com/users/mislav/events{/privacy}","received_events_url":"https://api.github.com/users/mislav/received_events","type":"User","site_admin":true},"body":"`assert_success` reads nicer","created_at":"2015-12-12T18:10:08Z","updated_at":"2015-12-12T18:10:08Z","html_url":"https://github.com/rbenv/ruby-build/pull/847#discussion_r47434803","pull_request_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/847","_links":{"self":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/comments/47434803"},"html":{"href":"https://github.com/rbenv/ruby-build/pull/847#discussion_r47434803"},"pull_request":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/847"}}},"pull_request":{"url":"https://api.github.com/repos/rbenv/ruby-build/pulls/847","id":53368893,"html_url":"https://github.com/rbenv/ruby-build/pull/847","diff_url":"https://github.com/rbenv/ruby-build/pull/847.diff","patch_url":"https://github.com/rbenv/ruby-build/pull/847.patch","issue_url":"https://api.github.com/repos/rbenv/ruby-build/issues/847","number":847,"state":"open","locked":false,"title":"Skip mirrors for CRuby since they're on CDN","user":{"login":"miyagawa","id":3499,"avatar_url":"https://avatars.githubusercontent.com/u/3499?v=3","gravatar_id":"","url":"https://api.github.com/users/miyagawa","html_url":"https://github.com/miyagawa","followers_url":"https://api.github.com/users/miyagawa/followers","following_url":"https://api.github.com/users/miyagawa/following{/other_user}","gists_url":"https://api.github.com/users/miyagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/miyagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miyagawa/subscriptions","organizations_url":"https://api.github.com/users/miyagawa/orgs","repos_url":"https://api.github.com/users/miyagawa/repos","events_url":"https://api.github.com/users/miyagawa/events{/privacy}","received_events_url":"https://api.github.com/users/miyagawa/received_events","type":"User","site_admin":false},"body":"Similar to #846 but addresses @mislav's concerns on custom mirror users :)\r\n\r\nThis patch skips using the default mirror for CRuby tarballs, because they're hosted on its own CDN.\r\n\r\nThis PR does nothing for users who currently set `RUBY_BUILD_MIRROR_URL` to cache downloads for instance in their local mirror. The mirror is skipped only when a) mirror URL is not specified and b) the tarball is on cahe.ruby-lang.org, the official CDN for ruby binary downloads.\r\n\r\nRationale:\r\n* #240 shows that the mirror support came out of a frustration of waiting for slow downloads of ftp.ruby-lang.org. That's not a problem now!\r\n* I know we validate all downloads via shasum check, but the console output of  `https://dqw8nmjcqpjn7.cloudfront.net/<shasum>` is just not a good user experience over `https://cache.ruby-lang.org/.../ruby-2.3.0.tar.gz`","created_at":"2015-12-11T09:13:19Z","updated_at":"2015-12-12T18:10:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc5d9ac40c72dcd9f2edcd89b3d1c0ee51a93639","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/847/commits","review_comments_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/847/comments","review_comment_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rbenv/ruby-build/issues/847/comments","statuses_url":"https://api.github.com/repos/rbenv/ruby-build/statuses/a09ecc27e4f7471a7da0b3ee8a67d7ca0388a284","head":{"label":"miyagawa:skip-mirror-ruby","ref":"skip-mirror-ruby","sha":"a09ecc27e4f7471a7da0b3ee8a67d7ca0388a284","user":{"login":"miyagawa","id":3499,"avatar_url":"https://avatars.githubusercontent.com/u/3499?v=3","gravatar_id":"","url":"https://api.github.com/users/miyagawa","html_url":"https://github.com/miyagawa","followers_url":"https://api.github.com/users/miyagawa/followers","following_url":"https://api.github.com/users/miyagawa/following{/other_user}","gists_url":"https://api.github.com/users/miyagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/miyagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miyagawa/subscriptions","organizations_url":"https://api.github.com/users/miyagawa/orgs","repos_url":"https://api.github.com/users/miyagawa/repos","events_url":"https://api.github.com/users/miyagawa/events{/privacy}","received_events_url":"https://api.github.com/users/miyagawa/received_events","type":"User","site_admin":false},"repo":{"id":47814926,"name":"ruby-build","full_name":"miyagawa/ruby-build","owner":{"login":"miyagawa","id":3499,"avatar_url":"https://avatars.githubusercontent.com/u/3499?v=3","gravatar_id":"","url":"https://api.github.com/users/miyagawa","html_url":"https://github.com/miyagawa","followers_url":"https://api.github.com/users/miyagawa/followers","following_url":"https://api.github.com/users/miyagawa/following{/other_user}","gists_url":"https://api.github.com/users/miyagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/miyagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miyagawa/subscriptions","organizations_url":"https://api.github.com/users/miyagawa/orgs","repos_url":"https://api.github.com/users/miyagawa/repos","events_url":"https://api.github.com/users/miyagawa/events{/privacy}","received_events_url":"https://api.github.com/users/miyagawa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miyagawa/ruby-build","description":"Compile and install Ruby","fork":true,"url":"https://api.github.com/repos/miyagawa/ruby-build","forks_url":"https://api.github.com/repos/miyagawa/ruby-build/forks","keys_url":"https://api.github.com/repos/miyagawa/ruby-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miyagawa/ruby-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miyagawa/ruby-build/teams","hooks_url":"https://api.github.com/repos/miyagawa/ruby-build/hooks","issue_events_url":"https://api.github.com/repos/miyagawa/ruby-build/issues/events{/number}","events_url":"https://api.github.com/repos/miyagawa/ruby-build/events","assignees_url":"https://api.github.com/repos/miyagawa/ruby-build/assignees{/user}","branches_url":"https://api.github.com/repos/miyagawa/ruby-build/branches{/branch}","tags_url":"https://api.github.com/repos/miyagawa/ruby-build/tags","blobs_url":"https://api.github.com/repos/miyagawa/ruby-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miyagawa/ruby-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miyagawa/ruby-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/miyagawa/ruby-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miyagawa/ruby-build/statuses/{sha}","languages_url":"https://api.github.com/repos/miyagawa/ruby-build/languages","stargazers_url":"https://api.github.com/repos/miyagawa/ruby-build/stargazers","contributors_url":"https://api.github.com/repos/miyagawa/ruby-build/contributors","subscribers_url":"https://api.github.com/repos/miyagawa/ruby-build/subscribers","subscription_url":"https://api.github.com/repos/miyagawa/ruby-build/subscription","commits_url":"https://api.github.com/repos/miyagawa/ruby-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/miyagawa/ruby-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/miyagawa/ruby-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/miyagawa/ruby-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/miyagawa/ruby-build/contents/{+path}","compare_url":"https://api.github.com/repos/miyagawa/ruby-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miyagawa/ruby-build/merges","archive_url":"https://api.github.com/repos/miyagawa/ruby-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miyagawa/ruby-build/downloads","issues_url":"https://api.github.com/repos/miyagawa/ruby-build/issues{/number}","pulls_url":"https://api.github.com/repos/miyagawa/ruby-build/pulls{/number}","milestones_url":"https://api.github.com/repos/miyagawa/ruby-build/milestones{/number}","notifications_url":"https://api.github.com/repos/miyagawa/ruby-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miyagawa/ruby-build/labels{/name}","releases_url":"https://api.github.com/repos/miyagawa/ruby-build/releases{/id}","created_at":"2015-12-11T08:39:14Z","updated_at":"2015-12-11T08:39:15Z","pushed_at":"2015-12-12T14:53:24Z","git_url":"git://github.com/miyagawa/ruby-build.git","ssh_url":"git@github.com:miyagawa/ruby-build.git","clone_url":"https://github.com/miyagawa/ruby-build.git","svn_url":"https://github.com/miyagawa/ruby-build","homepage":"","size":986,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"rbenv:master","ref":"master","sha":"59453d46d13799c24ffcf7fd4e6082d242c1a46d","user":{"login":"rbenv","id":10675212,"avatar_url":"https://avatars.githubusercontent.com/u/10675212?v=3","gravatar_id":"","url":"https://api.github.com/users/rbenv","html_url":"https://github.com/rbenv","followers_url":"https://api.github.com/users/rbenv/followers","following_url":"https://api.github.com/users/rbenv/following{/other_user}","gists_url":"https://api.github.com/users/rbenv/gists{/gist_id}","starred_url":"https://api.github.com/users/rbenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbenv/subscriptions","organizations_url":"https://api.github.com/users/rbenv/orgs","repos_url":"https://api.github.com/users/rbenv/repos","events_url":"https://api.github.com/users/rbenv/events{/privacy}","received_events_url":"https://api.github.com/users/rbenv/received_events","type":"Organization","site_admin":false},"repo":{"id":2142701,"name":"ruby-build","full_name":"rbenv/ruby-build","owner":{"login":"rbenv","id":10675212,"avatar_url":"https://avatars.githubusercontent.com/u/10675212?v=3","gravatar_id":"","url":"https://api.github.com/users/rbenv","html_url":"https://github.com/rbenv","followers_url":"https://api.github.com/users/rbenv/followers","following_url":"https://api.github.com/users/rbenv/following{/other_user}","gists_url":"https://api.github.com/users/rbenv/gists{/gist_id}","starred_url":"https://api.github.com/users/rbenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbenv/subscriptions","organizations_url":"https://api.github.com/users/rbenv/orgs","repos_url":"https://api.github.com/users/rbenv/repos","events_url":"https://api.github.com/users/rbenv/events{/privacy}","received_events_url":"https://api.github.com/users/rbenv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rbenv/ruby-build","description":"Compile and install Ruby","fork":false,"url":"https://api.github.com/repos/rbenv/ruby-build","forks_url":"https://api.github.com/repos/rbenv/ruby-build/forks","keys_url":"https://api.github.com/repos/rbenv/ruby-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbenv/ruby-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbenv/ruby-build/teams","hooks_url":"https://api.github.com/repos/rbenv/ruby-build/hooks","issue_events_url":"https://api.github.com/repos/rbenv/ruby-build/issues/events{/number}","events_url":"https://api.github.com/repos/rbenv/ruby-build/events","assignees_url":"https://api.github.com/repos/rbenv/ruby-build/assignees{/user}","branches_url":"https://api.github.com/repos/rbenv/ruby-build/branches{/branch}","tags_url":"https://api.github.com/repos/rbenv/ruby-build/tags","blobs_url":"https://api.github.com/repos/rbenv/ruby-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbenv/ruby-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbenv/ruby-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbenv/ruby-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbenv/ruby-build/statuses/{sha}","languages_url":"https://api.github.com/repos/rbenv/ruby-build/languages","stargazers_url":"https://api.github.com/repos/rbenv/ruby-build/stargazers","contributors_url":"https://api.github.com/repos/rbenv/ruby-build/contributors","subscribers_url":"https://api.github.com/repos/rbenv/ruby-build/subscribers","subscription_url":"https://api.github.com/repos/rbenv/ruby-build/subscription","commits_url":"https://api.github.com/repos/rbenv/ruby-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbenv/ruby-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbenv/ruby-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbenv/ruby-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbenv/ruby-build/contents/{+path}","compare_url":"https://api.github.com/repos/rbenv/ruby-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbenv/ruby-build/merges","archive_url":"https://api.github.com/repos/rbenv/ruby-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbenv/ruby-build/downloads","issues_url":"https://api.github.com/repos/rbenv/ruby-build/issues{/number}","pulls_url":"https://api.github.com/repos/rbenv/ruby-build/pulls{/number}","milestones_url":"https://api.github.com/repos/rbenv/ruby-build/milestones{/number}","notifications_url":"https://api.github.com/repos/rbenv/ruby-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbenv/ruby-build/labels{/name}","releases_url":"https://api.github.com/repos/rbenv/ruby-build/releases{/id}","created_at":"2011-08-02T13:47:29Z","updated_at":"2015-12-11T11:55:48Z","pushed_at":"2015-12-12T14:53:24Z","git_url":"git://github.com/rbenv/ruby-build.git","ssh_url":"git@github.com:rbenv/ruby-build.git","clone_url":"https://github.com/rbenv/ruby-build.git","svn_url":"https://github.com/rbenv/ruby-build","homepage":"","size":1814,"stargazers_count":2332,"watchers_count":2332,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":478,"mirror_url":null,"open_issues_count":38,"forks":478,"open_issues":38,"watchers":2332,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/847"},"html":{"href":"https://github.com/rbenv/ruby-build/pull/847"},"issue":{"href":"https://api.github.com/repos/rbenv/ruby-build/issues/847"},"comments":{"href":"https://api.github.com/repos/rbenv/ruby-build/issues/847/comments"},"review_comments":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/847/comments"},"review_comment":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/847/commits"},"statuses":{"href":"https://api.github.com/repos/rbenv/ruby-build/statuses/a09ecc27e4f7471a7da0b3ee8a67d7ca0388a284"}}}}