71 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
556be73cbb [rubygems/rubygems] gem server command is extracted from rubygems core feature now
https://github.com/rubygems/rubygems/commit/b29f8d6a37
2025-02-20 12:58:45 +09:00
Hiroshi SHIBATA
d2da774f87 [rubygems/rubygems] Rename wrapper files for vendored libraries with 'vendored_' prefix
https://github.com/rubygems/rubygems/commit/cfc908c8c1
2024-02-26 22:04:04 +00:00
Samuel Giddins
baf2ec2ca8 [rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations

https://github.com/rubygems/rubygems/commit/b04726c9a7
2023-12-13 22:00:26 +00:00
David Rodríguez
33bd956257 [rubygems/rubygems] Better approach to falling back to user installation when GEM_HOME not writable
https://github.com/rubygems/rubygems/commit/f67bced16b
2023-12-07 13:56:22 +09:00
Ellen Marie Dash
7008d97b76 [rubygems/rubygems] Only show "Defaulting to user installation" message when it matters.
https://github.com/rubygems/rubygems/commit/61b0947225
2023-11-30 19:58:40 +00:00
Mau Magnaguagno
87ddfb33a0 [rubygems/rubygems] Fix typo missing do
https://github.com/rubygems/rubygems/commit/4eade32ad6
2023-11-24 07:26:27 +00:00
Mau Magnaguagno
f792b55b21 [rubygems/rubygems] Prefer String#each_line in Gem::Command
Replace ``String#split("\n").each`` with ``String#each_line``.

https://github.com/rubygems/rubygems/commit/958744807d
2023-11-24 07:26:26 +00:00
Ellen Marie Dash
3f5da31760 [rubygems/rubygems] Rephrase "Defaulting to user installation" message.
https://github.com/rubygems/rubygems/commit/b7c531347e

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-10-16 13:51:07 +09:00
Ellen Marie Dash
be32109d64 [rubygems/rubygems] Move "Defaulting to user installation ..." message, so --install-dir and --user-install can suppress it.
https://github.com/rubygems/rubygems/commit/6677fc6853
2023-10-11 19:07:29 +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
0eef33e113 [rubygems/rubygems] util/rubocop -A --only Style/Next
https://github.com/rubygems/rubygems/commit/e5868e92f7
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
6ad269dc39 [rubygems/rubygems] util/rubocop -A --only Style/RescueStandardError
https://github.com/rubygems/rubygems/commit/80b57da926
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
fef0313ec7 [rubygems/rubygems] util/rubocop -A --only Style/PreferredHashMethods
https://github.com/rubygems/rubygems/commit/ae3bdc0e85
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
0b632b9cdd [rubygems/rubygems] util/rubocop -A --only Style/ClassCheck
https://github.com/rubygems/rubygems/commit/1c3356a872
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
05208c3875 [rubygems/rubygems] util/rubocop -A --only Lint/UnusedBlockArgument
https://github.com/rubygems/rubygems/commit/d8efd919db
2023-03-17 18:50:55 +09:00
Hiroshi SHIBATA
2eb99350f4 [rubygems/rubygems] Removed rubocop:disable detected by Lint/RedundantCopDisableDirective
https://github.com/rubygems/rubygems/commit/07b0da6c24
2023-03-17 18:50:55 +09:00
Samuel Giddins
cbe14cc8e6 [rubygems/rubygems] Add gem exec command
https://github.com/rubygems/rubygems/commit/ca69a317f3
2023-02-22 08:42:15 +00:00
Hiroshi SHIBATA
a43f1d90c2 Merge RubyGems and Bundler master
from 0635c1423d
2023-01-10 15:53:07 +09:00
Gustavo Ribeiro
08f6196bda [rubygems/rubygems] add global flag (-C) to change execution directory
https://github.com/rubygems/rubygems/commit/312fc36711
2022-12-26 19:08:55 +00: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
https://github.com/rubygems/rubygems/commit/f7f504b24c
2022-01-19 11:20:36 +09:00
Hiroshi SHIBATA
f3bda8987e
Merge the master branch of rubygems repo
Picked from 4b498709a0
2021-11-16 20:19:13 +09:00
David Rodríguez
6e2240a2f9 Sync latest bundler & rubygems development version 2021-07-07 13:30:20 +09:00
David Rodríguez
53468cc111 Sync latest development version of bundler & rubygems 2021-03-08 13:47:35 +09:00
Hiroshi SHIBATA
b717f73402
Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"
31a6eaabc165d8a222e176f2c809d90622d88ec2 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
Olle Jonsson
5eacf4e72c Enable rubocop-performance StartWith cop
- this would keep the could-be-a-string-method matches few
2020-06-05 07:32:42 +09:00
David Rodríguez
8c8364c84e Fix ruby setup.rb warnings
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.
2020-06-05 07:32:42 +09:00
Olle Jonsson
f61ee674d8 [rubygems/rubygems] Prefer start_with? and end_with? over regex.
- In one of the cases, filenames were checked for ending with "gz" -
    this is changed to check for ending with ".gz"
  - The change was made to make it even easier to read the code, and to
    match only from the start of the input (as opposed to start of the
    line)

https://github.com/rubygems/rubygems/commit/aac4290271
2020-06-05 07:32:42 +09:00
Nobuyoshi Nakada
6e80cabb90 [rubygems/rubygems] Specify explicit separator not to be affected by $;
https://github.com/rubygems/rubygems/commit/1cea3d4dce
2020-05-08 14:13:29 +09:00
David Rodríguez
96064e6f1c
Sync rubygems with current master (#2889) 2020-03-24 15:39:24 +09:00
Nobuyoshi Nakada
2b7409a2f2
Specify explicit separator not to be affected by $; 2020-03-08 17:38:37 +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
82cc2843a9
Prepare to release RubyGems 3.1.0 final version. 2019-12-13 20:19:33 +09:00
bronzdoc
89ad5df979
[rubygems/rubygems] Replace domain parameter in Gem::Command#show_lookup_failure with a parameter to suppress suggestions
https://github.com/rubygems/rubygems/commit/760b7d834f
2019-08-17 07:35:48 +09:00
bronzdoc
c421ef1142
[rubygems/rubygems] Move gemcutter utilities code to Gem::Command
https://github.com/rubygems/rubygems/commit/f296645033
2019-07-31 07:47:01 +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
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
mame
f7e94df0d6 lib/rubygems: explicitly clarify the type for =~ matching
RubyGems is very indifferent for type.
This change is needed for removal of `Object#=~`.  [Feature #15231]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 07:13:53 +00:00
mame
0edc36b9f2 lib/rubygems/command.rb: remove meaningless code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 05:46:24 +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