Commit graph

96 commits

Author SHA1 Message Date
David Rodríguez
0dc86fd843 [rubygems/rubygems] Remove unnecessary branching
We now run specs against a single version, so I prefer to keep a single
branch. Once we bump the major version, this will need very little
updates, and that seems fine.

3866d25a00
2025-07-28 09:39:03 +09:00
David Rodríguez
416fde11eb [rubygems/rubygems] Fix language quality spec no longer getting run properly
c65e34a904
2025-07-25 11:10:39 +09:00
David Rodríguez
bfd0c15ffa [rubygems/rubygems] Fix man tracked files glob for ruby-core
The location has been consistent with upstream for a while so the
previous glob was no longer matching any files.

dae40b7041
2025-07-25 11:10:39 +09:00
David Rodríguez
9918ca1671 [rubygems/rubygems] Remove default_install_uses_path setting
The previous default can already be configured with `bundle config
path.system true`.

cb483b79db
2025-07-07 11:53:00 +09:00
David Rodríguez
81da38b308 Sync RubyGems 2025-07-03 13:43:00 +09:00
David Rodríguez
b953d1134a
[rubygems/rubygems] Migrate bundle viz specs to run offline
672722cd4d
2025-07-02 10:34:18 +09:00
David Rodríguez
cd742b6be6
[rubygems/rubygems] Simpler glob to find path to rake
852db00169
2025-07-02 10:34:18 +09:00
David Rodríguez
83c403c4d8
[rubygems/rubygems] Rename some helpers to avoid name classes
I plan to introduce a `base_system_gems` helper to actually install gems
from `base_system_gem_path` into system gems but that would collapse
with an existing helper.

714c209e62
2025-07-02 10:34:18 +09:00
David Rodríguez
0a8ed97b32
[rubygems/rubygems] Helper for hax file
8b7ddf8a07
2025-06-24 12:10:50 +09:00
David Rodríguez
4245d522b2
[rubygems/rubygems] Allow enabling "Bundler 3 mode" more easily
Currently to test Bundler 3 mode we have to actually edit the version
file to simulate we're running a future version. This is inconvenient.

Instead, allow passing an environment variable, `BUNDLER_3_MODE`, to set
the "working mode" Bundler should use.

This can now be set easily by end users to enable them to try out the
changes in the future version and give us feedback.

It's unclear how version auto-switching should work when this
environment variable is set, so the auto-switching feature will be
disabled in that case.

4e92e9b209
2025-06-19 10:23:36 +09:00
David Rodríguez
6f4eaa100f
Remove hardcoded version of rake from Bundler tests
Let them run against the version resolved by the `test_gems.rb` gemfile.

This should fix ruby-core CI job that was broken by the release of rake
13.3.0.
2025-06-03 08:12:09 +09:00
David Rodríguez
1a8d338337 Initialize gems tmp when initializing bundled_gems_spec suite
That way it works even if no Bundler specs have run before.
2025-05-29 10:09:28 +09:00
Hiroshi SHIBATA
5e1c90675e Added cgi for bundler testing. rack depends cgi/cookie.rb 2025-05-09 14:27:28 +09:00
David Rodríguez
756479324f Sync Bundler and adapt to new spec setup 2025-04-10 19:21:51 +09:00
David Rodríguez
13020ac069 [rubygems/rubygems] Path helper to build paths in compact index cache
d28f9b8515
2025-03-12 18:02:09 +09:00
David Rodríguez
d8394461fd [rubygems/rubygems] Support installing arm native gems on Windows
96496e3f53

Co-authored-by: Johnny Shields <johnny.shields@gmail.com>
2025-01-28 15:31:53 +09:00
Hiroshi SHIBATA
253329343c [rubygems/rubygems] Introduce Spec::Path.sinatra_dependency_paths for sinatra mock server
0a168156d5
2025-01-16 19:41:13 +09:00
David Rodríguez
ec13ccdf53 [rubygems/rubygems] Allow smoother breaking changes in test env
0fc3feae19
2024-07-30 13:54:29 +00:00
David Rodríguez
7feccb123a [rubygems/rubygems] Make test env resilient to ruby version changes
We use pre-existence of `rake_path` to decide whether we need to
regenerate dummy test gems in `tmp`. When changing rubies, the previous
implementation will believe that the correct `rake_path` exists
and avoids regenerating dummy gems, given an error like the following
when specs are run:

```
(...)
Could not find rubygems-generate_index lib directory in /path/to/rubygems/bundler/tmp/1/gems/base/ruby/3.2.0
  # ./spec/support/builders.rb:253:in `block in update_repo'
  # ./spec/support/helpers.rb:337:in `block in with_gem_path_as'
  # ./spec/support/helpers.rb:351:in `without_env_side_effects'
  # ./spec/support/helpers.rb:332:in `with_gem_path_as'
  # ./spec/support/builders.rb:251:in `update_repo'
  # ./spec/support/builders.rb:228:in `build_repo'
  # ./spec/support/builders.rb:197:in `build_repo4'
  # ./spec/commands/lock_spec.rb:103:in `block (2 levels) in <top (required)>'
