Граф коммитов

9705 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Lee d7432fdee5 [rubygems/rubygems] Use `shellsplit` instead of array of strings
Previously, the command string to be used for the shell command
was first generated and then split using shellsplit. This change
reverts the current behavior as it breaks if the value of remote
contains a space.

https://github.com/rubygems/rubygems/commit/6649ee10b0
2021-11-09 10:56:17 +09:00
Hiroshi SHIBATA bd2674ad33 [rubygems/rubygems] Use bundler-graph instead of bundler-viz
https://github.com/rubygems/rubygems/commit/a54cca13db
2021-11-08 22:15:21 +09:00
Hiroshi SHIBATA 666a918595 [rubygems/rubygems] GNU Make needs DESTDIR on Windows environment like msys or mingw
https://github.com/rubygems/rubygems/commit/7fd987d30d
2021-11-06 09:06:49 +09:00
haruuzion 82ae9b092c [rubygems/rubygems] Fix url
https://github.com/rubygems/rubygems/commit/6a5a80eff7
2021-11-06 01:39:24 +09:00
David Rodríguez 907aa47527 [rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passed
https://github.com/rubygems/rubygems/commit/8d04092f6e
2021-11-05 23:20:50 +09:00
David Rodríguez f5a4fdae25 [rubygems/rubygems] Remove unnecessarily changing GEM_HOME
At this point gem paths are already loaded and memoize. Changing
`GEM_HOME` has no effect.

https://github.com/rubygems/rubygems/commit/a1f62f0939
2021-11-05 23:20:48 +09:00
David Rodríguez 5b941ec90d [rubygems/rubygems] Remove unnecessary loop
Rubygems installs a single executable. Make that explicit.

https://github.com/rubygems/rubygems/commit/2839d15521
2021-11-05 23:20:47 +09:00
Hiroshi SHIBATA 16331d9abb [rubygems/rubygems] Explicitly ignored empty value for DESTDIR
https://github.com/rubygems/rubygems/commit/69dcc02553
2021-11-05 07:35:25 +09:00
Hiroshi SHIBATA 33d01b7344 [rubygems/rubygems] Skip to set DESTDIR option when it's not provided for mswin platform
https://github.com/rubygems/rubygems/commit/b93546c8d8
2021-11-05 07:35:24 +09:00
Alyssa Ross 1506c8228b [rubygems/rubygems] Don't apply `--destdir` twice when running `setup.rb`
Prior to this patch, if I ran:

    ruby setup.rb --destdir /foo

Then Bundler files would be written into /foo/foo, because destdir was
being prepended, even though `bundler_spec.bin_dir` already included
destdir.

https://github.com/rubygems/rubygems/commit/9e857ffb52
2021-11-05 07:23:36 +09:00
David Rodríguez 9503dd91a5 [rubygems/rubygems] Fix `--destdir` handling on Windows
Driver letters were not accounted for in one place.

https://github.com/rubygems/rubygems/commit/fbe42460d7
2021-11-05 07:23:36 +09:00
David Rodríguez 5e855be86b [rubygems/rubygems] More refactoring of `--destdir` handling
https://github.com/rubygems/rubygems/commit/f42c2025ed
2021-11-05 07:23:35 +09:00
David Rodríguez 70cbca48b8 [rubygems/rubygems] Refactor `--destdir` handling
https://github.com/rubygems/rubygems/commit/8aab3d11b0
2021-11-05 07:23:35 +09:00
Nobuyoshi Nakada 539c42ed89 [rubygems/rubygems] Fix typos
https://github.com/rubygems/rubygems/commit/f328ef6f77
2021-11-04 23:06:25 +09:00
Nobuyoshi Nakada 3d8e1ee40f [ruby/net-http] Warn deprecated old constants
https://github.com/ruby/net-http/commit/2a97b4729b
2021-11-04 20:51:51 +09:00
Nobuyoshi Nakada b49dbe025f [ruby/net-http] Fix the typo in a constant name
https://github.com/ruby/net-http/commit/dada6007bf
2021-11-04 20:51:42 +09:00
Kazuki Yamaguchi 5f2c4e344d [ruby/net-http] Reset keep_alive timer on new connection
The last_communicated timestamp is for HTTP persistent connection, to
decide whether the current TCP connection may be reused for the
subsequent requests or not. Naturally, the timer must be reset if the
connection is recreated since it is no longer relevant.

https://github.com/ruby/net-http/commit/0a013de42d
2021-11-04 20:44:04 +09:00
Nobuyoshi Nakada e1ae889c9c [ruby/racc] Fix a private method name
https://github.com/ruby/racc/commit/1f52571225
2021-11-04 08:58:45 +09:00
Nobuyoshi Nakada acf5ccd185 [ruby/racc] Fix typo in a local variable name
https://github.com/ruby/racc/commit/03d0b86b90
2021-11-04 08:58:44 +09:00
David Rodríguez c5224c71ae [rubygems/rubygems] Fix `gem install` vs `gem fetch` inconsistency
https://github.com/rubygems/rubygems/commit/b3e985799e
2021-11-03 17:42:39 +09:00
Carlos Palhares 38785aa3b9
Update licenses= documentation 2021-11-02 10:24:35 +09:00
Carlos Palhares 17f8fd6568
Allow custom LicenseRef 2021-11-02 10:24:00 +09:00
Hiroshi SHIBATA 4a39167260
Removed the related code of `gem server` 2021-11-02 10:19:34 +09:00
David Rodríguez ed0f326e88 [rubygems/rubygems] Leave ":" after MANPATH when not set
So that system man pages still work after a gem with man pages overrides
it.

https://github.com/rubygems/rubygems/commit/1031879b87
2021-11-02 00:28:28 +09:00
David Rodríguez 4e7e057692 [rubygems/rubygems] Memoize materialized specs when requiring `bundler/setup`
Calling `Bundler.definition.specs` will memoize materialized specs.
However, requiring `bundler/setup` will end up materializing the same
set of specs, but not memoize them.

This change makes things consistent.

https://github.com/rubygems/rubygems/commit/e4c2b52824
2021-11-01 02:01:36 +09:00
180909 6c812c6f4e add missing http response code in doc 2021-10-30 10:16:17 +09:00
David Rodríguez f634d1ee00 [rubygems/rubygems] Better error when installing a git lockfile and git not present
https://github.com/rubygems/rubygems/commit/28f4842196
2021-10-30 06:11:39 +09:00
Frederik Dudzik 17fb785d15
[rubygems/rubygems] Vendor tsort into rubygems
So that it loads a consistent version of the library and `rubygems` is
never affected by gem activation conflicts related to `tsort`.

Getting CI green required updating one `bundler` spec, because `tsort`
is no longer loaded by `bundle clean` until after `BUNDLE_PATH` has been
changed, so to ensure it is found, it needs to be installed under
`BUNDLE_PATH` as well (which will be different from the global system
path on Bundler 3, meaning installing `tsort` to the global system path
is not enough there). This spec workaround can be removed once we also
vendor `tsort` inside `bundler`.

https://github.com/rubygems/rubygems/commit/d326880999
2021-10-29 18:00:46 +09:00
Frederik Dudzik f45af5f0a4
Support gemification of tsort
Co-authored-by: Frederik Dudzik <frederik.dudzik@shopify.com>
Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2021-10-29 17:32:52 +09:00
David Rodríguez d8e97169ba [rubygems/rubygems] Only delete cached gem when it's corrupted
Rescuing all errors here might end up hiding other errors if the
deletion of the cached gem itself raises an error for some reason. Let's
be more conservative.

https://github.com/rubygems/rubygems/commit/3d80dfba08
2021-10-29 02:40:35 +09:00
David Rodríguez ed5f8eaf49 [rubygems/rubygems] Don't warn when a lockfile is locked to a dev version
Even if it's newer than the running versions. Dev versions are not
released to rubygems.org, so the warning message suggests a command that
doesn't work. And dev versions are currently non deterministic
(2.3.0.dev can be many different versions), so the warning doesn't
really make sense at the moment.

https://github.com/rubygems/rubygems/commit/6f31af27ef
2021-10-27 14:47:21 +09:00
Yusuke Endoh 4c32fcb84f [ruby/error_highlight] Make the formatter mechanism support Ractor
Now the formatter configuration is per Ractor. DefaultFormatter is used
if not set.

DefaultFormatter#message_for is now a class method to allow sub-Ractors
to call the method.

https://github.com/ruby/error_highlight/commit/9fbaa8ab7c
2021-10-27 11:29:20 +09:00
Jenny Shen 92ec010595
[rubygems/rubygems] Add support to build and sign certificates with multiple key algorithms
https://github.com/rubygems/rubygems/commit/967876f15d

Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
2021-10-26 08:01:55 +09:00
Jean Boussier 557fa38915 [rubygems/rubygems] Fix Bundler::Digest#sha1 on big-endian systems
As noticed by @nobu https://github.com/rubygems/rubygems/pull/4989#discussion_r735674633

From wikipedia: https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode

> append ml, the original message length in bits, as a 64-bit big-endian integer.

`Q` is native endian, so little-endian on most modern hardware.
The original code from RubyDigest reverses the bytes:
d15f906caf/lib/ruby_digest.rb (L521)

But that makes the code non-portable, the correct way is to directly ask
for a big-endian representation.

https://github.com/rubygems/rubygems/commit/ba2be01ea4
2021-10-26 01:51:05 +09:00
David Rodriguez 9d28618091
[rubygems/rubygems] Avoid loading the `digest` gem unnecessarily
OpenSSL includes what we need.

https://github.com/rubygems/rubygems/commit/955f3b72ca
2021-10-25 20:48:52 +09:00
David Rodriguez a959342abf
[rubygems/rubygems] Remove comment that seems no longer accurate
We require things inline or autoload them for efficiency and to avoid as
much as possible conflicting with user's choice of gems.

But I removed the require and observed no deadlocks when activating
gems.

https://github.com/rubygems/rubygems/commit/7d6333e842
2021-10-25 20:48:52 +09:00
David Rodriguez 9fbf3a1f6f
Unify issue template and ISSUES.md document
Some crucial information to ease maintainers work, like the advice of
upgrading rubygems and bundler, was one step away from the issue
template, making it easier for some users to miss.

Now all relevant information is written directly in the bug report
template.
2021-10-25 20:48:51 +09:00
David Rodriguez b4a43e4f57
[rubygems/rubygems] Show proper error when previous installation of gem can't be deleted
Instead of showing the bug report template with an error at a random
place.

https://github.com/rubygems/rubygems/commit/882ad3ab57
2021-10-25 20:48:51 +09:00
David Rodriguez 00412be204
[rubygems/rubygems] Show a proper error if gem path is not writable
Instead of showing the bug report place with an error at a randome
place.

https://github.com/rubygems/rubygems/commit/241854ce73
2021-10-25 20:48:51 +09:00
David Rodriguez 7073870dfa
[rubygems/rubygems] Improve readability by splitting updating the cache and searching it
https://github.com/rubygems/rubygems/commit/d0df25bb0f
2021-10-25 20:48:51 +09:00
David Rodriguez f7f85c1feb
[rubygems/rubygems] Manage global gem cache directly
Previously, it was maintained in sync with the standard cache. That was
less efficient, and it caused some error messages to point to non
existent files.

https://github.com/rubygems/rubygems/commit/931f8cb8a9
2021-10-25 20:48:51 +09:00
David Rodriguez 4fc29d17b3
[rubygems/rubygems] Cached gem path resolution should consider default gems
https://github.com/rubygems/rubygems/commit/83b2b845b3
2021-10-25 20:48:51 +09:00
David Rodriguez 4edcda67b3
[rubygems/rubygems] Simplify gem downloading inside bundler
We can skip most stuff in `Gem::RemoteFetcher#download`, and use
`Gem::RemoteFetcher#update_cache_path` directly.

This has the benefit of allowing us to remove some workarounds to
support several rubygems versions, but also allows us to pass the target
folder where the gem should be downloaded directly and skip the logic
inside `Gem::RemoteFetcher#download` to infer the cache path. This will
be useful later to fix some issues with the `global_gem_cache` feature
flag.

https://github.com/rubygems/rubygems/commit/8fe74a77e4
2021-10-25 20:48:51 +09:00
David Rodriguez 57d990ddab
[rubygems/rubygems] Raise original exception
https://github.com/rubygems/rubygems/commit/3c93b9fd21
2021-10-25 20:48:51 +09:00
David Rodriguez 7b821bc9b5
[rubygems/rubygems] Add missing requires
These methods rescue a constant defined by `rubygems/remote_fetcher`,
so they should technically require it.

The require is provided by `gem_remote_fetcher` anyways but I was
running a unit spec that stubs that method, so I was getting an
undefined constant error hiding another error.

https://github.com/rubygems/rubygems/commit/8bedae4034
2021-10-25 20:48:50 +09:00
David Rodriguez 9b1b171866
[rubygems/rubygems] Use `Gem::Specification#file_name` consistently
https://github.com/rubygems/rubygems/commit/13b933f49a
2021-10-25 20:48:50 +09:00
David Rodriguez 38542cfffc
[rubygems/rubygems] Extract a `default_cache_path` helper
https://github.com/rubygems/rubygems/commit/8319305d58
2021-10-25 20:48:50 +09:00
David Rodriguez edc1813190
[rubygems/rubygems] Small refactor
Extract final cache path to a variable and pass that to `download_gem`.
It actually fits better the parameters documentation since it's the
final directory where the downloaded gem will be placed.

https://github.com/rubygems/rubygems/commit/1429db6a04
2021-10-25 20:48:50 +09:00
Jean Boussier 5af3f7f357
[rubygems/rubygems] Vendor a pure ruby implementation of SHA1
This allows `Source::Git` to no longer load the `digest` gem as it is causing
issues on Ruby 3.1.

https://github.com/rubygems/rubygems/pull/4989/commits/c19a9f2ff7
2021-10-25 20:24:32 +09:00
Daniel Colson 7394514bde [rubygems/rubygems] Simplify and remove some unused code
When `install_with_build_args` was added in
be96283985,
there were two versions of the method: the default version in the base class that still
used the locking `with_build_args`, and an override in the `Future`
class (for Rubygems 2.0 and up) that yielded without calling
`with_build_args`.

The `with_build_args` version of the method was removed in
8a5b71e3e8
while removing a bunch of the old Rubygems compatibility code.

This commit removes `with_build_args`, since it no longer appears to be
used (the build args are passed as a keyword argument to
`spec.source.install` instead, since
be96283985).

The commit also removes `install_with_build_args` and the conditional
around it, since the method wasn't doing anything different than
`install`, and it had a comment that was no longer accurate.

https://github.com/rubygems/rubygems/commit/ba543a60eb
2021-10-25 19:02:50 +09:00