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

301 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 00dc1cace8 Reapply "[rubygems/rubygems] Fix activation conflicts when circularly requiring a gem"
This reverts commit 04cf66765a.
2024-01-22 09:57:10 +09:00
Hiroshi SHIBATA 04cf66765a
Revert "[rubygems/rubygems] Fix activation conflicts when circularly requiring a gem"
This reverts commit db44088c2a.

  https://github.com/ruby/ruby/actions/runs/7578672002/job/20641640821
  https://github.com/ruby/ruby/actions/runs/7578672002/job/20641641212
  https://github.com/ruby/ruby/actions/runs/7578672002/job/20641642031
2024-01-19 11:54:17 +09:00
David Rodríguez db44088c2a [rubygems/rubygems] Fix activation conflicts when circularly requiring a gem
If a gem is required circular, and there are unresolved specs depending
on it, we may end up in an activation conflict.

The solution is to not try to activate unresolved gems when requiring a
default gem, regardless of it having already been activated or not.

https://github.com/rubygems/rubygems/commit/3b2b8f4e3e
2024-01-19 11:28:11 +09:00
Hiroshi SHIBATA 0e8b1973b4 [rubygems/rubygems] bin/rubocop -A --only Style/RedundantReturn
https://github.com/rubygems/rubygems/commit/ade728914f
2024-01-11 13:51:52 +09:00
Hiroshi SHIBATA 1966a61a1e Merge RubyGems-3.6.0.dev and Bundler-2.6.0.dev from master branch 2023-12-25 21:12:49 +09:00
Hiroshi SHIBATA 7d7a84e99f Merge RubyGems-3.5.3 and Bundler-2.5.3 2023-12-23 09:34:26 +09:00
Hiroshi SHIBATA 82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
Hiroshi SHIBATA 711e85674e
Pin versions that are RubyGems 2.5.1 and Bundler 2.5.1 2023-12-16 10:13:35 +08:00
Benoit Daloze a94a2eea34 [rubygems/rubygems] Upstream RubyGems changes from TruffleRuby
https://github.com/rubygems/rubygems/commit/749a508968
2023-12-08 17:01:23 +00:00
Eric Mueller b1b78c4f9f [rubygems/rubygems] Introduce the Gem::CIDetector
This is based on the list in Gem::UpdateSuggestion and Bundler::Fetcher;
these have similar purposes (determining whether/what CI we're executing
in), and can benefit from being combined and updated (they're both
slightly out of date).

Noteable changes:
* We'll consider ourselves to be on a CI in more cases - if CI_NAME or
  TASKCLUSTER_ROOT_URL are set specifically, since those represent two
  cases that were either overlooked or are no longer covered by the
  existing implementation. (Or possibly TaskCluster still does provide
  RUN_ID, but failed to document it)
* We will notice/track a few additional services in ci_strings (cirrus,
  dsari, taskcluster), stop tracking 'snap' (they went under in 2017),
  and update buildbox to buildkite (they've been called that for 8
  years, and the BUILDBOX envs have been deprecated for 3).
* We'll also sort/uniq/downcase the values (all of which only matter
  because of the special case of CI_NAME).

