| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
To prevent potential autoloading issues in our parallel tests. I think
this could be the cause of
https://github.com/rubygems/bundler/runs/386607433.
|
| |
|
|
|
|
|
|
| |
This spec was not stopping threads after itself. That would cause the
previous spec in the file (that checks that no threads are left behind)
to fail.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
6928: When a 401 response is received, raise BadAuthenticationError if credentials were present in the request URI r=deivid-rodriguez a=jdliss
### What was the end-user problem that led to this PR?
Some gem servers respond to bad username/password request with a 401 instead of a 403.
### What was your diagnosis of the problem?
When a 401 response was received, bundler would automatically assume no credentials were supplied, leading to a response of
```
Authentication is required for http://moto@gems.motologic.com/.
Please supply credentials for this source. You can do this by running:
bundle config http://moto@gems.motologic.com/ username:password
```
even when a username and password was present in the bundler config.
### What is your fix for the problem, implemented in this PR?
There already exists a check for credentials in the request URI for 403 responses. I took that pattern and implemented it for 401 responses as well.
### Why did you choose this fix out of the possible options?
I chose this fix because a very similar pattern already exists in bundler, I just applied the same logic to another response code.
Co-authored-by: Jonathan <jonacom@lissismore.com>
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Specify `--require spec_helper` in .rspec
Specifying `--require spec_helper` in .rspec will automatically require spec_helper in *_spec.rb.
It isn't necessary to specify `require "spec_helper"` in individual *_spec.rb. I think that it's a [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself) way.
Refer: https://github.com/rspec/rspec/wiki#rspec
|
| | |
|
| |
| |
| |
| | |
Run `rubocop -a --only Style/PercentLiteralDelimiters` and `rubocop --auto-gen-config`.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Version 1.12.6
# Conflicts:
# CHANGELOG.md
# lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
# lib/bundler/version.rb
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
```
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)>'.
```
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`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`.
|
|/ /
| |
| |
| |
| | |
Useful when mapping completed responses to requests when debugging to
determine which requests are still in progress.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- Closes #4384
Signed-off-by: James Wen <jrw2175@columbia.edu>
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
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)>'.
```
|
| |
|
| |
|
| |
|
| |
|
| |
|