Граф коммитов

1761 Коммитов

Автор SHA1 Сообщение Дата
David Rodríguez 7dd0a22588 [rubygems/rubygems] Fix `simulate_windows` helper
It should also set the proper class variable so that `Gem.win_platform?`
returns true.

https://github.com/rubygems/rubygems/commit/0fbf6904d1
2022-07-08 02:22:35 +09:00
David Rodríguez 7b78aba53a [rubygems/rubygems] Account for default gems not having remote when caching
https://github.com/rubygems/rubygems/commit/b93d4de2ff
2022-07-02 19:41:02 +09:00
Nobuyoshi Nakada 0f06b8fa3e Relax `not_before` limit
Use the value as similar as other tests below.
Trying to fix sporadic “not yet valid” failures on some CIs.
2022-07-02 14:46:38 +09:00
Nobuyoshi Nakada c684b1aa26
Fix TODO in stringio/truncate_spec.rb 2022-07-01 09:08:25 +09:00
Koichi Sasada 5df20a5da5 stop CI failures.
302f353fd9 seems break the rubyspec.

@nobu please check it.
2022-07-01 01:45:39 +09:00
Kazuhiro NISHIYAMA 4b1f337ef2
Add more check to debug failures 2022-06-30 15:36:34 +09:00
David Rodríguez f9f85a513b [rubygems/rubygems] Print error messages just once in verbose mode
When running a command with the `--verbose` flag that ends up raising a
`BundlerError`, Bundler will unnecessarily print the error twice.

This commit fixes the issue by removing the duplicate logging.

https://github.com/rubygems/rubygems/commit/689004a164
2022-06-27 23:35:45 +09:00
Jeremy Evans c3eb0437f2 Fix Process.clock_gettime specs on OpenBSD 2022-06-26 12:39:16 -07:00
Benoit Daloze d3d5ef0cca Update to ruby/spec@ab32a1a 2022-06-26 14:50:14 +02:00
Benoit Daloze f616e81637 Update to ruby/mspec@78b5d86 2022-06-26 14:50:13 +02: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.

https://github.com/rubygems/rubygems/commit/d782984585
2022-06-26 11:16:11 +09:00
David Rodríguez 12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00
David Rodríguez 6f229da2c0 [rubygems/rubygems] Fix standalone script generation for statically linked dev ruby
https://github.com/rubygems/rubygems/commit/4d0d7b3c97
2022-06-23 18:17:37 +09:00
David Rodríguez 4f5eb48dea [rubygems/rubygems] Fix `bundle package --no-install` no longer skipping install
This is a regression from https://github.com/rubygems/rubygems/commit/cf749f8ffabd. The
funny thing is that we have a spec for this feature, so it was unclear
how we regressed here. It turns out there was a bug in one of our
negative matchers checking that gems ARE NOT included in a bundle.

This commit fixes the bug in the negative matcher and reverts
https://github.com/rubygems/rubygems/commit/cf749f8ffabd (with a slightly simpler diff).