https://github.com/rubygems/rubygems/commit/60652b942f
2023-12-06 20:05:23 +00:00
David Rodríguez a4d80eee17 [rubygems/rubygems] Let RuboCop target Ruby 3.0
https://github.com/rubygems/rubygems/commit/70243b1d72
2023-11-13 11:06:10 +09:00
David Rodríguez 54511303a4 [rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in RubyGems
https://github.com/rubygems/rubygems/commit/10c26a483d
2023-11-13 11:06:10 +09:00
Josef Šimánek 25b536cc2f
[rubygems/rubygems] Fix invalid links in documentation. - wrap ENV variables in <code> - fix rubygems.org link - fix zenspider.com link
https://github.com/rubygems/rubygems/commit/9eaac94a63
2023-10-03 16:13:18 +09:00
Samuel Giddins d182d83ce9 [rubygems/rubygems] Add a Marshal.load replacement that walks an AST to safely load permitted classes/symbols
https://github.com/rubygems/rubygems/commit/7e4478fe73
2023-09-20 02:02:58 +00:00
Hiroshi SHIBATA d89cc317c6
util/rubocop -A --only Style/NumericLiteralPrefix 2023-04-11 19:12:28 +09:00
Hiroshi SHIBATA 250e97c0fb [rubygems/rubygems] util/rubocop -A --only Style/FormatString
https://github.com/rubygems/rubygems/commit/132a56569d
2023-04-07 05:13:05 +00:00
Hiroshi SHIBATA a881b33818 [rubygems/rubygems] util/rubocop -A --only Performance/RegexpMatch
https://github.com/rubygems/rubygems/commit/52ae4452c2
2023-04-04 12:20:43 +00:00
Hiroshi SHIBATA f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 2e3cd1dc3e [rubygems/rubygems] Enabled Style/RedundantReturn cop
https://github.com/rubygems/rubygems/commit/05cc97bdf8
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 1a60012612 [rubygems/rubygems] util/rubocop -A --only Lint/RescueException
https://github.com/rubygems/rubygems/commit/e8a5db50af
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 1ca67f13cd util/rubocop -A --only Style/RedundantSelf 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 5211900d37 util/rubocop -A --only Style/SymbolProc 2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 72d09a568f [rubygems/rubygems] util/rubocop -A --only Style/RedundantBegin
https://github.com/rubygems/rubygems/commit/b595d3cf0f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 2db7673825 [rubygems/rubygems] util/rubocop -A --only Style/DoubleNegation
https://github.com/rubygems/rubygems/commit/01c2b5542f
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA d8c5fa963f [rubygems/rubygems] util/rubocop -A --only Style/YodaCondition
https://github.com/rubygems/rubygems/commit/3594945391
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
https://github.com/rubygems/rubygems/commit/cb554f6eb7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 9a1269eaaa [rubygems/rubygems] util/rubocop -A --only Layout/MultilineArrayBraceLayout
https://github.com/rubygems/rubygems/commit/f4f45ab27e
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA fe1b0661cb [rubygems/rubygems] Removed RUBY_PATCHLEVEL and modify condition for ruby_version
https://github.com/rubygems/rubygems/commit/b420e287a3
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA 8c6b349805 [rubygems/rubygems] Removed `Gem.datadir`.
https://github.com/rubygems/rubygems/pull/2216 is imcomplete to remove this method.

https://github.com/rubygems/rubygems/commit/34ef915d12
2023-03-13 09:54:04 +00:00
David Rodríguez 4cbfd87e5a [rubygems/rubygems] Allow disabling RubyGems require decorations
Currently Bundler needs to do cumbersome operations to revert custom
RubyGems require on a `bundler/setup` context. This causes issues when
third party gems also monkeypatch require, since Bundler will also undo
those decorations.

This commit allows it to use the simpler approach of properly telling
RubyGems that it needs to default to built-in require without any extra
magic.

https://github.com/rubygems/rubygems/commit/1df5009e14

Co-authored-by: Xavier Noria <fxn@hashref.com>
2023-01-31 10:49:08 +09:00
Hiroshi SHIBATA a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Nobuyoshi Nakada 1a1b653c9c [rubygems/rubygems] Let RDoc parse the doc of `Kernel#require`
Since RDoc does not parse string literals as documents, `eval` the
entire file instead of embedding in a here-document.
On the contrary, as `gem_original_require` alias is an implementation
detail but not for users, it should not be documented.

https://github.com/rubygems/rubygems/commit/cad4cf16cf
2023-01-08 08:09:33 +00:00
Hiroshi SHIBATA b7ad60a794 Merge RubyGems/Bundler master
from 72fd3dd209
2022-12-26 15:09:21 +09:00
David Rodríguez 8f05e4f54b Update Bundler to 2.4.1 & and RubyGems to 3.4.1 2022-12-25 05:55:36 +09:00
Hiroshi SHIBATA f6620037ba Merge RubyGems-3.4.0 and Bundler-2.4.0 2022-12-24 16:57:07 +09:00
Ellen Marie Dash 82b86b4c97 [rubygems/rubygems] Delete partial file and re-raise on Errno::ENOSPC.
Add test for not leaving empty files if ENOSPC is raised during 'gem install'

https://github.com/rubygems/rubygems/commit/8e0e20f079
2022-12-02 19:21:08 +00:00
Yusuke Endoh bc3ac86795 [rubygems/rubygems] require bundler/setup only when Bundler is not defined
... to prevent "circular require" when `--disable-gems` is used.

This is a simplified case of e5a0abc5de

```
$ bundle exec ruby -we 'system("ruby", "-w", "--disable-gems", "-e", "")'
<internal:/home/mame/work/ruby/local/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85: warning: <internal:/home/mame/work/ruby/local/lib/ruby/3.2.0+3/rubygems/core_ext/kernel_require.rb>:85: warning: loading in progress, circular require considered harmful - /home/mame/work/ruby/local/lib/ruby/3.2.0+3/bundler/setup.rb
```

When bundler/setup is require'ed under --disable-gems mode, it loads
rubygems by `require "rubygems" unless defined?(Gem)` in
0b1f682a6d/bundler/lib/bundler/rubygems_integration.rb (L3)
In this case, require'ing bundler/setup from rubygems.rb is circular.

This change makes rubygems.rb to require "bundler/setup" only when
`Bundler` is not defined.

https://github.com/rubygems/rubygems/commit/b4608dee5e
2022-12-02 04:12:16 +00:00
Yusuke Endoh b5f809c496 [rubygems/rubygems] Load "bundler/setup" in lib/rubygems.rb
Ruby interpreter loads some special gems at startup: did_you_mean,
error_highlight, and syntax_suggest. These gems are loaded before
`bundler/setup` is loaded by `RUBYOPT=-rbundler/setup`.
So, the versions of the gems are not controllable by Gemfile.

This change will `require "bundler/setup"` in rubygems.rb (i.e., before
the special gems are loaded). Now `bundle exec` sets an environment
variable `BUNDLER_SETUP`, and rubygems requires the variable if defined.

See also: https://bugs.ruby-lang.org/issues/19089

https://github.com/rubygems/rubygems/commit/963cb65a2d
2022-11-10 22:45:31 +00:00
Hiroshi SHIBATA 44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +09:00
Hiroshi SHIBATA 71794a75db Merge rubygems/bundler HEAD
Pick from 8331e63263
2022-08-03 13:14:10 +09:00
Takuya Noguchi d7ffd3fea4
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-07-22 12:07:23 +09:00
David Rodríguez fd0902bfcd [rubygems/rubygems] Move fileutils require to be even more lazy
If directories are already created (the common case), fileutils won't be
required at all.

https://github.com/rubygems/rubygems/commit/63a9b94fc9
2022-07-18 23:24:38 +09:00
David Rodríguez f83c5de6d5 [rubygems/rubygems] Improve error message when `operating_system.rb` fails to load
Show an absolute path instead of an unhelpful relative path.

https://github.com/rubygems/rubygems/commit/f1eed36e2f
2022-06-27 17:03:24 +09:00
David Rodríguez 12a5fa408b Sync RubyGems & Bundler with upstream repo 2022-06-24 10:52:02 +09:00
David Rodríguez ba38318827 [rubygems/rubygems] Unify loading `Gem::Requirement`
It was being explicitly required from `Gem::Specification` but also a
strange autoload was set for it at `Gem::Version`. The autoload was non
standard because it should've been done in the `Gem` module, not in
`Gem::Specification`, since that's where the constant is expected to get
defined. Doing this might get deprecated in the future, and it was not
being effective anyways due to the explicit require.

Unify everything with an `autoload` at the right place.

https://github.com/rubygems/rubygems/commit/174ea3e24c
2022-06-06 18:36:31 +09:00
Hiroshi SHIBATA aeea88174d
Merge RubyGems and Bundler HEAD
125415593e
2022-05-20 17:32:19 +09:00
Hiroshi SHIBATA 1056489ea3 Merge 3f7d0352e8 2022-04-28 19:08:49 +09:00
Hiroshi SHIBATA 678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
Peter Zhu 1a2490b564 [rubygems/rubygems] Fix formatting in docs
rdoc uses + for typewriter font rather than backticks.

https://github.com/rubygems/rubygems/commit/be320f1e0c
2022-04-14 16:24:09 +09:00
Kazuhiro NISHIYAMA 7aabdbe837 [rubygems/rubygems] Fix a typo
https://github.com/rubygems/rubygems/commit/3e06a91435
2022-03-15 11:37:43 +09:00