Commit graph

75 commits

Author SHA1 Message Date
David Rodríguez
8240fe88f3 [rubygems/rubygems] Prevent some test suite warnings about missing extensions
We fixed some issues recently where Bundler would try to activate a
pysch spec with missing extensions and crash. However, as a side effect,
we started printing warnings about missing extensions in situations
where we did not warn before.

It may be interesting to warn on these new situations too, but in order
to minimize changes for now, I'm reverting to printing warnings in the
same situations as before.

51ebff6982
2024-10-14 19:43:39 +00:00
David Rodríguez
d12c8cbf14 [rubygems/rubygems] Fix gem pristine etc resetting gem twice sometimes
If a default version and a regular version of etc are present at the
same time, RubyGems will end up duplicating work and running pristine
twice.

The `etc` gem is special because it's loaded by RubyGems by default.
When doing this, RubyGems will activate the regularly installed version.
The when `gem pristine` runs, it will find to installed specifications
but materialize both to the already activated specification.

Before:

```
$ gem pristine etc --version 1.4.3
Restoring gems to pristine condition...
Building native extensions. This could take a while...
Restored etc-1.4.3
Building native extensions. This could take a while...
Restored etc-1.4.3
```

After:

```
$ gem pristine etc --version 1.4.3
Restoring gems to pristine condition...
Skipped etc-1.4.3, it is a default gem
Building native extensions. This could take a while...
Restored etc-1.4.3
```

5c279ac56b
2024-10-10 14:54:04 +00:00
David Rodríguez
3fdf0e7e6d [rubygems/rubygems] Fix specs with missing extensions getting activated
c80998a22a
2024-10-10 14:51:32 +00:00
David Rodríguez
5228d349d9
[rubygems/rubygems] Restore gem_dir as an instance variable accessor
I suspect someone could be setting this instance variable, and the
previous changes made that no longer effective.

Also I implemented a previous TOOD in `full_gem_path` the other way
around:

> # TODO: This is a heavily used method by gems, so we'll need
> # to aleast just alias it to #gem_dir rather than remove it.

I made `gem_dir` an alias of `full_gem_path` rather than the opposite.

This alternative change keeps both methods symmetric without deprecating
either of them for now.

28983973a3
2024-09-24 15:33:31 +09:00
David Rodríguez
5f47f0f759
[rubygems/rubygems] Remove TODO I can't make much sense of
6d627e0671
2024-09-24 15:33:31 +09:00
David Rodríguez
ae214be9d6 [rubygems/rubygems] Fix TODO
2cd13005f6
2024-09-18 16:42:14 +00:00
David Rodríguez
c2f8e91815 [rubygems/rubygems] Also disambiguate gems not in the first Gem.path position
7e6e7ccc58
2024-06-13 14:25:14 +00:00
David Rodríguez
5c573b7652 [rubygems/rubygems] Fix default gem priority when sorting specs
8dbe1dbdc7

Co-authored-by: MSP-Greg <Greg.mpls@gmail.com>
2024-06-13 14:25:14 +00:00
David Rodríguez
10c256f98f Sychronize with rubygems/rubygems repo 2024-06-01 01:13:55 +09:00
Hiroshi SHIBATA
ba8e6e77fd
Revert "[rubygems/rubygems] Fix gem pristine sometimes failing to pristine user installed gems"
This reverts commit a3edc4abc5.

That commit caused test failure with Windows platform.

* 2556187139
* 2556187306
2024-05-30 12:46:19 +09:00
David Rodriguez
a3edc4abc5 [rubygems/rubygems] Fix gem pristine sometimes failing to pristine user installed gems
0eb6ed8f86
2024-05-29 15:35:04 +00:00
Hiroshi SHIBATA
82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
David Rodríguez
e2d7e53c5c [rubygems/rubygems] This can be frozen now
d06544add2
2023-11-13 11:06:10 +09:00
David Rodríguez
3757d9027c [rubygems/rubygems] Remove now unnecessary dups
56ce2a6445
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
10c26a483d
2023-11-13 11:06:10 +09:00
Samuel Giddins
4023637d20 [rubygems/rubygems] Reduce allocations for stub specifications
This helps with memory usage during application boot time

```
==> memprof.after.txt <==
Total allocated: 1.43 MB (18852 objects)
Total retained:  421.12 kB (4352 objects)

==> memprof.before.txt <==
Total allocated: 2.43 MB (28355 objects)
Total retained:  469.69 kB (5425 objects)
```

See https://bugs.ruby-lang.org/issues/19890 about the readline
allocations

