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

71 Коммитов

Автор SHA1 Сообщение Дата
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
David Rodríguez 3921ab8291 [rubygems/rubygems] Let more exceptions flow
If any error happens while verifying a package entry, it doesn't mean
that the package is corrupt. It could be a bug in rubygems, for example.
This in fact happened in CI and the current error doesn't make it easy
to troubleshoot the root cause, since it doesn't provide a backtrace.

See
https://github.com/rubygems/rubygems/pull/3807/checks?check_run_id=862526615.

So I propose to let the exception happens. There was something useful
about the previous message, which is the file entry where the error
happened, so I'm keeping that information in a warning message.

https://github.com/rubygems/rubygems/commit/ece87d858f
2020-07-31 21:07:19 +09:00
Bart de Water 8161cf85ba Stop using deprecated OpenSSL::Digest constants 2020-07-31 21:07:19 +09:00
Karol Bucek e7b6e0ff58 [rubygems/rubygems] remove explicit require(s) for auto-loaded constant(s)
the Gem module's auto-loads will handle loading these as needed,

this started as a redundancy found in *rubygems.rb* which had:
`autoload :Specification, 'rubygems/specification'` as well as
`require 'rubygems/specification'`

https://github.com/rubygems/rubygems/commit/43ceae7ac0
2020-07-31 21:07:19 +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 49c42b6012 Remove encoding magic comments
They are no longer needed since ruby 2.0.
2020-06-15 21:20:37 +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
bronzdoc 4edfc50283 [rubygems/rubygems] Make sure rubygems/package can be directly required reliably
https://github.com/rubygems/rubygems/commit/73c199b087
2020-06-05 07:32:42 +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
Nobuyoshi Nakada caa9d0bd78
[rubygems/rubygems] Always pass an encoding option to Zlib::GzipReader.wrap
The arity of this method has been -1 since the import, so the
option has been passed always, even if Zlib::GzipReader#initialize
does not take the option.  Actually it takes the option since 1.9.

https://github.com/rubygems/rubygems/commit/2fcde0f4e0
2019-10-05 10:50:01 +09:00
Ellen Marie Dash 508afe2c26
[rubygems/rubygems] Set SOURCE_DATE_EPOCH env var if not provided.
Fixes #2290.

1. `Gem::Specification.date` returns SOURCE_DATE_EPOCH when defined,
2. this commit makes RubyGems set it _persistently_ when not provided.

This combination means that you can build a gem, check the build time,
and use that value to generate a new build -- and then verify they're
the same.

