Commit graph

29 commits

Author SHA1 Message Date
David Rodríguez
e67f595e8f [rubygems/rubygems] Build bundler gem just once for specs
When we need to reset system gems during specs, there's no need to
rebuild bundler, we can copy over the original gem home.

7b4f80747b
2025-07-25 11:10:37 +09:00
David Rodríguez
cd1952484c [rubygems/rubygems] Stay away from FileUtils.rm_rf in Bundler specs
Instead, skip the spec when run by ruby-core. Maybe the root cause can
be fixed at some point.

09594ae5b8
2025-04-01 13:31:48 +09:00
Hiroshi SHIBATA
1a222816fb Restore to use rm_rf for failing example
3861666452
2025-03-12 18:02:09 +09:00
David Rodríguez
510edbccf9 [rubygems/rubygems] Fix ENAMETOOLONG error when creating compact index cache
If a custom rubygems source URI is long enough, Bundler may end up
raising an `ENAMETOOLONG` error and crash.

This commit fixes the problem by trimming the cache slug size to fit
usual OS requirements.

df40ff1e14

Co-authored-by: mbclu <mbclu@users.noreply.github.com>
Co-authored-by: martinemde <martinemde@users.noreply.github.com>
2025-03-12 18:02:09 +09:00
David Rodríguez
51958bae66 [rubygems/rubygems] Prefer FileUtils.rm_r to FileUtils.rm_rf for specs
Because it does not swallow errors if it fails to remove the given
folders, making issues easier to debug.

0db12d7afc
2025-03-12 18:02:09 +09:00
David Rodríguez
f656d34f10 [rubygems/rubygems] Refactor specs to not try to remove folders that don't exist
This has the following benefits:

* Avoid duplicated work in some specs that first build a repo, and then
  overwrite it with a completely different set of gems.
* Reduce RSpec nesting and improve readability.
* The change also made surfaces several specs that were incorrect since
  they were unintentionally not testing the right thing.

ed430883e0
2025-03-12 18:02:09 +09:00
David Rodríguez
98c923ff4b
Synchronize Bundler & RubyGems (#11071) 2024-06-28 10:12:29 -04:00
Nobuyoshi Nakada
b582e5a6e9 [rubygems/rubygems] Clear generated files recursively
On macOS, `dsymutil` utility splits debug info into .dSYM directory.
Glob list of `.bundle/cache/extensions/**/*binary_c*` includes that
directory but `FileUtils.rm` fails to unlink a directory.

2227533168 (step):11:3000
```
       Operation not permitted @ apply2files - /Users/runner/work/ruby/ruby/src/tmp/2/home/.bundle/cache/extensions/arm64-darwin-22/ruby/3.4.0+0/3b02a1011c53518f911ab3a9e8c6c608/very_simple_binary-1.0/very_simple_binary_c.bundle.dSYM
     # ./lib/fileutils.rb:2332:in 'File.unlink'
     # ./lib/fileutils.rb:2332:in 'block in FileUtils::Entry_#remove_file'
     # ./lib/fileutils.rb:2337:in 'FileUtils::Entry_#platform_support'
     # ./lib/fileutils.rb:2331:in 'FileUtils::Entry_#remove_file'
     # ./lib/fileutils.rb:1475:in 'FileUtils.remove_file'
     # ./lib/fileutils.rb:1223:in 'block in FileUtils.rm'
     # ./lib/fileutils.rb:1222:in 'FileUtils.rm'
     # ./spec/bundler/install/global_cache_spec.rb:235:in 'block (3 levels) in <top (required)>'
```

375c127684
2024-03-05 07:13:39 +00:00
David Rodríguez
2755cb1b2f [rubygems/rubygems] Use modern hashes consistently
bb66253f2c
2023-12-07 22:29:33 +00: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
David Rodríguez
d5121992dc [rubygems/rubygems] Remove unnecessary specific_local_platform test helper
86b574824d
2023-03-17 18:50:55 +09:00
David Rodríguez
a782d76fbe [rubygems/rubygems] Fix pending Bundler specs
When testing under the ruby/ruby setup, mkmf.rb needs to the `$extout`
global variable set properly.

This is because, in this particular case, the `ruby.h` header needed to
compile extensions is constructed from
`$(extout)/include($arch)/ruby/config.h` but `$extout` is not set by
default.

I tried to fix this in mkmf.rb itself but I couldn't figure it. But
setting it externally to workaround the issue fixes the specs, so I'll
start with that. Also setting it externally causes issues when running
specs upstream against Ruby 2.3 (I guess because of some difference with
Ruby 2.3 mkmf.rb implementation). So I'm avoiding doing it on Ruby 2.3 to
woraround that.

d782984585
2022-06-26 11:16:11 +09:00
David Rodriguez
f6d1909500
[rubygems/rubygems] Catch up with recent error message modification
ae374c1f31
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.

931f8cb8a9
2021-10-25 20:48:51 +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
David Rodríguez
ea4824ee0f [rubygems/rubygems] s/run!/run
e3f60d8aec
2020-06-18 19:14:15 +09:00
David Rodríguez
696a50751b [rubygems/rubygems] s/install_gemfile!/install_gemfile
4d1a0c465a
2020-06-18 19:14:15 +09:00
David Rodríguez
1436b5026c [rubygems/rubygems] s/bundle!/bundle
746a4b3d74
2020-06-18 19:14:15 +09:00
David Rodríguez
61b6f53337 [rubygems/rubygems] Make helpers raise by default
ade0c441d5
2020-06-18 19:14:15 +09:00
Hiroshi SHIBATA
26367367ec Marked the failing examples with the current master branch on ruby repository 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA
c7ebeb7eda Sync Bundler PR #3624 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA
0e60b59d58 Update the bundler version with master branch 2020-05-13 07:54:37 +09:00
David Rodríguez
c3ddd47ce7
[bundler/bundler] Normalize file:// handling in specs
5946d62ad0
2019-08-03 09:29:55 +09:00
hsbt
68ddd4d300 Merge Bundler 2.1.0.pre.1 as developed version from upstream.
a53709556b

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 06:01:35 +00:00
hsbt
59c8d50653 Added bundler as default gems. Revisit [Feature #12733]
* bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
    Merge from latest stable branch of bundler/bundler repository and
    added workaround patches. I will backport them into upstream.
  * common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
    of bundler.
  * tool/sync_default_gems.rb: Added sync task for bundler.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02 23:07:56 +00:00
hsbt
7825e8363d Postponing the Bundler merge.
I faced a big issue about Bundler with ruby core.
  I have no time to resolve it issue before 2.5 final release.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 23:08:05 +00:00
hsbt
0b5432a7bd Fixed syntax error with ignore option order.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-02 04:27:33 +00:00
hsbt
be7b592912 Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0.
  * common.mk: rspec examples of bundler-1.16.0 needs require option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-01 23:29:38 +00:00