Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubygems and bundler with master branch #4789

Merged
merged 101 commits into from Aug 31, 2021
Merged

Update rubygems and bundler with master branch #4789

merged 101 commits into from Aug 31, 2021

Conversation

hsbt
Copy link
Member

@hsbt hsbt commented Aug 31, 2021

No description provided.

deivid-rodriguez and others added 30 commits August 31, 2021 14:09
This error can only be raised when loading the cache, and we only load
the cache if this condition is met.

rubygems/rubygems@86d692edb8
…installing it

Not only the first one that's missing.

This also allows us to simplify things.

rubygems/rubygems@69718a9509
If we have succeeded to materialize the bundle, all specs should be
loaded.

rubygems/rubygems@bd3712d824
These gems are built and installed to system directly as default gems.
There's no need to also build a remote repo.

rubygems/rubygems@ad9dad4c22
TSort was released as a library so we can install it, and also other
gems that are loaded by the spec. Also, Ruby on Windows apparently loads
fiddle 1.0.6, so we need to also install that to make that not fail.

rubygems/rubygems@2b8dcab99e
…ource compatibility mode

Since this mode is only enabled in frozen mode, it's fine to use the
lockfile and means we don't have to "prepare" the replacement for
materialization.

rubygems/rubygems@dda01b288e
No need to fill up missing names from sources anymore since they should
now be properly set up correctly from the beginning.

rubygems/rubygems@706fd28681
This should fix a weird flaky spec failure, given that the code
producing the error will be no longer run.

rubygems/rubygems@a171965409
…lone script

Due to the `bundler` gem itself being ignored from `$LOAD_PATHS`, a
`nil` value is being introduced here, resulting in the current folder
being added to the `$LOAD_PATH` by the standalone script.

I'm pretty sure this is unintentional.

rubygems/rubygems@df54b07b5e
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.

rubygems/rubygems@a2d6392ada
Under some case, this variable might not end up being used, in which
case running the script would print unused variable warnings.

rubygems/rubygems@bf96030362
… sources

In the case of path sources, the path the source is pointing to should
be added directly to the `$LOAD_PATH` without any modifications.

rubygems/rubygems@d3bba936f0

Co-authored-by: Daniel Niknam <mhmd.niknam@gmail.com>
It doesn't really add much, in my opinion. We want to be helpful, but
also concise when possible.

rubygems/rubygems@9d56009cf7
Since all requirements have an explicit source now (even if it's the
default source).

rubygems/rubygems@2c341cfc22
When printing sources inside these error messages, it's useful to only
consider the current state of the source. For example, when requiring
`bundler/setup`, the source shouldn't be configured to be able to hit
the network, so the error message should only mention "locally installed
gems" to make that more clear.

rubygems/rubygems@30eb14f853
…hit the network

If the cache was missing, `bundler` would try to re-fetch it. With the
`--local` flag, it should just look at installed gems.

rubygems/rubygems@630d29c69e
The processed YML data is included as metadata, the source gemspec
file is unused and just confusing.

rubygems/rubygems@f444478eac
deivid-rodriguez and others added 28 commits August 31, 2021 14:28
…RIs to be used on outputs

We need to redact URI credential in several places and copy pasting the code into each part of it is not ideal. This class is responsible for parsing URI strings and redacting credential from it. Also, it will handle URI object in the same manner. We will be reusing this class whenever we need to print/display a URI to users.
URI with the following format will be redacted:
- Token: `http://my-secure-token@example.com` => `http://REDACTED@example.com`
- Username & Password: `http://my-username:my-secure-password@example.com` => `http://my-username:REDACTED@example.com`
- x-oauth-basic: `http://my-secure-token:x-oauth-basic@example.com` => `http://REDACTED:x-oauth-basic@example.com`

rubygems/rubygems@f1e45d3a89
…allCommand` class

The `x.source.uri` could be a source URI with a credential. Using `Gem::PrintableUri` to make sure we are redacting sensitive information from it.

rubygems/rubygems@8755ee0aaa
The `@uri` variable could be a source URI with a credential. Using `Gem::PrintableUri` to make sure we are redacting sensitive information from it when logging on verbose mode.

rubygems/rubygems@f566787211
…izer to `build` method

The `initialize` method is already doing a lot and by adding the `Gem::PrintableUri` to redact sensitive information, things are getting complicated and hard to read here. For the start, I have refactored the `initialize` method into a class method called `build`.

rubygems/rubygems@4312e8fdf5
For the purpose of this class, we need to make sure the return object by `Gem::UriParser.parse_uri` method will have the following method:
- user
- user=
- password
- password=
So we  can remove the the `uri` dependency and just look for the methods to exist.

rubygems/rubygems@241e093597
We will be passing string to this class so there is no need to be defensive about it.

rubygems/rubygems@30bd52a977
…to a `Gem::Uri` class

The new class is a wrapper on top of an URI. And then, when you want
credentials redacted, you call `#redacted` that returns a copy of itself,
but with credentials redacted.

rubygems/rubygems@9581c2740a
@hsbt hsbt merged commit f315be2 into ruby:master Aug 31, 2021
@hsbt hsbt deleted the update-rubygems-and-bundler branch August 31, 2021 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants