summaryrefslogtreecommitdiff
path: root/lib/rubygems
AgeCommit message (Collapse)Author
2025-10-22[ruby/rubygems] Bump up vendored uri to 1.0.4Hiroshi SHIBATA
https://github.com/ruby/rubygems/commit/bc77ec0bf2
2025-05-22Merge RubyGems-3.6.9 and Bundler-2.6.9Hiroshi SHIBATA
2025-04-08Merge RubyGems-3.6.7 and Bundler-2.6.7Hiroshi SHIBATA
2025-04-08Merge RubyGems-3.6.6 and Bundler-2.6.6Hiroshi SHIBATA
2025-02-20Merge RubyGems-3.6.5 and Bundler-2.6.5Hiroshi SHIBATA
2025-02-20Merge RubyGems-3.6.4 and Bundler-2.6.4Hiroshi SHIBATA
2025-02-20Merge RubyGems-3.6.3 and Bundler-2.6.3Hiroshi SHIBATA
2024-12-24Merge RubyGems-3.6.2 and Bundler-2.6.2David Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/12444
2024-12-18Bump vendored securerandom to 0.4.1David Rodríguez
2024-12-18Bump vendored timeout to 0.4.3David Rodríguez
2024-12-17Bump vendored resolv to 0.6.0David Rodríguez
2024-12-16[rubygems/rubygems] Fix `gem info` tagging some non default gems as defaultDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7585825c57
2024-12-13Bump vendored uri to 1.0.2David Rodríguez
2024-12-13Bump vendored net-http to 0.6.0David Rodríguez
2024-12-13Bump vendored securerandom to 0.4.0David Rodríguez
2024-12-06[rubygems/rubygems] Skip unresolved deps warning on ↵David Rodríguez
`Gem::Specification.reset` on benign cases If `Gem::Specification.reset` is used, but there are still unresolved dependencies, RubyGems prints a warning. There are though, certain cases where the situation will not cause any issues. One such case is when the unresolved dependency does not restrict any versions (>= 0) and there's a default gem matching it. In this situation, it doesn't matter if Gem paths change, because default gems are still activatable, so the dependency will be properly activated if ever needed. https://github.com/rubygems/rubygems/commit/e5f8a3068e
2024-12-05[rubygems/rubygems] Apply suggestions from code reviewSamuel Giddins
https://github.com/rubygems/rubygems/commit/7c634ecd72
2024-12-05[rubygems/rubygems] Stop storing executable names in ivarsSamuel Giddins
Removes usage of these classes as ACE gadgets See https://nastystereo.com/security/ruby-3.4-deserialization.html Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/89ad04db86
2024-12-02[rubygems/rubygems] [DOC] Fix missing single quoteNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/722d4c6926
2024-11-26[rubygems/rubygems] [SpecFetcher] If candidates include {name}-ruby or ↵Ellen Marie Dash
ruby-{name}, recommend those. https://github.com/rubygems/rubygems/commit/d7d33172c1
2024-11-26[rubygems/rubygems] Enable `Performance/MapCompact` copDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0c3a65871a
2024-11-26[rubygems/rubygems] More aggressive `Performance/FlatMap` cop configurationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d8d68cc00e
2024-11-25[rubygems/rubygems] Remove comment about oldest supported versionDavid Rodríguez
That's indeed the ideal behavior but it's a mess to maintain because the version of RubyGems shipped with each patchlevel of Ruby changes. We could try looking at the `VERSION` constant in ` RbConfig::CONFIG["rubylibdir"` but for now I calling what's in there now as good enough. https://github.com/rubygems/rubygems/commit/40ccf2b093
2024-11-25[rubygems/rubygems] Remove unnecessary and out of date ruby version checkDavid Rodríguez
We already do this check in `setup.rb` itself, which is run earlier. https://github.com/rubygems/rubygems/commit/160cc3f1c5
2024-11-25[rubygems/rubygems] Remove now dead codeDavid Rodríguez
https://github.com/rubygems/rubygems/commit/31fadaf2d2
2024-11-21[rubygems/rubygems] Set $0 to exe when running `gem exec` to fix name in CLI ↵Adam Daniels
output The $0 value is used in many CLI libraries to determine the name of the application, when displaying help and error messages. Without setting this value, it defaults to `gem` which can be confusing. Before: ``` $ gem exec kamal help Commands: gem accessory # Manage accessories (db/redis/search) gem app # Manage application gem audit # Show audit log from servers gem build # Build application image gem config # Show combined config (including secrets!) gem deploy # Deploy app to servers gem details # Show details about all containers gem docs [SECTION] # Show Kamal configuration documentation gem help [COMMAND] # Describe available commands or one specific command gem init # Create config stub in config/deploy.yml and secrets stub in .kamal gem lock # Manage the deploy lock gem proxy # Manage kamal-proxy gem prune # Prune old application images and containers gem redeploy # Deploy app to servers without bootstrapping servers, starting kamal-proxy, pruning, and registry login gem registry # Login and -out of the image registry gem remove # Remove kamal-proxy, app, accessories, and registry session from servers gem rollback [VERSION] # Rollback app to VERSION gem secrets # Helpers for extracting secrets gem server # Bootstrap servers with curl and Docker gem setup # Setup all accessories, push the env, and deploy app to servers gem upgrade # Upgrade from Kamal 1.x to 2.0 gem version # Show Kamal version ``` After: ``` $ gem exec kamal help Commands: kamal accessory # Manage accessories (db/redis/search) kamal app # Manage application kamal audit # Show audit log from servers kamal build # Build application image kamal config # Show combined config (including secrets!) kamal deploy # Deploy app to servers kamal details # Show details about all containers kamal docs [SECTION] # Show Kamal configuration documentation kamal help [COMMAND] # Describe available commands or one specific command kamal init # Create config stub in config/deploy.yml and secrets stub in .kamal kamal lock # Manage the deploy lock kamal proxy # Manage kamal-proxy kamal prune # Prune old application images and containers kamal redeploy # Deploy app to servers without bootstrapping servers, starting kamal-proxy, pruning, and registry login kamal registry # Login and -out of the image registry kamal remove # Remove kamal-proxy, app, accessories, and registry session from servers kamal rollback [VERSION] # Rollback app to VERSION kamal secrets # Helpers for extracting secrets kamal server # Bootstrap servers with curl and Docker kamal setup # Setup all accessories, push the env, and deploy app to servers kamal upgrade # Upgrade from Kamal 1.x to 2.0 kamal version # Show Kamal version ``` https://github.com/rubygems/rubygems/commit/4fd060b96d
2024-11-20[rubygems/rubygems] Add --attestation option to gem pushSamuel Giddins
Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/a5412d9a0e
2024-11-14[rubygems/rubygems] URI::DEFAULT_PARSER.escape is obsoleted. We should use ↵Hiroshi SHIBATA
URI::RFC2396_PARSER.escape explicitly https://github.com/rubygems/rubygems/commit/64f026c9d4
2024-11-14Update vendored timeout to 0.4.2David Rodríguez
2024-11-14Update vendored securerandom to 0.3.2David Rodríguez
2024-11-14Update vendored resolv to 0.5.0David Rodríguez
2024-11-14Update vendored net-http to 0.5.0David Rodríguez
2024-11-14Update vendored optparse to 0.6.0David Rodríguez
2024-11-12[rubygems/rubygems] Update SPDX license list as of 2024-08-19License Update
https://github.com/rubygems/rubygems/commit/5a094cbfab
2024-11-11Bump vendored uri to 1.0.1David Rodríguez
2024-11-06[rubygems/rubygems] Fix manifest in gem package using incorrect platform ↵David Rodríguez
sometimes If a gem package is built from a specification whose platform has been modified, it will include metadata using the old platform. This change should fix the problem by making sure `original_platform` is always properly set. https://github.com/rubygems/rubygems/commit/ecd5cd4547
2024-11-04Validate user input encodingDavid Rodríguez
If the user has the encoding of her system messed up, she may end up sending us incorrectly encoding input, causing "invalid byte sequence in UTF-8" errors at random places. These errors can be forced on a system without encoding issues with something like: ``` $ gem install$(echo -e "\xFF") foo /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:534:in `block in set_config_file_name': invalid byte sequence in UTF-8 (ArgumentError) from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `each' from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `set_config_file_name' from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:177:in `initialize' from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `new' from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `do_configuration' from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:33:in `run' from /Users/deivid/.asdf/installs/ruby/3.2.1/bin/gem:10:in `<main>' ``` This commit makes RubyGems print a better error in this case: ``` $ ruby -Ilib bin/gem install$(echo -e "\xFF") foo /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:75:in `validate_encoding': invalid argument: 'install�' has invalid encoding (Gem::OptionParser::InvalidArgument) from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:31:in `run' from bin/gem:10:in `<main>' ```
2024-11-04[rubygems/rubygems] Fix commands with 2 MFA requests when webauthn is enabledDavid Rodríguez
If a command requires two MFA authenticated requests, and webauthn is enabled, then first one will succeed but the second one will fail because it tries to reuse the OTP code from the first request and that does not work. This happens when you have not yet logged in to rubygems.org, or when you have an API key with invalid scopes for the current operation. In that case, we need: * An API request to get a token or change scopes for the one that you have. * Another API request to perform the actual operation. Instead of trying to reuse the token, make sure it's cleared so we are asked to authenticate again. We only do this when webauthn is enabled because reusing TOPT tokens otherwise is allowed and I don't want to break that. https://github.com/rubygems/rubygems/commit/669e343935
2024-11-04[rubygems/rubygems] OTP is already added by `rubygems_api_request`David Rodríguez
https://github.com/rubygems/rubygems/commit/15930fe126
2024-11-04[rubygems/rubygems] Fix incompatible encodings errorDavid Rodríguez
https://github.com/rubygems/rubygems/commit/d478ec403f
2024-10-30[rubygems/rubygems] Rely on PATH if Ruby is not installed in the same ↵David Rodríguez
directory as the binstub https://github.com/rubygems/rubygems/commit/ab7d65cc18 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-10-30[rubygems/rubygems] Simplify enable-load-relative prolog script creationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f2ed507afe
2024-10-30[rubygems/rubygems] Fix `gem update --system` leaving old default bundler ↵David Rodríguez
executables around https://github.com/rubygems/rubygems/commit/4b81add54c
2024-10-24[rubygems/rubygems] [SpecFetcher] Change < to <= like it should be.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/3d5135e69b
2024-10-23[rubygems/rubygems] [SpecFetcher] Avoid unneeded string allocation.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/1024505d8e
2024-10-23[rubygems/rubygems] [SpecFetcher] Bail before calling available_specs()Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/0719921af4
2024-10-23[rubygems/rubygems] Replace .map{...}.compact with .filter_map {...}Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/18c4ea7d00
2024-10-23[rubygems/rubygems] Add another bail-early condition to ↵Ellen Marie Dash
suggest_gems_from_name(), with test. https://github.com/rubygems/rubygems/commit/7bb7c0ac2d
2024-10-23[rubygems/rubygems] Optimize when suggest_gems_from_name finds an exact match.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/6c67298584
2024-10-23[rubygems/rubygems] Document suggest_gems_from_name()Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/8f9983cc21