summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Fetcher] Pass metadata when constructing EndpointSpecificationsSamuel Giddins2016-07-101-2/+2
|
* Do not log the credentials used to contact a gem serverRoman Sandler2016-06-181-0/+3
| | | | | | | | | | Adds a filter_uri method to HTTPError backed by the URICredentialsFilter to be used when preparing error output. In the tests, replace a double object with a real URI and change a test hostname to be valid so that older versions of Ruby's URI module don't choke on it. It would be cool to somehow replace this work with the `anonymized_uri` in the Bundler::Source::Rubygems::Remote class.
* Fail gracefully on Errno::EHOSTUNREACHAllen Zhao2016-06-101-1/+1
|
* Use Array#concat instead of push(*ary)Samuel Giddins2016-06-021-1/+1
|
* use the certs from their new subdirectoriesAndre Arko2016-03-171-1/+1
|
* [Fetcher] Support setting http_proxy to :no_proxyseg-no-proxy-supportSamuel Giddins2016-02-151-1/+1
|
* Fix RubyVersion specs failuresseg-ruby-version-fixesSamuel Giddins2016-02-011-2/+2
|
* [Fetcher] Update user agent construction for new RubyVersion APISamuel Giddins2016-02-011-2/+2
|
* Compatibility with frozen string literalsSamuel Giddins2016-01-311-4/+7
|
* [RuboCop] Fix Style/MutableConstantSamuel Giddins2016-01-311-7/+7
|
* [RuboCop] Address Style/GuardClauseSamuel Giddins2016-01-311-7/+5
|
* ArgumentErrors are not really retriableAndre Arko2016-01-251-1/+1
|
* BadRequirementError guardAndre Arko2016-01-251-0/+1
|
* add BadRequirementError to known failures listAndre Arko2016-01-251-1/+1
|
* [fetcher] stop retrying on known failure errorsAndre Arko2016-01-251-1/+1
|
* cancel retries on 404 Not FoundAndre Arko2016-01-251-2/+2
| | | by raising FallbackError on 404 as well as 413, and then adding FallbackError to the list of errors to not retry, we both cancel retries for 404s and incidentally also cancel retries on 413s.
* responses aren’t strings, but bodies areAndre Arko2016-01-251-1/+1
|
* build spec objects only in Fetcher#specsAndre Arko2016-01-251-2/+8
|
* remove fetchers that aren’t availableAndre Arko2016-01-251-0/+1
|
* make --full-index fall back to specs.4.8.gzAndre Arko2016-01-251-5/+10
|
* [Fetcher] Dont check dependency api unless compact index is unavailableSamuel E. Giddins2016-01-251-1/+1
|
* [CompactIndex] Use vendored compact_index_clientSamuel E. Giddins2016-01-251-1/+0
|
* [RuboCop] Fix violationsSamuel E. Giddins2016-01-251-1/+1
|
* [Fetcher] Make checking for API availability Ruby 1.8.7 compatibleSamuel E. Giddins2016-01-251-1/+1
|
* [Fetcher::Index] Fix the returned specificationsSamuel E. Giddins2016-01-251-1/+2
|
* [Fetcher] Fix availability logic to avoid multiple callsSamuel E. Giddins2016-01-251-2/+2
|
* Actually implement the vision for the new indexSamuel E. Giddins2016-01-251-12/+6
|
* [Fetcher] Add Fetchers for the new index format!Samuel E. Giddins2016-01-251-3/+5
|
* Move `Bundler#ruby_version` functionality to `Bundler::RubyVersion#system`James Wen2016-01-141-1/+1
| | | | | - Part of design direction to move more functionality out of the `Bundler` top-level module.
* Extract safe const_get logic into `SharedHelpers#const_get_safely`James Wen2016-01-021-9/+7
|
* Add `Net#HTTP--` errors safely (only if in version of ruby stdlib)James Wen2016-01-011-4/+10
|
* Add more exception classes not to retry on to the FetcherJames Wen2015-12-131-1/+4
| | | | | - These are all Exception classes that indicate scenarios where retrying the fetch/request would not suddenly have a successful result.
* Auto merge of #4124 - bundler:seg-rubocop, r=indirectHomu2015-11-271-7/+6
|\ | | | | | | More rubocop_todo cleanup
| * [RuboCop] Enable Style/IfUnlessModifierSamuel Giddins2015-11-261-3/+1
| |
| * [RuboCop] Enable Style/EmptyLinesAroundModuleBodySamuel Giddins2015-11-261-1/+0
| |
| * [RuboCop] Enable Style/EmptyElseSamuel Giddins2015-11-261-2/+0
| |
| * [RuboCop] Enable Style/RescueModifierSamuel Giddins2015-11-261-1/+5
| |
* | Auto merge of #4103 - jingweno:master, r=indirectHomu2015-11-271-0/+7
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retry `Fetcher#specs` with `Bundler::Retry` As mentioned in https://github.com/heroku/heroku-buildpack-ruby/pull/435, bundler failed at the step of fetching version metadata: ``` Fetching version metadata from https://rubygems.org/Net::HTTPInternalServerError: <?xml version=\"1.0\" encoding=\"UTF-8\"?> <Error><Code>InternalError</Code><Message>We encountered an internal error. Please try again.</Message><RequestId>E7402EA19C5D6803</RequestId><HostId>hzuvaA1JAZX6ST+OL4ARYeAqZ/tgkM2yOjZgBq6Panu10YzWtfNNozOg8N5qR3gxFE/sUfYGP48=</HostId></Error> ``` It turns out the retry logic doesn’t cover fetching source index, gem metadata, version metadata and dependency metadata. A new method `Fetcher#specs_with_retry` is added to wrap `Fetcher#specs` with `Bundler::Retry` which reties when bundler fails in the mentioned cases. /cc @schneems
| * Retry `Fetcher#specs` with `Bundler::Retry`Jingwen Owen Ou2015-11-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in https://github.com/heroku/heroku-buildpack-ruby/pull/435, bundler failed at the step of fetching version metadata: ``` Fetching version metadata from https://rubygems.org/Net::HTTPInternalServerError: <?xml version=\"1.0\" encoding=\"UTF-8\"?> <Error><Code>InternalError</Code><Message>We encountered an internal error. Please try again.</Message><RequestId>E7402EA19C5D6803</RequestId><HostId>hzuvaA1JAZX6ST+OL4ARYeAqZ/tgkM2yOjZgBq6Panu10YzWtfNNozOg8N5qR3gxFE/sUfYGP48=</HostId></Error> ``` It turns out the retry logic doesn’t cover fetching source index, gem metadata, version metadata and dependency metadata. A new method `Fetcher#specs_with_retry` is added to wrap `Fetcher#specs` with `Bundler::Retry` which reties when bundler fails in the mentioned cases.
* | Auto merge of #4091 - smellsblue:full-index-x-gemfile-source, r=segiddinsHomu2015-11-121-13/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | Send X-Gemfile-Source when bundling with --full-index This fixes #4090 I 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. **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: * 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. * 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). I haven't yet added additional specs for this, but I wanted to get this out there first to get some feedback if possible.
| * Pass remote as is to fetcherMike Virata-Stone2015-11-021-13/+1
| | | | | | | | | | | | | | Move fetch_uri into the base fetcher Expose remote for base fetcher Set and restore gem sources only seems to be neccessary in one form of fetch_all_remote_specs Send X-Gemfile-Source header when fetching the specs
* | Require Zlib on the Fetcherretry-http-on-zlib-errorAndre Medeiros2015-11-091-0/+1
| | | | | | | | | | I really don't like this solution, but it's the simplest one so we can recover from that error on 1.8.7.
* | Retry Fetch operation on Zlib error.Andre Medeiros2015-10-281-1/+1
|/ | | | This fixes #4074
* Set X-Gemfile-Source when fetching dependenciesAgis Anastasopoulos2015-10-201-0/+1
|
* add http://masarakki2015-09-131-1/+1
|
* Append specs.Hirotaka Azuma2015-08-141-0/+8
|
* Don't call Gem::configuration in Bundler::FetcherHirotaka Azuma2015-08-141-1/+1
|
* considerate .gemrc when determine http_proxyHirotaka Azuma2015-08-141-0/+3
|
* Fix Style/MethodDefParenthesesVictor Koronen2015-08-141-1/+1
|
* [RuboCop] Update to 0.33.0Samuel E. Giddins2015-08-071-1/+1
|