(...)
```

To fix this, fix the part of the path that depends on the implementation
and the Ruby version so that we don't give false positives.

fafacfa210
2024-07-26 08:05:53 +00:00
David Rodríguez
5b931d9de6 [rubygems/rubygems] Extract a rake_path helper
0f2db73619
2024-07-23 19:40:08 +00:00
David Rodriguez
da75df2f75 [rubygems/rubygems] Stop depending on pathname for subprocess launching
When launching bundler subprocesses for end to end testing, all of them
will load the `spec/support/rubygems_version_manager.rb` file passed as
a ruby's `-r` flag.

Unfortunately this file depends on `pathname`, so unless we drop that
dependency, we can't really test support for including the `pathname`
gem in the `Gemfile`.

This commit implements some refactorings to avoid loading `pathname`
inside `bundler` test subprocesses.

c1f948788c
2024-06-06 18:44:52 +00:00
David Rodriguez
9579c3d988 [rubygems/rubygems] Reuse git helper when possible
f7c7bae940
2024-06-06 18:44:43 +00:00
David Rodriguez
b5a7f63961 [rubygems/rubygems] Respect GEM_COMMAND in non ruby-core mode
Not that I need it, but reads better.

db3eca7b92
2024-06-06 18:44:42 +00:00
David Rodriguez
b5949ad62a [rubygems/rubygems] Simplify check for ruby-core setup
77bc6f1ecc
2024-06-06 18:44:41 +00:00
David Rodriguez
f5c6a395a5 [rubygems/rubygems] The tmp test helper already joins internally
2d9eeadb62
2024-06-06 18:44:37 +00:00
Hiroshi SHIBATA
82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
Hiroshi SHIBATA
d7d10f3ee8
Adjust rubygems style 2023-12-17 05:45:33 +08:00
Hiroshi SHIBATA
8db0de92a8
Restore tracked_files for ruby core repo 2023-12-17 05:39:16 +08:00
Hiroshi SHIBATA
40113454b1 Use regex instead of hard coded paths 2023-12-16 21:02:45 +09:00
Hiroshi SHIBATA
ab87cd0baa We don't use tracked_files in before(:suite). It breaks with release package. 2023-12-16 21:02:45 +09:00
David Rodríguez
6b3c9cebe9 Normalize bundler bindir
This makes bundler consistent with all other gems, and makes the default
installation of Bundler in the release package look like any other
bundler installation.

Before (on preview3, for example), Bundler executable is installed at:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle

Now it's installed in the standard location:

lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle
2023-12-13 12:59:23 +09:00
David Rodríguez
2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
bb66253f2c
2023-12-07 22:29:33 +00:00
David Rodríguez
60803e192e [rubygems/rubygems] Remove no longer necessary workaround for old RubyGems
ed4eaefac0
2023-11-27 15:04:40 +09:00
David Rodríguez
50482cd1e5 [rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in Bundler
93619c97ff
2023-11-13 11:06:10 +09:00
Hiroshi SHIBATA
2c219ab215 [rubygems/rubygems] Rubocop 1.51.0 or later didn't support Ruby 2.6
522b5f1ecd
2023-06-15 07:01:27 +09:00
Hiroshi SHIBATA
3bc5f6b240
[rubygems/rubygems] tool_dir needs to handle ruby/ruby repo now
550d90f4ba
2023-05-31 13:55:30 +09:00
Hiroshi SHIBATA
4bbeed6134 Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285 2023-05-30 21:50:07 +09:00
David Rodríguez
4df7c3946a [rubygems/rubygems] Remove one fallback to full indexes on big gemfiles
If Gemfile has a lot of dependencies, we have an optimization that uses
the full index in that case, assuming it's going to be faster.

I think this is an old optimization that predates compact index API
times, I believe we no longer need it these days.

Also, since a few releases ago we check for circular dependencies when
resolving by looping through all versions of each name and removing
those that have circular dependencies that would trip up the resolver.

This loop becomes actually very slow when full indexes are used because
to find dependencies of a gemspec, we need to explicitly fetch the
marshaled gemspec (`gemspec.rz` endpoint) for it, so the optimization
has the opposite effect of making things very slow.

2f46289bd3
2023-04-07 13:53:00 +00:00
Hiroshi SHIBATA
bbe56a6437 Merge RubyGems/Bundler master
from bfb0ae6977
2022-12-12 10:49:43 +09:00
Hiroshi SHIBATA
a4e14b9d9d Merge RubyGems/Bundler master
Pick from 823c776d95
2022-12-09 16:36:22 +09:00
Victor Gama
bc6c1e0e25 [rubygems/rubygems] Copy template contents instead of file and perms
This allows the file to be created without copying permissions
from Bundler's installation source. The previous behaviour was
noticed after installing Ruby through brew, and using bundle
init, which yielded a read-only Gemfile.

839a06851d
2022-10-03 20:41:45 +09:00
Hiroshi SHIBATA
aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
David Rodríguez
517d7c3221 Sync latest Bundler & RubyGems 2022-02-01 08:09:23 +09:00
Hiroshi SHIBATA
fb1ab27f53 Merge RubyGems-3.3.1 and Bundler-2.3.1 2021-12-23 09:44:45 +09:00
OKURA Masafumi
7e506716d2
Newly generated gems require Ruby 2.6.0
In 2021, Ruby 2.5 and older are EOL.
We can set the default required Ruby version to 2.6.0 to
encourage people to use newer Ruby.
If the command is executed with old Ruby, it falls back to 2.3.0.
It's still possible to create a gem for older Ruby just by changing
two lines of code (one in gemspec and another is in rubocop.yml).
2021-10-09 09:07:47 +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
Kazuhiro NISHIYAMA
a5b6baae97
Fix test-bundler failures when XDG_CONFIG_HOME is not writable
2175399707
```
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
```
2021-03-24 15:26:49 +09:00
Hiroshi SHIBATA
69ed64949b Track Bundler master(2.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20 2021-01-04 13:14:43 +09:00