{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/4091","labels_url":"https://api.github.com/repos/bundler/bundler/issues/4091/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/4091/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/4091/events","html_url":"https://github.com/bundler/bundler/pull/4091","id":114766322,"number":4091,"title":"Send X-Gemfile-Source when bundling with --full-index","user":{"login":"smellsblue","id":150632,"avatar_url":"https://avatars.githubusercontent.com/u/150632?v=3","gravatar_id":"","url":"https://api.github.com/users/smellsblue","html_url":"https://github.com/smellsblue","followers_url":"https://api.github.com/users/smellsblue/followers","following_url":"https://api.github.com/users/smellsblue/following{/other_user}","gists_url":"https://api.github.com/users/smellsblue/gists{/gist_id}","starred_url":"https://api.github.com/users/smellsblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smellsblue/subscriptions","organizations_url":"https://api.github.com/users/smellsblue/orgs","repos_url":"https://api.github.com/users/smellsblue/repos","events_url":"https://api.github.com/users/smellsblue/events{/privacy}","received_events_url":"https://api.github.com/users/smellsblue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-03T08:14:30Z","updated_at":"2015-11-12T16:14:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bundler/bundler/pulls/4091","html_url":"https://github.com/bundler/bundler/pull/4091","diff_url":"https://github.com/bundler/bundler/pull/4091.diff","patch_url":"https://github.com/bundler/bundler/pull/4091.patch"},"body":"This fixes #4090\r\n\r\nI did a little refactoring that made sense to me along the way, but if I went too far or might be breaking something I'm not aware of, please let me know.\r\n\r\n**Existing issue:** This doesn't fix bundling with full index when using Rubygems < 2.0, as that code path seemed a bit trickier to fix. I added a *TODO* comment at the relevant method. I thought of a couple possibilities:\r\n* Subclass `Gem::SpecFetcher` like `Bundler::GemRemoteFetcher`, it seems like it might be as simple as calling the super constructor and then replace `@fetcher` with a `Bundler::GemRemoteFetcher` with the headers added ahead of time (see https://github.com/rubygems/rubygems/blob/v1.8.30/lib/rubygems/spec_fetcher.rb#L66). This may involve different solutions the further back in Rubygems you go.\r\n* Use the newer implementation of `fetch_all_remote_specs` for older Rubygems as well (I don't know if that would work though, but it might be worth a try).\r\n\r\nI haven't yet added additional specs for this, but I wanted to get this out there first to get some feedback if possible."},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/156152086","html_url":"https://github.com/bundler/bundler/pull/4091#issuecomment-156152086","issue_url":"https://api.github.com/repos/bundler/bundler/issues/4091","id":156152086,"user":{"login":"homu","id":10212162,"avatar_url":"https://avatars.githubusercontent.com/u/10212162?v=3","gravatar_id":"","url":"https://api.github.com/users/homu","html_url":"https://github.com/homu","followers_url":"https://api.github.com/users/homu/followers","following_url":"https://api.github.com/users/homu/following{/other_user}","gists_url":"https://api.github.com/users/homu/gists{/gist_id}","starred_url":"https://api.github.com/users/homu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/homu/subscriptions","organizations_url":"https://api.github.com/users/homu/orgs","repos_url":"https://api.github.com/users/homu/repos","events_url":"https://api.github.com/users/homu/events{/privacy}","received_events_url":"https://api.github.com/users/homu/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T16:14:25Z","updated_at":"2015-11-12T16:14:25Z","body":":sunny: Test successful - [status](https://travis-ci.org/bundler/bundler/builds/90746956)"}}