summaryrefslogtreecommitdiff
path: root/spec/bundler/fetcher
Commit message (Collapse)AuthorAgeFilesLines
* [Downloader] Print underlying error in HTTPErrorseg-downloader-errorSamuel Giddins2017-04-131-3/+3
|
* remove unused Process.kill mock in FIPS-mode specWill Jordan2017-02-171-6/+0
|
* simplify `md5_available?` test using `OpenSSL::Digest:MD5.digest`Will Jordan2017-02-171-12/+10
|
* Enable compact index when OpenSSL FIPS mode is enabled but not activeWill Jordan2017-02-161-6/+38
|
* Disable RSpec monkey patchingSamuel Giddins2017-01-155-5/+5
|
* [CompactIndex] Only check for fips constant when it is definedseg-fipsSamuel Giddins2016-12-011-1/+1
|
* [CompactIndex] Disable when openssl is in fips modeSamuel Giddins2016-12-011-0/+16
|
* Merge tag 'v1.12.6'Samuel Giddins2016-10-101-1/+1
|\ | | | | | | | | | | | | | | | | Version 1.12.6 # Conflicts: # CHANGELOG.md # lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb # lib/bundler/version.rb
| * Fix usage of select...count to use countSamuel Giddins2016-10-101-1/+1
| |
| * Auto merge of #4607 - will-in-wi:clean_up_workers, r=segiddinsHomu2016-05-251-0/+24
| | | | | | | | | | | | | | | | | | | | Clean up worker threads once done with them Right now, the thread pools created by CompactIndex are not cleaned up once they are done. I assume that over time, they would be garbage collected, but in the meantime there could be 200+ threads running. Many shared hosts have fork bomb protection set up which kills Bundler. This patch will clean up the threads as soon as they are done, keeping the total number of active threads at any one time to a minimum. Fixes https://github.com/bundler/bundler/issues/4367
| * Fix the following warning in the test suite:James Wen2016-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` Bundler::Fetcher::Downloader fetch when the # requests counter is greater than the redirect limit WARNING: An expectation of `:body` was set on `nil`. To allow expectations on `nil` and suppress this message, set `config.allow_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `config.allow_expectations_on_nil` to `false`. Called from /home/travis/build/bundler/bundler/spec/bundler/fetcher/downloader_spec.rb:19:in `block (3 levels) in <top (required)>'. ```
| * [Fetcher] Switch from bundler.rubygems.org to index.rubygems.orgSamuel Giddins2016-03-111-2/+2
| |
* | Update the dependency fetcher spec to pass in a flat array of gem namesseg-sort-dep-api-gem-namesSamuel Giddins2016-10-091-2/+2
| |
* | Auto merge of #4811 - NickLaMuro:dots_for_compact_index_logger, r=segiddinsHomu2016-07-261-0/+30
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix random string printing inconsistencies and formatting Add dot output for CompactIndex fetcher --------------------------------------- The `Bundler::Fetcher::CompactIndex`'s logging was missing the "dot logging" when not in debug mode, which is an assumed behavior based on the code in `lib/bundler/source/rubygems.rb`: ```ruby api_fetchers.each do |f| Bundler.ui.info "Fetching gem metadata from #{f.uri}", Bundler.ui.debug? idx.use f.specs_with_retry(dependency_names, self) Bundler.ui.info "" unless Bundler.ui.debug? # new line now that the dots are over end ``` While this isn't critical for `bundler` function properly by any stretch of the imagination, it provides a small bit of user feedback that requests are still continuing to be processed and `bundler` hasn't stalled. It also maintains logging consistency between the different fetcher models. Add newlines for `Bundler::Retry` --------------------------------- This is very pedantic, but it makes it so that retry warning messages that used to look like this: ``` Fetching gem metadata from https://rubygems.org/....Retrying fetcher due to error (2/4): Error::OMGWatHappened LOL, no idea ..... ``` Now will look like this: ``` Fetching gem metadata from https://rubygems.org/.... Retrying fetcher due to error (2/4): Error::OMGWatHappened LOL, no idea..... ``` I think this reads a bit better and puts context to the "dots" so they now match up with the original attempt and the retries Remove unneeded if statement ---------------------------- Ran across this while failing at writing tests for the above (for longer than I want to admit in public), but basically the `if` statement to determine whether or not to print "name" in the `Bundler.ui.warn` was not needed, as it never could be reached because of a short circuiting return statement prior to the print ```ruby return true unless name ``` Have no idea how to test it anymore than we already are, so instead of embarrassing myself further, I moved on.
| * | Update CompactIndex to use log_specsNick LaMuro2016-07-251-0/+30
| | | | | | | | | | | | | | | | | | | | | `Bundler::Fetcher::CompactIndex` was missing the dots that are used by the fallback, `Bundler::Fetcher::Dependency` when running the `specs` method. This simply makes use of the newly extracted `log_specs` method instead of simply calling out to `Bundler.ui.debug`.
* | | Add URI to http response output in debug modeNick LaMuro2016-07-251-1/+1
|/ / | | | | | | | | Useful when mapping completed responses to requests when debugging to determine which requests are still in progress.
* | [RuboCop] Update to 0.41.2Samuel Giddins2016-07-201-3/+6
| |
* | add a test for not logging passwordsRoman Sandler2016-06-181-0/+12
| |
* | Do not log the credentials used to contact a gem serverRoman Sandler2016-06-181-11/+9
| | | | | | | | | | | | | | | | | | | | 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-0/+9
| |
* | Remove useless comment.William Johnston2016-05-241-1/+0
| |
* | Fix issue with older versions of Ruby and URI.William Johnston2016-05-241-1/+1
| |
* | Fix code syntax testWilliam Johnston2016-05-241-1/+1
| |
* | Ack, forgot RubocopWilliam Johnston2016-05-241-2/+2
| |
* | Add test for thread issueWilliam Johnston2016-05-241-0/+25
| |
* | Suggest usage of `--full-index` flag in case of Dependency API failureJames Wen2016-03-311-15/+21
| | | | | | | | | | | | - Closes #4384 Signed-off-by: James Wen <jrw2175@columbia.edu>
* | [Fetcher] Switch from bundler.rubygems.org to index.rubygems.orgseg-index-rubygems-orgSamuel Giddins2016-03-111-2/+2
| |
* | Fix the following warning in the test suite:James Wen2016-03-101-1/+1
|/ | | | | | | | | | | | | | | ``` Bundler::Fetcher::Downloader fetch when the # requests counter is greater than the redirect limit WARNING: An expectation of `:body` was set on `nil`. To allow expectations on `nil` and suppress this message, set `config.allow_expectations_on_nil` to `true`. To disallow expectations on `nil`, set `config.allow_expectations_on_nil` to `false`. Called from /home/travis/build/bundler/bundler/spec/bundler/fetcher/downloader_spec.rb:19:in `block (3 levels) in <top (required)>'. ```
* Compatibility with frozen string literalsSamuel Giddins2016-01-314-0/+4
|
* [RuboCop] Fix Style/MutableConstantSamuel Giddins2016-01-311-6/+6
|
* Backfill unit tests for `Bundler::Fetcher::Downloader`James Wen2016-01-251-0/+229
|
* Update dependency fetcher specs for refactoringSamuel Giddins2016-01-251-73/+16
|
* [Fetcher::Base] Update specs for api_available? -> available?Samuel Giddins2016-01-251-4/+2
|
* Auto merge of #4227 - ↵Homu2016-01-241-0/+335
|\ | | | | | | | | | | | | | | | | | | RochesterinNYC:add-unit-tests-for-bundler-fetcher-dependency, r=indirect Refactor and add unit test coverage for `Bundler::Fetcher::Dependency` - Extract some parts of `#dependency_specs` and `#specs` into more modular sub-methods This class was considerably more difficult to unit test out than the previous ones I've dealt with so far, even after breaking up some of the more monolithic methods. Bit of a code smell? Although, it does seem that the complexity of this class puts it among the more complex classes (functionality-wise, not necessarily implementation-wise) in the Bundler codebase.
| * Refactor and add unit test coverage for `Bundler::Fetcher::Dependency`James Wen2016-01-231-0/+335
| | | | | | | | | | - Extract some parts of `#dependency_specs` and `#specs` into more modular sub-methods
* | Add unit tests for abstract `Bundler::Fetcher::Base` classJames Wen2016-01-231-0/+78
|/
* Complete unit test coverage for `Bundler::Fetcher::Index`James Wen2016-01-211-12/+97
|
* [RuboCop] Enable Style/PercentLiteralDelimitersSamuel Giddins2015-11-261-1/+1
|
* [RuboCop] Enable Style/BlockDelimitersSamuel Giddins2015-11-261-2/+2
|
* Pass remote as is to fetcherMike Virata-Stone2015-11-021-1/+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
* Rescue Net::HTTPFatalError, toofix-3830Andre Arko2015-08-131-0/+16
fixes #3830