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

66 Коммитов

Автор SHA1 Сообщение Дата
なつき 1b408e659a Refactor and fix usage of Gem.ruby 2023-03-23 17:18:49 +09:00
なつき 22d037f4cc Move duplicated logic to parent class 2023-03-23 17:18:49 +09:00
なつき e46d473396 Make sure native extensions are loaded correctly in ext_conf builder 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA f24a86d83f util/rubocop -A --only Layout/EmptyLineAfterMagicComment 2023-03-23 17:18:49 +09:00
Hiroshi SHIBATA 66bd2c1a1c [rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotation
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA ab2278eb34 [rubygems/rubygems] util/rubocop -A --only Lint/UselessAccessModifier
https://github.com/rubygems/rubygems/commit/5070f90987
2023-03-17 18:50:55 +09:00
Eloy Espinaco 0a9544ce4a [rubygems/rubygems] Cleanup intermediate artifacts after installing built extensions
https://github.com/rubygems/rubygems/commit/98b6a959bd
2022-12-20 13:15:02 +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 1e8bf48fd5 [rubygems/rubygems] Bring TODO message up to date
https://github.com/rubygems/rubygems/commit/e07dba0923
2022-06-17 17:05:21 +09:00
David Rodríguez 5450b409fc [rubygems/rubygems] Remove part of comment that fell out of date
https://github.com/rubygems/rubygems/commit/272ac23aa8
2022-06-17 17:05:20 +09:00
David Rodríguez 8855b68f97 [rubygems/rubygems] Don't modify RbConfig at all when building extensions
Instead, pass sitearchdir and sitelibdir directly to `make`.

This also removes the need to create and use the siteconf file at all
when generating makefiles.

https://github.com/rubygems/rubygems/commit/dea41fa2dc
2022-06-17 17:05:20 +09:00
David Rodríguez 1aaeff8e36 [rubygems/rubygems] Remove unnecessary condition
This variable can't be falsy.

https://github.com/rubygems/rubygems/commit/b838f9a6f0
2022-06-17 17:05:19 +09:00
David Rodríguez 5a385677f3 [rubygems/rubygems] No need to change `RbConfig::CONFIG` at all
Only `RbConfig::MAKEFILE_CONFIG` is actually used.

https://github.com/rubygems/rubygems/commit/b767cc0929
2022-06-17 17:05:19 +09:00
Hiroshi SHIBATA 678d58c850 Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5 2022-04-28 19:08:49 +09:00
David Rodríguez 9cddc0ec94
[rubygems/rubygems] Lazily load `shellwords` library
https://github.com/rubygems/rubygems/commit/e5532ef886
2021-07-27 09:25:56 +09:00
David Rodríguez 6e2240a2f9 Sync latest bundler & rubygems development version 2021-07-07 13:30:20 +09:00
Hiroshi SHIBATA 4aca77edde Merge prepare version of RubyGems 3.2.0 2020-12-08 17:30:02 +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
Benoit Daloze d7492a0be8 Revert changes to rdoc & rubygems regarding Tempfile.open(&block)
* They likely want to support older Ruby/tempfile versions
* Reverts part of e8c3872555
2020-08-29 12:49:20 +02:00
Benoit Daloze e8c3872555 Simplify Tempfile.open calls with a block as they now unlink the file automatically 2020-08-29 12:23:23 +02: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
David Rodríguez 8e5fe13c08 [rubygems/rubygems] Delay `fileutils` loading to fix some warnings
If the following conditions are met:

* You have a default version of fileutils and a higher version of
fileutils installed as a regular gem. This case is common on ruby 2.6.

* You use a bundler generated binstub on a gem setup with a `Gemfile`
using the `gemspec` DSL.

Then `fileutils` redefinition warnings happen because of the following:

The gist of a bundler generated binstub is:

```ruby
require "bundler/setup"
load Gem.bin_path("rake", "rake")
```

First configure bundler, then load the requested gem.

When `require "bundler/setup"` is called under the previously mentioned
setup, `ext_conf_builder.rb` ends up being required because of the new
validation that gemspecs with rake extensions depend on `rake`. And that
loads the latest version of `fileutils` because of using "rubygems
monkeypatched require" that auto-chooses the latest version of default
gems.

After that, when `Gem.bin_path` gets called, `ext_conf_builder.rb` gets
required again, but this time already using "bundler's unmonkeypatched
require" which means the default version is chosen and thus the
redefinition warning happens.

The solution as usual is to lazily load `fileutils`.

https://github.com/rubygems/rubygems/commit/08d64e5f06
2020-06-05 07:32:42 +09:00
David Rodríguez ba9dcdab36
[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygems
So it matches the style used by bundler.

https://github.com/rubygems/rubygems/commit/ab0580fd65
2020-03-30 12:42:10 +09:00
Hiroshi SHIBATA 8eb2921f56 [rubygems/rubygems] Fixed to warn with shadowing outer local variable.
https://github.com/rubygems/rubygems/commit/b0588a87b1
2019-08-05 18:44:46 +09:00
David Rodríguez 0817d95714
[rubygems/rubygems] Enable `Layout/EmptyLinesAroundAccessModifier`
https://github.com/rubygems/rubygems/commit/41b1cebc33
2019-07-31 07:47:02 +08:00
David Rodríguez d64cc80b66
[rubygems/rubygems] Migrate extension builder to use Open3
Since it works on jruby.

https://github.com/rubygems/rubygems/commit/5229e00df4
2019-07-31 07:47:00 +08: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 3e047420d6 Merge upstream from rubygems/rubygems master branch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-31 03:23:30 +00:00
hsbt 615ac35934 Merge rubygems master branch from github.com/rubygems/rubygems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22 00:27:02 +00:00
hsbt 8da8d4b043 Merge RubyGems 3.0.0.beta1.
* It drop to support < Ruby 2.2
  * Cleanup deprecated methods and classes.
  * Mark obsoleted methods to deprecate.
  * and other enhancements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-30 13:01:35 +00:00
nobu 66b54b1a4a fix tempfile leaks on Windows
* lib/rubygems/ext/ext_conf_builder.rb (build): needs to close
  before unlink on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16 05:47:53 +00:00
hsbt 5d43821536 Update Rubygems 2.6.10
* 2ee5bf9fd3
 * be510dd409

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 02:38:57 +00:00
hsbt a21d403f21 * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.
It supports to enable frozen string literal and add `--norc` option for
  disable to `.gemrc` configuration.
  See 2.5.2 release notes for other fixes and enhancements.
  a8aa3bac72/History.txt (L3)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01 12:43:26 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
hsbt effdbf5936 * lib/rubygems: Update to RubyGems HEAD(c202db2).
this version contains many enhancements see http://git.io/vtNwF
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-01 21:50:14 +00:00
drbrain 97f80207d0 * lib/rubygems: Update to RubyGems 2.4.5.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 00:53:01 +00:00
hsbt 4de117a615 * lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)
Complete history at:
  https://github.com/rubygems/rubygems/blob/master/History.txt#L3-L216
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-14 03:30:02 +00:00
nobu 76e37aa636 ext_conf_builder.rb: fix tempfile leak
* lib/rubygems/ext/ext_conf_builder.rb (build): ensure to remove
  temporary siteconf script.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-26 14:36:36 +00:00
drbrain ea2a00d785 * lib/rubygems: Update to RubyGems 2.2.2 prerelease to check fixes to
CI.
	* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04 00:48:31 +00:00
drbrain e80f2c118a * lib/rubygems: Update to RubyGems master 1c5f4b3. Allows rubygems
repackagers to disable backward-compatible shared gem directory
  behavior.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 20:18:29 +00:00
drbrain 673efdceef * lib/rubygems: Update to RubyGems master baa965b. Notable changes:
Copy directories to lib/ when installing extensions.  This completes
  the fix for [ruby-trunk - Bug #9106]

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-01 20:52:57 +00:00
drbrain a7fa4d5d9a * lib/rubygems: Update to RubyGems master 6a3d9f9. Changes include:
Compatibly renamed Gem::DependencyResolver to Gem::Resolver.

  Added support for git gems in gem.deps.rb and Gemfile.

  Fixed resolver bugs.

* test/rubygems: ditto.

* lib/rubygems/LICENSE.txt:  Updated to license from RubyGems trunk.
  [ruby-trunk - Bug #9086]

* lib/rubygems/commands/which_command.rb:  RubyGems now indicates
  failure when any file is missing.  [ruby-trunk - Bug #9004]

* lib/rubygems/ext/builder:  Extensions are now installed into the
  extension install directory and the first directory in the require
  path from the gem.  This allows backwards compatibility with msgpack
  and other gems that calculate full require paths.
  [ruby-trunk - Bug #9106]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-19 00:34:13 +00:00
drbrain a1d96c9f47 * lib/rubygems: Update to RubyGems master 2abce58. Changes:
Fixed documentation generation when sdoc and json are installed as
  gems.

  Added some missing documentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 22:37:39 +00:00
drbrain 4c2304f000 * lib/rubygems: Import RubyGems from master as of commit b165260
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 22:46:50 +00:00
naruse 7bc77b76fe Use Tempfile.create to unlink the tempfile on Windows
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 08:27:34 +00:00
drbrain cd9f9e4719 * lib/rubygems/ext/ext_conf_builder.rb: Remove siteconf file after
building the gem.
* test/rubygems/test_gem_ext_ext_conf_builder.rb:  Test for the above.

* lib/rubygems/psych_tree.rb (module Gem):  Add backward compatibility
  for r41148

* test/rubygems/test_gem_package.rb:  Add backward compatibility for
  double-slash elimination.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09 22:34:58 +00:00