https://github.com/rubygems/rubygems/commit/3f9a4ff32a
2022-06-23 18:17:08 +09:00
Nobuyoshi Nakada 883d13dc41 [Feature #18788] Spec for options as `String` to `Regexp.new`
Co-Authored-By: Janosch Müller <janosch.mueller@betterplace.org>
2022-06-20 19:35:12 +09:00
Nobuyoshi Nakada 39dc455b51 Spec update for warnning suspicious flag to `Regexp.new` 2022-06-20 19:35:12 +09:00
citrusmoose 8d689294d0 [rubygems/rubygems] Fix extension paths in generated standalone script
The paths for extensions of gems would contain the hardcoded ruby
version on which the extension was built. This will replace it with
runtime ruby version like the parent version directory. It will make the
standalone script compatible between different ruby version installations.

https://github.com/rubygems/rubygems/commit/a9dae93d5d
2022-06-20 16:04:47 +09:00
Jean Boussier eca31d24d6 [Bug #18813] Warn when autoload has to lookup in parent namespace
This is a verbose mode only warning.
2022-06-18 14:49:02 +02:00
David Rodríguez 78425d7e74 [rubygems/rubygems] Unset ENV set by official Ruby docker images
So that it does not interfere with our specs.

https://github.com/rubygems/rubygems/commit/1029714e21
2022-06-17 17:05:52 +09:00
Alan Wu e46292197f Fix spec version guard
Follow up for 278fefb962
2022-06-16 16:34:14 -04:00
Nobuyoshi Nakada 278fefb962 ENV.merge! support multile arguments [Feature #18279] 2022-06-17 01:22:24 +09:00
David Rodríguez d417c1ddc5 [rubygems/rubygems] Revert "Support running specs with asdf version manager"
This reverts commit https://github.com/rubygems/rubygems/commit/4b2d09af5bc7.

https://github.com/rubygems/rubygems/commit/90ca7a7163
2022-06-15 21:10:55 +09:00
David Rodríguez e09bdc11ec [rubygems/rubygems] Support running specs with asdf version manager
The `asdf-ruby` plugin sets `RUBYLIB` to require some code to reshim
after installing gems. This interferes with our specs.

Reset that, but leave any "internal" entries in places, because the
ruby-core test setup also uses RUBYLIB.

https://github.com/rubygems/rubygems/commit/4b2d09af5b
2022-06-15 18:14:21 +09:00
David Rodríguez d0bf31e6cf [rubygems/rubygems] Don't on gemspecs with invalid `require_paths`, just warn
These gemspecs already work most of the times. When they are installed
normally, the require_paths in the gemspec stub line becomes actually
correct, and the incorrect value in the real gemspec is ignored. It only
becomes an issue in standalone mode.

In Ruby 3.2, `Kernel#=~` has been removed, and that means that it
becomes harder for us to gracefully deal with this error in standalone
mode, because it now happens earlier due to calling `Array#=~` for this
invalid gemspec (since require_paths is incorrectly an array of arrays).

The easiest way to fix this is to actually make this just work instead
by automatically fixing the issue when reading the packaged gemspec.

https://github.com/rubygems/rubygems/commit/d3f2fe6d26
2022-06-12 02:02:20 +09:00
David Rodríguez f50432fba8 [rubygems/rubygems] Relax performance spec limit
https://github.com/rubygems/rubygems/commit/eab417d0ce
2022-06-07 21:04:53 +09:00
David Rodríguez eb5a01970f [rubygems/rubygems] Add test cases from SHA1 RFC and improve test failure message
I found that the current test cases did not cover the bitwise AND
performed on modified words after each iteration
(7e5765a66c/bundler/lib/bundler/digest.rb (L50))

https://github.com/rubygems/rubygems/commit/c8de819fee
2022-06-02 22:23:42 +09:00
David Rodríguez 1d924ae410 [rubygems/rubygems] Remove leftover debugging puts
https://github.com/rubygems/rubygems/commit/7c6f15040d
2022-06-02 19:30:48 +09:00
Ellen Marie Dash 1177665e62 [rubygems/rubygems] Fix `bundle remove` by invalidating cached `Bundle.defintion`.
Prior to this commit, `bundle add GEM_NAME` updated the lockfile,
but `bundle remove GEM_NAME` left GEM_NAME in the lockfile.

By invalidating the cached `Bundle.definition`, the existing code
handles that without a problem.

https://github.com/rubygems/rubygems/commit/aa0794d6a9
2022-06-01 19:01:18 +09:00
David Rodríguez 0a6b9924bd [rubygems/rubygems] Fix generated standalone script for default gems
The installer is actually rewriting the spec's full gem path to be the
one of the newly installed gem, however the accessor was not properly
working for `StubSpecification` instances, and default gems are always
of this type, because they are always present locally.

Fix the accessor to properly update the underlying full specification.

https://github.com/rubygems/rubygems/commit/efa41babfa
2022-06-01 17:07:35 +09:00
David Rodríguez fd83b8887f [rubygems/rubygems] Skip duplicated dependency warning for gemspec dev deps
Generally this warning is skipped for gemspec development dependencies.
I think because it's common to override them in the Gemfile to change
the source, for example.

But the order of conditions was not correct and the warning was still
being printed in one case.

https://github.com/rubygems/rubygems/commit/da9d1d6a3f
2022-06-01 00:14:31 +09:00
David Rodríguez e2b421d679 [rubygems/rubygems] Give better conflict resolution advice
This alternative really uses only the Gemfile, and can never end up
being absurd, because it will never be suggested when there's no
lockfile, and it suggests deleting the lockfile.

https://github.com/rubygems/rubygems/commit/5d154dd50e
2022-05-31 16:13:52 +09:00
David Rodríguez d6684f063b [rubygems/rubygems] Fix crash when commenting out a mirror in configuration
https://github.com/rubygems/rubygems/commit/2d99277328
2022-05-30 17:43:12 +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.

https://github.com/rubygems/rubygems/commit/3cd3dd142a
2022-05-30 17:42:39 +09:00
David Rodríguez 0d7d8f3777 [rubygems/rubygems] No need to use `FileUtils` to create symlinks
https://github.com/rubygems/rubygems/commit/70ff7cee9f
2022-05-30 17:42:38 +09:00
David Rodríguez 7001e34323 [rubygems/rubygems] Fix failing spec on Windows
https://github.com/rubygems/rubygems/commit/8e68c57457
2022-05-30 17:42:37 +09:00
Jeremy Evans 12e34a4276 Update rubyspec for stringio bug fix 2022-05-29 21:25:05 -07:00
David Rodríguez 08b82e6b40 [rubygems/rubygems] Ignore `Errno::EROFS` errors when creating `bundler.lock`
Apparently old versions of MacOS would set `GEM_HOME` to a `/System`
folder, and trying to create a file there raises `Errno::EROFS`.

We ignore the error. Any permission issues should be better handled
further down the line.

https://github.com/rubygems/rubygems/commit/ef90c071d0
2022-05-30 00:27:43 +09:00
David Rodríguez 373dabe00a [rubygems/rubygems] Ignore `Errno::EPERM` errors when creating `bundler.lock`
This kind of error can happen when setting `GEM_HOME` to a path
under MacOS System Integrity Protection.

We ignore the error. Any permission issues should be better handled
further down the line.

https://github.com/rubygems/rubygems/commit/174cb66863
2022-05-29 22:19:35 +09:00
David Rodríguez 6778d321a7 [rubygems/rubygems] Show better error when previous installation fails to be removed
Instead of guessing on the culprit.

We actually have a helper, `Bundler.rm_rf`, with exactly the behavior
that we want:

* Allow the passed folder to not exist.
* No exception swallowing other than that.

https://github.com/rubygems/rubygems/commit/5fa3e6f04a
2022-05-27 17:26:22 +09:00
David Rodríguez 633608ebd4 [rubygems/rubygems] Fix crash when printing resolution conflicts on metadata requirements
https://github.com/rubygems/rubygems/commit/b69e1e9374
2022-05-24 21:24:57 +09:00
Jean Boussier 65122d09d5 [Feature #18595] Alias String#-@ as String#dedup 2022-05-20 11:31:59 -07:00
Hiroshi SHIBATA aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
David Rodríguez 6850e3c42e [rubygems/rubygems] Fix locale dependent spec failure
https://github.com/rubygems/rubygems/commit/1fd818743e
2022-05-20 07:05:19 +09:00
David Rodríguez 4c9ddaac0d [rubygems/rubygems] Fix `Gemfile.lock` versions leaking to `bundler/inline` install output
The lockfile is completely ignored in inline mode, yet the previous
output would suggest it wasn't.

https://github.com/rubygems/rubygems/commit/763125a745
2022-05-13 15:23:56 +09:00
David Rodríguez 8f1a8e68ba [rubygems/rubygems] Fix error message on metadata mismatches
Previously we were removing not installable specs. However, if those are
the only ones, that would result in a bad error message. If we still
choose them as a last resort, Bundler will later check metadata right
before installing a give a proper error.

This is a regression of https://github.com/rubygems/rubygems/commit/565549260be5 and the
fix is to revert that commit.

https://github.com/rubygems/rubygems/commit/bc18912257
2022-05-11 16:55:49 +09:00
David Rodríguez c582d9862a [rubygems/rubygems] Tweak negative expectations
The follow a tweak on the yank message.

https://github.com/rubygems/rubygems/commit/f6817bfe58
2022-05-11 16:55:48 +09:00
David Rodríguez 54b1548760 [rubygems/rubygems] Extract a `next_ruby_minor` helper method for specs
https://github.com/rubygems/rubygems/commit/66eae0ef1d
2022-05-11 16:55:47 +09:00
David Rodríguez 00e5e827b1 [rubygems/rubygems] Cleanup old legacy code
https://github.com/rubygems/rubygems/commit/531d6b5fee
2022-05-09 21:25:23 +09:00
David Rodríguez 42538ad710 [rubygems/rubygems] Fix missing space in spec
https://github.com/rubygems/rubygems/commit/fabc357e70
2022-05-04 06:45:16 +09:00
Hiroshi SHIBATA 1056489ea3 Merge 3f7d0352e8 2022-04-28 19:08:49 +09:00