Commit graph

71 commits

Author SHA1 Message Date
Samuel Giddins
5a66ea23d2 [rubygems/rubygems] Use mkdir_p helper in bundler.rb
Small refactor, no functional change

5edb7a1026
2023-12-15 15:32:56 +00:00
David Rodríguez
a848c070d2
[rubygems/rubygems] Remove doc not adding much value
c241a88962
2023-12-12 10:04:57 +09:00
David Rodríguez
2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
bb66253f2c
2023-12-07 22:29:33 +00:00
Eric Mueller
6fd3b358ff [rubygems/rubygems] Duplicate Gem::CIDetector into bundler
Because bundler needs to support older versions of rubygems, we can't
actually rely on Gem::CIDetector (yet - in a year or so they might be
able to consolidate, if they don't change futher). So we're copying it
into the Bundler:: namespace, and enforcing that they stay completely in
sync with a test. No other tests are needed, since Gem::CIDetector is
already tested, and this is and will remain identical.

abc67f0da1
2023-12-06 20:05:25 +00:00
Eric Mueller
73440e1ef2 [rubygems/rubygems] Many major_deprecations supply :removed_message
Generally the removed message is very similar, but often it needs to
specify that the feature has "been removed" instead of "will be
removed", or "been deprecated". And a few chunks of text needed more
substantial updates. And a number of them seemed to have been carefully
crafted to make sense in either context, so I left those alone.

8d42cf9104
2023-12-01 17:52:38 +00:00
David Rodríguez
a131ea39b7
[rubygems/rubygems] Better error when having an insecure install folder
e41156e272
2023-11-08 09:04:28 +09:00
Thong Kuah
ad08674d8d
[rubygems/rubygems] Add CHECKSUMS for each gem in lockfile
We lock the checksum for each resolved spec under a new CHECKSUMS
section in the lockfile.

If the locked spec does not resolve for the local platform, we preserve
the locked checksum, similar to how we preserve specs.

Checksum locking only makes sense on install. The compact index
information is only available then.

bde37ca6bf
2023-10-23 13:59:01 +09:00
Samuel Giddins
e52f9bd41e [rubygems/rubygems] Bundler error handling
63b422b71a
2023-09-20 02:03:02 +00:00
Samuel Giddins
fe90e83b48 [rubygems/rubygems] Use safe_load in bundler when available
34d096e38a
2023-09-20 02:03:01 +00:00
Hiroshi SHIBATA
4bbeed6134 Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285 2023-05-30 21:50:07 +09:00
Hiroshi SHIBATA
0ef6e718d9
Merge https://github.com/rubygems/rubygems/pull/6655 manually. 2023-05-10 15:02:29 +09:00
David Rodríguez
c257380965
Revert "Refactor incomplete specs handling"
This reverts commit 69580f8b72f41c58cae57d1ada4db909922b3891.
2023-04-06 13:07:16 +09:00
Josef Šimánek
9cfd8330ca [rubygems/rubygems] Onboard Rubocop Naming/MemoizedInstanceVariableName rule to Bundler.
d768be0c65
2023-03-28 15:25:44 +09:00
David Rodríguez
ebebc90ec2 Refactor incomplete specs handling
Recent bugs fixed made me realize we were relying on state too much
here. We only need to keep incomplete specs to be able to expire them
and retry resolution without them locked. If we use a separate class, we
can do that more transparently and handle them just like we handle
"missing specs".
2023-03-23 17:18:49 +09:00
David Rodríguez
ddc4fd5644 Normalize git sources
Just like gem sources, a "style-only" change, like adding a trailing
slash, should not expire them.
2023-03-17 18:50:55 +09:00
Mercedes Bernard
583137fe56 [rubygems/rubygems] make Bundler.load_marshal private
4909d071d2
2023-02-23 08:50:03 +00:00
Mercedes Bernard
d5994eb436 [rubygems/rubygems] safe marshal gem specs when inflating
5c5d0c5350
2023-02-23 08:50:02 +00:00
Mercedes Bernard
3d5ec8401f [rubygems/rubygems] safe marshal gem versions when fetching Marshal.specs.4.8.gz
23880353c1
2023-02-23 08:50:02 +00:00
Hiroshi SHIBATA
a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Hiroshi SHIBATA
b7ad60a794 Merge RubyGems/Bundler master
from 72fd3dd209
2022-12-26 15:09:21 +09:00
Hiroshi SHIBATA
f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Josef Šimánek
f270aa3eda [rubygems/rubygems] Use safe Marshal deserialization for dependency API response. - adds Bundler#safe_load_marshal and Bundler::SAFE_MARSHAL_CLASSES listing safe classes to deserialize
e947c608cc
2022-12-20 13:15:02 +09:00
Nobuyoshi Nakada
e1f42844a0 [rubygems/rubygems] Prefer RbConfig::CONFIG['EXEEXT'] over hardcorded '.exe'
bc84b2d262
2022-12-12 06:00:41 +00:00
Hiroshi SHIBATA
0a9d51ee9d Migrate our resolver engine to PubGrub
https://github.com/rubygems/rubygems/pull/5960

  Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2022-11-12 07:40:31 +09:00
Hiroshi SHIBATA
f5df47d1f3 Merge RubyGems/Bundler master
6214d00b23
2022-10-18 16:33:15 +09:00
Hiroshi SHIBATA
3eca1e438d Merge 16c3535413 2022-09-05 14:37:12 +09:00
Takuya Noguchi
22a416a3bb [rubygems/rubygems] Bundler: update the link suggested on error with the new one
Also typo is fixed.

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

9c1ea52ddf
2022-08-23 14:28:47 +09:00
Hiroshi SHIBATA
f69244cee8 Merge rubygems/bundler HEAD
Pick from 6b3a5a9ab0
2022-08-23 10:45:57 +09:00
David Rodríguez
b30fc03e92 [rubygems/rubygems] Centralize loading Bundler::MatchPlatform mixin
It's explicitly loaded when monkeypatching RubyGems, which we do very
early. So neither autoloading it, nor explicitly loading it anywhere
else is necessary.

fbc7a57161
2022-08-23 10:45:57 +09:00
Hiroshi SHIBATA
9e6d07f346 Merge rubygems/bundler HEAD
Merge from 2af2520b4a
2022-07-26 14:38:17 +09:00
Hiroshi SHIBATA
437a5ae9d6 Merge RubyGems and Bundler master 2022-07-13 14:11:55 +09:00
David Rodríguez
ea31c5bcd1 [rubygems/rubygems] Fix crash when installing gems with symlinks
If BUNDLE_PATH is configured to a symlinked path, installing gems with
symlinks would crash with an error like this:

```
Gem::Package::SymlinkError: installing symlink 'man/man0/README.markdown' pointing to parent path /usr/home/stevewi/srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0/README.markdown of /srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0 is not allowed
```

This commit fixes the problem by changing the bundle path to be the
realpath of the configured value, right after we're sure the path has
been created.

3cd3dd142a
2022-05-30 17:42:39 +09:00
Dominik Bauernfeind
d79e0832a5 [rubygems/rubygems] Fix typo in documentation
800a973e00
2022-05-06 18:03:00 +09:00
Hiroshi SHIBATA
678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
David Rodríguez
d32fa986c3 [rubygems/rubygems] Make rescue clause more specific
This is hiding a real bundler issue as a "network error". It's more
helpful to get a proper bug report, with stack trace and so on.

So stop re-raising errors when evaluating unmarshaled  responses  as
network errors, and only raise Marshal errors when the Marshal format is
invalid, not whenever marshalled gemspecs can't be loaded because that
may hide actual client errors, like missing `YAML` constants.

05ea907e1c
2022-03-23 23:31:05 +09:00
Hiroshi SHIBATA
ff3d7b720e Merge RubyGems and Bundler master 2022-02-28 11:39:20 +09:00
Hiroshi SHIBATA
69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +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.

c19a9f2ff7
2021-10-25 20:24:32 +09:00
David Rodríguez
4bc87cb1fb [rubygems/rubygems] Remove syck traces from bundler
Same reason as in the previous commit.

f00a6c8516
2021-08-31 19:06:14 +09:00
David Rodríguez
c119dd2b5a [rubygems/rubygems] Fix bundle plugin install misdetection of installed versions
9c88db949d
2021-08-31 19:06:14 +09:00
David Rodríguez
c044f818ca [rubygems/rubygems] Move Bundler.rubygems.clear_paths to a better place
Since it clears both home and path.

fadf5e03ea
2021-08-31 19:06:14 +09:00
David Rodríguez
8c79486e7e [rubygems/rubygems] Bundle path is already expanded
a296052670
2021-08-31 19:06:14 +09:00
David Rodríguez
71b937d3d7 [rubygems/rubygems] Normalize setting GEM_PATH
4188ebd568
2021-08-31 19:06:14 +09:00
David Rodríguez
d0da3a2a7f [rubygems/rubygems] Remove more unused code
986e889a79
2021-08-31 19:06:14 +09:00
David Rodríguez
8d32f46d04 [rubygems/rubygems] Remove unnecessary line
a7023c6c21
2021-08-31 19:06:14 +09:00
Daniel Niknam
90899c50c2
[rubygems/rubygems] Remove LoadError message in regards to requiring a relative file
Ruby 1.9.2 removed "." from LOAD_PATH for robustness and security reasons.
This code was introduced by 56fc830e19 commit
to helping users understand the issue and had a guard condition to include the message for `RUBY_VERSION >= "1.9"`.
However, the guard condition was removed as part of the "Ruby version leftover" cleanup by
8c9cf76e41

Ruby 1.9 development was ended a long time ago and this message is not useful anymore.

a23609b15a
2021-07-27 09:25:55 +09:00
Hiroshi SHIBATA
896bbb9fad Merge RubyGems/Bundler master from 8459ebd6ad65ce3397233416dc64083ae7572bb9 2021-07-14 10:48:07 +09:00
Hiroshi SHIBATA
c082c6eb7c Sync RubyGems and Bundler with upstream 2021-07-07 15:31:52 +09:00
David Rodríguez
6e2240a2f9 Sync latest bundler & rubygems development version 2021-07-07 13:30:20 +09:00
Hiroshi SHIBATA
ed149dbf46 Merge the master branch of Bundler 2021-04-15 15:36:15 +09:00