Commit graph

62 commits

Author SHA1 Message Date
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
Hiroshi SHIBATA
d386a58f6f Merge bundler-2.2.0.rc.2 2020-10-15 17:19:02 +09:00
David Rodríguez
9cc7847849 s/sys_exec!/sys_exec 2020-06-18 19:14:15 +09:00
David Rodríguez
592762069d [rubygems/rubygems] Support running specs against a tarball
When bundler specs are run from a ruby tarball (ruby-core does this),
there's no git folder, so `git ls-files` fails.

Support this case by making specs rely on the list of files from the
bundler gemspec instead, and invert the spec that makes sure we ship the
right set of files.

As per the other quality specs, skip them in this case.

b28d5ec931
2020-06-05 07:32:42 +09:00
David Rodríguez
bd9a6ba4ef [rubygems/rubygems] Remove unintended extra space
1cc02930f3
2020-06-05 07:32:42 +09:00
Hiroshi SHIBATA
9f7bfba54f Revert "Fix a error in a before(:suite) hook"
This reverts commit 67d2a715ca.
2020-06-05 07:32:42 +09:00
Kazuhiro NISHIYAMA
67d2a715ca
Fix a error in a before(:suite) hook
703745101 (step):16:27
```
An error occurred in a `before(:suite)` hook.
Failure/Error: contents = File.read(version_file)

Errno::ENOENT:
  No such file or directory @ rb_sysopen - /home/runner/work/actions/actions/snapshot-master/tmp/1/bundler-2.2.0.dev/lib/bundler/version.rb
```
2020-05-25 20:08:30 +09:00
Hiroshi SHIBATA
93ebf9643d Revert 1f011cccb1 2020-05-22 20:32:30 +09:00
Hiroshi SHIBATA
c7ebeb7eda Sync Bundler PR #3624 2020-05-22 20:32:30 +09:00
Kazuhiro NISHIYAMA
1f011cccb1
Skip some tests if extracted from tarball (again)
ref 9aa75795f9
2020-05-18 23:18:44 +09:00
Hiroshi SHIBATA
d4acf254e3 Use the gemspec in build_dir directly 2020-05-14 09:11:28 +09:00
Hiroshi SHIBATA
fcb5a9ee46 Resolved the file path of gemspec for ruby core repository 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA
0e60b59d58 Update the bundler version with master branch 2020-05-13 07:54:37 +09:00
Hiroshi SHIBATA
286cb3395f Fixed test failures with gem command path on ruby core repo. 2019-12-15 16:41:10 +09:00
Hiroshi SHIBATA
38002a8adb Prepare to release bundler-2.1.0 2019-12-15 16:41:10 +09:00
Kazuhiro NISHIYAMA
fea24bbfdb Fix glob base in bundler.gemspec 2019-11-19 00:29:10 +09:00
Kazuhiro NISHIYAMA
9aa75795f9 Skip some tests if extracted from tarball 2019-11-19 00:29:10 +09:00
Hiroshi SHIBATA
bb9ecd026a Merge Bundler 2.1.0.pre3 released version 2019-11-13 10:19:51 +09:00
Hiroshi SHIBATA
7585bc3187 Merge Bundler 2.1.0.pre.3
Features:
    - Add caller information to some deprecation messages to make them easier to fix [#7361](https://github.com/bundler/bundler/pull/7361)
    - Reconcile `bundle cache` vs `bundle package` everywhere. Now in docs, CLI help and everywhere else `bundle cache` is the preferred version and `bundle package` remains as an alias [#7389](https://github.com/bundler/bundler/pull/7389)
    - Display some basic `bundler` documentation together with ruby's RDoc based documentation [#7394](https://github.com/bundler/bundler/pull/7394)

  Bugfixes:
    - Fix typos deprecation message and upgrading docs [#7374](https://github.com/bundler/bundler/pull/7374)
    - Deprecation warnings about `taint` usage on ruby 2.7 [#7385](https://github.com/bundler/bundler/pull/7385)
    - Fix `--help` flag not correctly delegating to `man` when used with command aliases [#7388](https://github.com/bundler/bundler/pull/7388)
    - `bundle add` should cache newly added gems if an application cache exists [#7393](https://github.com/bundler/bundler/pull/7393)
    - Stop using an insecure folder as a "fallback home" when user home is not defined [#7416](https://github.com/bundler/bundler/pull/7416)
    - Fix `bundler/inline` warning about `Bundler.root` redefinition [#7417](https://github.com/bundler/bundler/pull/7417)
2019-11-11 18:56:25 +09:00
Hiroshi SHIBATA
1c2774526e
[bundler/bundler] Share test fixtures with parallel_tests
a38161c5be
2019-08-21 08:10:49 +09:00
David Rodríguez
ace88852f2
[bundler/bundler] Parallelize test suite
23007cb107
2019-08-21 08:10:48 +09:00
David Rodríguez
ede77d82e7
[bundler/bundler] Fix a couple of typos
52b6b94068
2019-08-21 07:58:46 +09:00
David Rodríguez
5a384e2c08 Fix some bundler specs (#2380)
* These seem to consistenly pass already

* Show actual command when running `make test-bundler`

Current the setup command that installs the necessary gems for testing
bundler was printed, but not the actual command that runs the tests.
That was a bit confusing.

* Borrow trick from setproctitle specs

* A title that long doesn't get set sometimes

No idea why, but the test doesn't need that the title is that long.

* Fix most gem helper spec ruby-core failures

* Fix the rest of the gem helper failures

* Fix version spec by improving the assertion

* Remove unnecessary `BUNDLE_RUBY` environment var

We can use `RUBY` when necessary, and `BUNDLE_RUBY` is not a good name
because bundler considers `BUNDLE_*` variables as settings.

* Rename `BUNDLE_GEM` to `GEM_COMMAND`

This is more descriptive I think, and also friendlier for bundler
because `BUNDLE_` env variables are interpreted by bundler as settings,
and this is not a bundler setting.

This fixes one bundler spec failure in config specs against ruby-core.

* Fix quality spec when run in core

Use the proper path helper.

* Fix dummy lib builder to never load default gems

If a dummy library is named as a default gem, when requiring the library
from its executable, the default gem would be loaded when running from
core, because in core all default gems share path with bundler, and thus
they are always in the $LOAD_PATH. We fix the issue by loading lib
relatively inside dummy lib executables.

* More exact assertions

Sometimes I have the problem that I do some "print debugging" inside
specs, and suddently the spec passes. This happens when the assertion is
too relaxed, and the things I print make it match, specially when they
are simple strings like "1.0" than can be easily be part of gem paths
that I print for debugging.

I fix this by making a more exact assertion.

* Detect the correct shebang when ENV["RUBY"] is set

* Relax assertion

So that the spec passes even if another paths containing "ext" are in
the load path. This works to fix a ruby-core issue, but it's a better
assertion in general. We just want to know that the extension path was
added.

* Use folder structure independent path helper

It should fix this spec for ruby-core.

* Fix the last failing spec on ruby-core

* Skip `bundle open <default_gem>` spec when no default gems
2019-08-20 09:46:31 +09:00
David Rodríguez
08c58e3c0d
[bundler/bundler] Extract a gemspec_dir helper
71a29e286a
2019-08-17 17:08:51 +09:00
David Rodríguez
4318405609
[bundler/bundler] Extract a root_gemspec local variable
a4beba4cbf
2019-08-17 17:08:51 +09:00
David Rodríguez
09455301ef
[bundler/bundler] Extract a with_root_gemspec helper
f20c2bdf6a
2019-08-17 17:08:51 +09:00
David Rodríguez
6a299906b4
[bundler/bundler] Extract a lib_tracked_files path helper
028dc46f5a
2019-08-17 17:08:50 +09:00
David Rodríguez
c896f71577
[bundler/bundler] Extract a tracked_files path helper
d35e31d2e0
2019-08-17 17:08:50 +09:00
David Rodríguez
30a4ec1fee
[bundler/bundler] Always use --backtrace when invoking gem CLI
For debuggability.

ac3e8db658
2019-08-17 17:08:50 +09:00
David Rodríguez
91c63828f7
[bundler/bundler] Extract a gem_bin path helper
8eedbecac0
2019-08-17 17:08:50 +09:00
David Rodríguez
745b286161
[bundler/bundler] Move lib helper together with path helpers
f2df73bdb4
2019-08-17 17:08:49 +09:00
David Rodríguez
ef2d415802
[bundler/bundler] Remove duplicated method
afdacd62ac
2019-08-17 17:08:49 +09:00
David Rodríguez
521a2d2beb [bundler/bundler] Revert "make system_bundle_bin_path helper and resolve failing tests for ruby < 2.6"
This reverts commit e63e844bc7444c6a489fcde0dc7011c6c4807edd.

It was introduced to resolve some failing tests at the cost of making
the intention of the spec much less clear.

Thanks to the previous fixes we have added to this spec, we can revert
that patch now.

b29a40820f
2019-08-16 14:30:23 +09:00
Hiroshi SHIBATA
b3b2b55f7b
[bundler/bundler] The keys for RbConfig::CONFIG was String.
ffc5e76335
2019-08-03 09:40:11 +09:00
David Rodríguez
e111f38f34
[bundler/bundler] Fix file:// handling under Windows
Windows paths do not start with a slash, so we add an extra slash to
separate the host from the path in file:// urls. Otherwise "D:" is
parsed as the host segment in the URI.

The path for those URLs now starts with "/", so we ignore that leading
character when using the URI's path.

This reduces Windows CI spec failures from 429 to 355.

1b7e274cbc
2019-08-03 09:29:55 +09:00