summaryrefslogtreecommitdiff
path: root/lib/rubygems/ext
AgeCommit message (Collapse)Author
2020-09-23Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
2020-09-23Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-08-29Revert changes to rdoc & rubygems regarding Tempfile.open(&block)Benoit Daloze
* They likely want to support older Ruby/tempfile versions * Reverts part of e8c3872555fc85640505974e6b1c39d315572689
2020-08-29Simplify Tempfile.open calls with a block as they now unlink the file ↵Benoit Daloze
automatically
2020-07-31Enforce no empty lines around class body in rubygemsDavid Rodríguez
To normalize the code style with `bundler`. Notes: Merged: https://github.com/ruby/ruby/pull/3379
2020-06-15Use space inside block braces everywhereDavid Rodríguez
To make rubygems code style consistent with bundler. Notes: Merged: https://github.com/ruby/ruby/pull/3229
2020-06-05Fix `ruby setup.rb` warningsDavid Rodríguez
Currently we get the following warnings on `ruby setup.rb`: ``` /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/exceptions.rb:281: warning: already initialized constant Gem::UnsatisfiableDepedencyError /home/deivid/Code/rubygems/lib/rubygems/exceptions.rb:281: warning: previous definition of UnsatisfiableDepedencyError was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/user_interaction.rb:557: warning: already initialized constant Gem::StreamUI::ThreadedDownloadReporter::MUTEX /home/deivid/Code/rubygems/lib/rubygems/user_interaction.rb:557: warning: previous definition of MUTEX was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/ext/builder.rb:20: warning: already initialized constant Gem::Ext::Builder::CHDIR_MUTEX /home/deivid/Code/rubygems/lib/rubygems/ext/builder.rb:20: warning: previous definition of CHDIR_MUTEX was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/ext/ext_conf_builder.rb:14: warning: already initialized constant Gem::Ext::ExtConfBuilder::FileEntry /home/deivid/Code/rubygems/lib/rubygems/ext/ext_conf_builder.rb:14: warning: previous definition of FileEntry was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/version.rb:158: warning: already initialized constant Gem::Version::VERSION_PATTERN /home/deivid/Code/rubygems/lib/rubygems/version.rb:158: warning: previous definition of VERSION_PATTERN was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/version.rb:159: warning: already initialized constant Gem::Version::ANCHORED_VERSION_PATTERN /home/deivid/Code/rubygems/lib/rubygems/version.rb:159: warning: previous definition of ANCHORED_VERSION_PATTERN was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:14: warning: already initialized constant Gem::Requirement::OPS /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:14: warning: previous definition of OPS was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:24: warning: already initialized constant Gem::Requirement::SOURCE_SET_REQUIREMENT /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:24: warning: previous definition of SOURCE_SET_REQUIREMENT was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:27: warning: already initialized constant Gem::Requirement::PATTERN_RAW /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:27: warning: previous definition of PATTERN_RAW was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:32: warning: already initialized constant Gem::Requirement::PATTERN /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:32: warning: previous definition of PATTERN was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:37: warning: already initialized constant Gem::Requirement::DefaultRequirement /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:37: warning: previous definition of DefaultRequirement was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:42: warning: already initialized constant Gem::Requirement::DefaultPrereleaseRequirement /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:42: warning: previous definition of DefaultPrereleaseRequirement was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/requirement.rb:311: warning: already initialized constant Gem::Version::Requirement /home/deivid/Code/rubygems/lib/rubygems/requirement.rb:311: warning: previous definition of Requirement was here /home/deivid/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/command.rb:626: warning: already initialized constant Gem::Command::HELP /home/deivid/Code/rubygems/lib/rubygems/command.rb:626: warning: previous definition of HELP was here Successfully built RubyGem Name: bundler Version: 2.2.0.dev File: bundler-2.2.0.dev.gem Bundler 2.2.0.dev installed RubyGems 3.2.0.pre1 installed Regenerating binstubs Regenerating plugins ------------------------------------------------------------------------------ RubyGems installed the following executables: /home/deivid/.rbenv/versions/2.7.1/bin/gem /home/deivid/.rbenv/versions/2.7.1/bin/bundle ``` This is because the `$LOAD_PATH` entry added by `setup.rb` is relatively and when the offending require happens, we're installing `bundler` and have switched folders to `bundler/`. So the require fallsback to the system rubygems. To avoid that, add an absolute path to the `$LOAD_PATH`. On jruby, somehow the $LOAD_PATH is manipulated so that we end up requiring stuff inside the built package even if we have specified the `-I` flag, so we get redefinition warnings anyways. I'm not sure about the root cause, but relative requiring fixes it, and it's faster anyways. Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Add build warning when rake based extension is present, ↵Josef Šimánek
but rake is not specified as dependency. https://github.com/rubygems/rubygems/commit/75fe5475b6 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Delay `fileutils` loading to fix some warningsDavid Rodríguez
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 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-03-30[rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygemsDavid Rodríguez
So it matches the style used by bundler. https://github.com/rubygems/rubygems/commit/ab0580fd65
2020-03-24Sync rubygems with current master (#2889)David Rodríguez
Notes: Merged-By: hsbt <hsbt@ruby-lang.org>
2019-12-13Prepare to release RubyGems 3.1.0 final version.Hiroshi SHIBATA
2019-09-05[rubygems/rubygems] Bump rubocop to 0.74.0 and fix new offensesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d4fc383497
2019-08-05[rubygems/rubygems] Fixed to warn with shadowing outer local variable.Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b0588a87b1
2019-07-31[rubygems/rubygems] Initialize '@ran_rake' correctly, so we don't have to ↵bronzdoc
set it up later and cause confusion https://github.com/rubygems/rubygems/commit/6ec3ba983c
2019-07-31[rubygems/rubygems] Remove extension 'double pipe equals' assigment since is ↵bronzdoc
not needed anymore https://github.com/rubygems/rubygems/commit/930de86a24
2019-07-31[rubygems/rubygems] Move 'build_for' to handle extension type before the ↵bronzdoc
extension is used https://github.com/rubygems/rubygems/commit/2a32c5ef0a
2019-07-31[rubygems/rubygems] Do not pass +build_dir+ argument to build_errorbronzdoc
https://github.com/rubygems/rubygems/commit/107fea3432
2019-07-31[rubygems/rubygems] Remove useless param +build_dir+bronzdoc
https://github.com/rubygems/rubygems/commit/0402974149
2019-07-31[rubygems/rubygems] Enable `Layout/EmptyLinesAroundAccessModifier`David Rodríguez
https://github.com/rubygems/rubygems/commit/41b1cebc33
2019-07-31[rubygems/rubygems] Migrate extension builder to use Open3David Rodríguez
Since it works on jruby. https://github.com/rubygems/rubygems/commit/5229e00df4
2019-07-31[rubygems/rubygems] Remove unused methodDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f2dbf242ea
2019-06-01Merge rubygems master from upstream.Hiroshi SHIBATA
I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
2019-02-14Merge RubyGems master@9be7858f7f17eae3058204f3c03e4b798ba18b9chsbt
This version contains the some style changes by RuboCop. * https://github.com/rubygems/rubygems/commit/9d810be0ede925fb2e3af535848582c3f8e0e72f * https://github.com/rubygems/rubygems/commit/61ea98a727fb1b76b6fac52d74107ee4b02aaef2 * https://github.com/rubygems/rubygems/commit/795893dce3c5f8540804fc08144cc6a90f086b13 * https://github.com/rubygems/rubygems/commit/9be7858f7f17eae3058204f3c03e4b798ba18b9c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21Merge master branch from rubygems/rubygems upstream.hsbt
* 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-04Fix RubyGems extension build failure after r65470sorah
Port of upstream patch https://github.com/rubygems/rubygems/pull/2457 Since r65470 (Upstream: https://github.com/rubygems/rubygems/pull/2441), builds of extension gem had always failed under really_verbose mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-31Merge upstream from rubygems/rubygems master branch.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-22Merge rubygems master branch from github.com/rubygems/rubygems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge master branch from rubygems upstream.hsbt
* 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-05-30Merge RubyGems 3.0.0.beta1.hsbt
* 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-02-06Merge RubyGems-2.7.5 from upstream.hsbt
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
2017-10-08Merge rubygems master.hsbt
This is RC version of Rubygems 2.7.0. https://github.com/rubygems/rubygems/commit/688fb7e83c13c3fe7c2bb03c49a2db4c82852aee git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-06No more ubygems in trunknobu
[Fix GH-1711] Author: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-16fix tempfile leaks on Windowsnobu
* 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-01-24Update Rubygems 2.6.10hsbt
* https://github.com/rubygems/rubygems/commit/2ee5bf9fd3bd7649d3e244bc40107ff32070ef47 * https://github.com/rubygems/rubygems/commit/be510dd4097e65c6a256a6e173d6b724a3a96472 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-01* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.5.2.hsbt
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. https://github.com/rubygems/rubygems/blob/a8aa3bac723f045c52471c7b9328310a048561e0/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
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-07-01* lib/rubygems: Update to RubyGems HEAD(c202db2).hsbt
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
2014-12-07* lib/rubygems: Update to RubyGems 2.4.5.drbrain
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-14* lib/rubygems: Update to RubyGems 2.4.1 master(713ab65)hsbt
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-05-26ext_conf_builder.rb: fix tempfile leaknobu
* 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-02-04 * lib/rubygems: Update to RubyGems 2.2.2 prerelease to check fixes todrbrain
CI. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* lib/rubygems: Update to RubyGems master 1c5f4b3. Allows rubygemsdrbrain
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-10* lib/rubygems: Update to RubyGems master ec8ed22. Notable changesdrbrain
include: * Renamed extension_install_dir to extension_dir (backwards compatible). * Fixed creation of gem.deps.rb.lock file from TestGemRequestSet#test_install_from_gemdeps_install_dir * Fixed a typo and some documentation. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-01* lib/rubygems: Update to RubyGems master baa965b. Notable changes:drbrain
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-11-30* lib/rubygems: Update to RubyGems master 66e5c39. Notable changes:drbrain
Implement gem.deps.rb (Gemfile) .lock support Fixed `gem uninstall` for a relative directory in GEM_HOME. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-19* lib/rubygems: Update to RubyGems master 6a3d9f9. Changes include:drbrain
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-10-16* lib/rubygems: Update to RubyGems master 2abce58. Changes:drbrain
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* lib/rubygems: Update to RubyGems master 278d00d. Changes:drbrain
Fixes building extensions without a "clean" make rule Adds gem dependency file autodetection to "gem install -g" * test/rubygems: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-16* lib/rubygems: Update to RubyGems master commit 2a74263. This fixesdrbrain
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