d7eb66eee3
2023-09-19 07:25:51 +00:00
Hiroshi SHIBATA
827d66266b [rubygems/rubygems] auto-correct Style/YodaCondition
6d9e8025dc
2023-06-15 07:01:28 +09:00
Hiroshi SHIBATA
fb822076d7 [rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation
67ece7b8b6
2023-04-06 23:33:20 +00:00
Hiroshi SHIBATA
f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
bec069b0ca [rubygems/rubygems] util/rubocop -A --only Style/MultilineMemoization
c1f6e4a97b
2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA
8a364b8512 [rubygems/rubygems] util/rubocop -A --only Style/MultilineTernaryOperator
be853dfe3b
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
f86296fa0a [rubygems/rubygems] util/rubocop -A --only Style/EmptyElse
04227104ac
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
03b82d1865 [rubygems/rubygems] util/rubocop -A --only Style/SingleLineMethods
fa2e835ed2
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
4bb5ce8188 [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation
cb554f6eb7
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
4b285e5c6f [rubygems/rubygems] util/rubocop -A --only Layout/AssignmentIndentation
8e64298989
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
44264b4fee Merge rubygems/bundler HEAD.
Pick from dfbb5a3811
2022-08-09 12:05:19 +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
f04954d95c
[rubygems/rubygems] Normalize end alignment style with Bundler
f7f504b24c
2022-01-19 11:20:36 +09:00
Hiroshi SHIBATA
b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc1 is obsoleted with
  https://github.com/rubygems/rubygems/pull/3820
2020-09-23 22:01:44 +09:00
Hiroshi SHIBATA
31a6eaabc1
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23 21:02:56 +09:00
David Rodríguez
a89665b7b1 Enforce no empty lines around class body in rubygems
To normalize the code style with `bundler`.
2020-07-31 21:07:19 +09:00
David Rodríguez
955f1837a1 Use space inside block braces everywhere
To make rubygems code style consistent with bundler.
2020-06-15 21:20:37 +09:00
Benoit Daloze
fe2b83e225 [rubygems/rubygems] Fix platform comparison bug in #contains_requirable_file?
* One should not compare RUBY_ENGINE and Gem::Platform.
* Introduced in https://github.com/rubygems/rubygems/pull/2672

0e62c3be91
2020-05-08 07:38:50 +09:00
bronzdoc
7db538a7c9 [rubygems/rubygems] Rename version horizon deprecation methods
6afd914fda
2020-05-08 07:38:50 +09:00
bronzdoc
ff37dd7e9e [rubygems/rubygems] Modify files to use new version horizon deprecations
4fe5bb5bf3
2020-05-08 07:38:50 +09:00
Hiroshi SHIBATA
600a715c9b
Merge the current master branch of rubygems/rubygems.
Just started to develop RubyGems 3.2.0.
2020-02-01 11:14:57 +09:00
Hiroshi SHIBATA
7d463e360b Merge RubyGems 3.1.0.pre3
* Fix gem pristine not accounting for user installed gems. Pull request
    #2914 by Luis Sagastume.
  * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by
    SHIBATA Hiroshi.
  * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi
    Nakada.
  * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans.
  * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez.
  * Clarify symlink conditionals in tests. Pull request #2962 by David
    Rodríguez.
  * Update command line parsing to work under ps. Pull request #2966 by
    David Rodríguez.
  * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by
    David Rodríguez.
  * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request
    #2985 by MSP-Greg.
2019-11-11 16:59:49 +09:00
David Rodríguez
d9e6315177
[rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offenses
d4fc383497
2019-09-05 18:48:15 +09:00
Nobuyoshi Nakada
e6901cea74
Fixed deprecation message 2019-08-07 10:41:12 +09:00
Vít Ondruch
a3b784b3a0
[rubygems/rubygems] Move default specifications dir definition out of BasicSpecification.
This was never the right place. The method got there just by evolution,
not by design. Move it within default methods, where it suits better.

Since this method is presumably used just internally, it should be safe
to deprecate it and remove later.

0c0dd9458a
2019-07-31 07:47:02 +08:00
hsbt
f28be7e02d Merge rubygems/rubygems from upstream.
The current master branch is
  97b264f0fa

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02 11:48:18 +00:00
hsbt
4c1952f4bf Ignore to handle the different platform
When `GEM_HOME` was shared with CRuby and JRuby. RubyGems try to
  handle both platforms. It should be ignored the different platform.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-07 11:24:48 +00:00
hsbt
4ae3df42f7 Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9c
This version contains the some style changes by RuboCop.

    * 9d810be0ed
    * 61ea98a727
    * 795893dce3
    * 9be7858f7f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 12:59:03 +00:00
hsbt
5335ce0e06 Merge master branch from rubygems/rubygems upstream.
* Enable Style/MethodDefParentheses in Rubocop
    https://github.com/rubygems/rubygems/pull/2478
  * Enable Style/MultilineIfThen in Rubocop
    https://github.com/rubygems/rubygems/pull/2479
  * Fix required_ruby_version with prereleases and improve error message
    https://github.com/rubygems/rubygems/pull/2344
  * Fix bundler rubygems binstub not properly looking for bundler
    https://github.com/rubygems/rubygems/pull/2426

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 10:20:47 +00:00
hsbt
85d461456c Merge master branch from rubygems upstream.
* It's preparation to release RubyGems 3.0.0.beta2 and Ruby 2.6.0
    preview 3.
  * https://github.com/rubygems/rubygems/compare/v3.0.0.beta1...fad2eb15a282b19dfcb4b48bc95b8b39ebb4511f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27 10:05:04 +00:00
hsbt
43e320ba1b Merge rubygems master(ddbf3203f3857649abe95c73edefc7de7e6ecff4).
It fixed: https://github.com/rubygems/rubygems/issues/2041

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-20 09:03:37 +00:00
hsbt
c00e84327f Merge rubygems master.
This is RC version of Rubygems 2.7.0.
  688fb7e83c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-08 01:32:18 +00:00
hsbt
469bac0f92 * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.3.
Please see entries of 2.6.3 on
  https://github.com/rubygems/rubygems/blob/master/History.txt

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-06 06:01:14 +00:00
hsbt
5a90f9e8f8 * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.1.
Please see entries of 2.6.0 and 2.6.1 on
  https://github.com/rubygems/rubygems/blob/master/History.txt
  [fix GH-1270] Patch by @segiddins

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-04 00:29:40 +00:00