Commit graph

85 commits

Author SHA1 Message Date
David Rodríguez
cc29d737ef [rubygems/rubygems] Consistently use :create action when creating directories
It gives better errors.

bedae080ef
2024-10-23 08:53:18 +00:00
David Rodríguez
e77346153d [rubygems/rubygems] Remove compatibility code with old RubyGems
f11e42a3c5
2024-10-02 21:33:02 +00:00
David Rodríguez
5000138084
[rubygems/rubygems] Fix bundler/inline resetting ENV
72d8d4dbba
2024-10-02 14:34:55 +09:00
David Rodríguez
a3929a9ca1
[rubygems/rubygems] The BUNDLER_SETUP env should also be cleaned up
47b7e50f64
2024-10-02 14:34:55 +09:00
David Rodríguez
1d768ebd71 [rubygems/rubygems] The dsl_path parameter in DSLError is documented as a string
ab44fa9ee4
2024-09-11 11:28:11 +00:00
David Rodríguez
3e84da0970 [rubygems/rubygems] Auto switch to locked bundler version even when using binstubs
076aba8b1c
2024-06-11 13:30:50 +00:00
David Rodríguez
4f160ad9cf [rubygems/rubygems] Don't let bundle config report a path without a Gemfile as "local app"
6aa2ac337f
2024-05-30 18:23:36 +00:00
Martin Emde
6b0afbb111 [rubygems/rubygems] Reorganize and refactor CompactIndexClient
71bcf354f5
2024-05-25 17:47:07 +00:00
Josh Nichols
6f4f360fc4 [rubygems/rubygems] Add auto_install support to require "bundler/setup"
We have some places that already use `bundle config auto_install true`,
ie:

7a144f3374/bundler/lib/bundler/cli.rb (L11)

This applies the same logic (copy and pasted) to happen when you
`require "bundler/setup"`.

bb3c922341
2024-04-25 18:46:05 +00:00
Hiroshi SHIBATA
acc326b7c4 [rubygems/rubygems] Removed needless class name
a2f43d3756
2024-04-19 05:18:21 +00:00
Hiroshi SHIBATA
a95b46db06 [rubygems/rubygems] Track HEAD changes for old PR proposal
e3d180620c
2024-04-19 05:18:21 +00:00
Hiroshi SHIBATA
0a14fee02f [rubygems/rubygems] Removed redundant begin
a9d22e5f46
2024-04-19 05:18:20 +00:00
fatkodima
09cbbe0e3d [rubygems/rubygems] Add plugin hooks for Bundler.require
b373b7ed0d
2024-04-19 05:18:20 +00:00
David Rodríguez
24d5e7176e
[rubygems/rubygems] Refactor lockfile generation
6a0c03c77f
2024-02-08 14:43:56 +09:00
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