https://github.com/rubygems/rubygems/commit/d830d53f59
2019-09-26 17:48:00 +09:00
Daniel Berger 8436b2717c
[rubygems/rubygems] Add a gem attr to the Gem::Package class.
https://github.com/rubygems/rubygems/commit/5b81f364ae
2019-09-26 17:48:00 +09:00
Jeremy Evans 80b5a0ff2a
Make rb_scan_args handle keywords more similar to Ruby methods (#2460)
Cfuncs that use rb_scan_args with the : entry suffer similar keyword
argument separation issues that Ruby methods suffer if the cfuncs
accept optional or variable arguments.

This makes the following changes to : handling.

* Treats as **kw, prompting keyword argument separation warnings
  if called with a positional hash.

* Do not look for an option hash if empty keywords are provided.
  For backwards compatibility, treat an empty keyword splat as a empty
  mandatory positional hash argument, but emit a a warning, as this
  behavior will be removed in Ruby 3.  The argument number check
  needs to be moved lower so it can correctly handle an empty
  positional argument being added.

* If the last argument is nil and it is necessary to treat it as an option
  hash in order to make sure all arguments are processed, continue to
  treat the last argument as the option hash. Emit a warning in this case,
  as this behavior will be removed in Ruby 3.

* If splitting the keyword hash into two hashes, issue a warning, as we
  will not be splitting hashes in Ruby 3.

* If the keyword argument is required to fill a mandatory positional
  argument, continue to do so, but emit a warning as this behavior will
  be going away in Ruby 3.

* If keyword arguments are provided and the last argument is not a hash,
  that indicates something wrong. This can happen if a cfunc is calling
  rb_scan_args multiple times, and providing arguments that were not
  passed to it from Ruby.  Callers need to switch to the new
  rb_scan_args_kw function, which allows passing of whether keywords
  were provided.

This commit fixes all warnings caused by the changes above.

It switches some function calls to *_kw versions with appropriate
kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS
is used.  If creating new arguments, RB_PASS_KEYWORDS is used if
the last argument is a hash to be treated as keywords.

In open_key_args in io.c, use rb_scan_args_kw.
In this case, the arguments provided come from another C
function, not Ruby.  The last argument may or may not be a hash,
so we can't set keyword argument mode.  However, if it is a
hash, we don't want to warn when treating it as keywords.

In Ruby files, make sure to appropriately use keyword splats
or literal keywords when calling Cfuncs that now issue keyword
argument separation warnings through rb_scan_args.  Also, make
sure not to pass nil in place of an option hash.

Work around Kernel#warn warnings due to problems in the Rubygems
override of the method.  There is an open pull request to fix
these issues in Rubygems, but part of the Rubygems tests for
their override fail on ruby-head due to rb_scan_args not
recognizing empty keyword splats, which this commit fixes.

Implementation wise, adding rb_scan_args_kw is kind of a pain,
because rb_scan_args takes a variable number of arguments.
In order to not duplicate all the code, the function internals need
to be split into two functions taking a va_list, and to avoid passing
in a ton of arguments, a single struct argument is used to handle
the variables previously local to the function.
2019-09-25 11:18:49 -07:00
Jeremy Evans d08e1004e0 Fix keyword argument separation issues in lib
Mostly requires adding ** in either calls or method definitions.
2019-08-30 12:39:31 -07:00
bronzdoc 6bd7772361
[rubygems/rubygems] Rename Gem::Package.metadata to Gem::Package.raw_spec
https://github.com/rubygems/rubygems/commit/a76f25dff0
2019-07-31 07:47:01 +08:00
bronzdoc 688ccc9602
[rubygems/rubygems] Move metadata method to Gem::Package
https://github.com/rubygems/rubygems/commit/2c9cfcb666
2019-07-31 07:47:01 +08:00
David Rodríguez d0a5467320 Update rubygems with latest upstream changes
Closes: https://github.com/ruby/ruby/pull/2154
2019-04-28 11:07:45 +09: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 08f8cfe14e Merge RubyGems upstream: 56c0bbb69e4506bda7ef7f447dfec5db820df20b
It fixed the multiple vulnerabilities.
  https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-05 03:32:58 +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 ae19a18996 Merge RubyGems 3.0.1 from rubygems/rubygems.
It fixed the issues of RubyGems 3.0.0.
  https://blog.rubygems.org/2018/12/23/3.0.1-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-23 00:20:49 +00:00
hsbt 7f9bf068fc Merge rubygems@21f12a8 from upstream.
* [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions https://github.com/rubygems/rubygems/pull/2515
  * Fix broken symlink that points to ../* https://github.com/rubygems/rubygems/pull/2516

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12 05:07:50 +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 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 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 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
hsbt c6da9cadb3 Merge RubyGems 2.7.7
see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-18 01:39:13 +00:00
hsbt 7619cb3d7d Merge RubyGems 2.7.6 from upstream.
It fixed some security vulnerabilities.

  http://blog.rubygems.org/2018/02/15/2.7.6-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16 08:08:06 +00:00
hsbt 7112c6a1c1 Merge RubyGems-2.7.5 from upstream.
Please see its details: http://blog.rubygems.org/2018/02/06/2.7.5-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06 02:58:35 +00:00
hsbt 500f15e507 Merge rubygems-2.6.14 changes.
It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-10 08:58:22 +00:00
hsbt f20ad4889d * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems
HEAD(2c6d256). It contains to update vendored Molinillo to 0.5.0.
  https://github.com/rubygems/rubygems/pull/1638

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-18 05:11:55 +00:00
hsbt 4e8b8c10dd * lib/rubygems/specification.rb: `coding` is affect only first line except
shebang.
* lib/rubygems/package.rb, lib/rubygems/package/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02 00:11:34 +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
hsbt d9c32d62a0 * lib/rubygems: Update to RubyGems 2.4.6 and HEAD(800f2e6).
Fixed #1159, #1171, #1173 on rubygems/rubygems
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 13:00:45 +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
drbrain 28918eac58 * lib/rubygems: Update to RubyGems master commit 2a74263. This fixes
several bugs in RubyGems 2.2.0.preview.1.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16 00:14:16 +00:00
drbrain 95683e5cb2 * lib/rubygems: Update to RubyGems 2.2.0.preview.1
This brings several new features to RubyGems summarized here:

  https://github.com/rubygems/rubygems/blob/v2.2.0.preview.1/History.txt

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-18 21:29:41 +00:00
naruse 269503b544 Revert r42938 "* lib/rubygems: Update to RubyGems 2.1.3"
It breaks build.
http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20130913T200302Z.diff.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-14 08:59:02 +00:00
drbrain 1daa0b113d * lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems

  Restored concurrent requires

  Fixed installing gems with extensions with --install-dir

  Fixed `gem fetch -v` to install the latest version

  Fixed installing gems with "./" in their files entries

* test/rubygems/test_gem_package.rb:  Tests for the above.

* NEWS:  Updated for RubyGems 2.1.3


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-13 19:58:57 +00:00
drbrain fdb6a621b0 * lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems

	  Restored concurrent requires

	  Fixed installing gems with extensions with --install-dir

	  Fixed `gem fetch -v` to install the latest version

	  Fixed installing gems with "./" in their files entries

	* test/rubygems/test_gem_package.rb:  Tests for the above.

	* NEWS:  Updated for RubyGems 2.1.3


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-13 01:40:42 +00:00
zzak 757dee1259 * lib/rubygems*: [DOC] Capitalize "Ruby" in documentation
Patch by Dave Worth https://github.com/ruby/ruby/pull/341


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19 02:24:31 +00:00
nobu 71110cb745 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09 23:41:44 +00:00
drbrain 47f0248b08 * lib/rubygems: Import RubyGems 2.1
* test/rubygems:  Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09 23:21:36 +00:00
drbrain 7083cebeae * lib/rubygems: Update to RubyGems 2.0.4. See
https://github.com/rubygems/rubygems/blob/2.0/History.txt for changes


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08 22:41:03 +00:00
drbrain 10c5d6ee25 * lib/rubygems/commands/setup_command.rb: Don't delete non-rubygems
files when installing RubyGems.
* test/rubygems/test_gem_commands_setup_command.rb:  Test for the
  above.

* lib/rubygems/ext/ext_conf_builder.rb:  Use full path to siteconf.rb
  in case the extconf.rb changes directories (like memcached does).

* lib/rubygems/package.rb:  Remove double slash from path.
* test/rubygems/test_gem_package.rb:  Test for the above.
* test/rubygems/test_gem_package_old.rb:  ditto.

* lib/rubygems/source.rb:  Revert automatic HTTPS upgrade
* lib/rubygems/spec_fetcher.rb:  ditto.
* test/rubygems/test_gem_remote_fetcher.rb:  ditto.
* test/rubygems/test_gem_source.rb:  ditto.
* test/rubygems/test_gem_spec_fetcher.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-11 21:29:32 +00:00