summaryrefslogtreecommitdiff
path: root/lib/rubygems
AgeCommit message (Collapse)Author
2021-12-06[rubygems/rubygems] Allow using `Gem::Version` without loading the rest of ↵David Rodríguez
rubygems https://github.com/rubygems/rubygems/commit/1b862537a5
2021-12-06[rubygems/rubygems] add login & logout for the signin & signout commands ↵Colby Swandale
respectively https://github.com/rubygems/rubygems/commit/49b491970b
2021-12-05[rubygems/rubygems] Don't write outside of destdir when regenerating pluginsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/141ef4cb9a
2021-12-05[rubygems/rubygems] Don't write outside of destdir when installing default ↵David Rodríguez
bundler https://github.com/rubygems/rubygems/commit/a62d00c5e8
2021-12-05[rubygems/rubygems] Fold a line that got out of handDavid Rodríguez
https://github.com/rubygems/rubygems/commit/49317d8beb
2021-12-05[rubygems/rubygems] Fix binstubs and plugins regeneration with `--destdir` ↵David Rodríguez
is used https://github.com/rubygems/rubygems/commit/7079de16fa
2021-12-03[rubygems/rubygems] Move required_ruby_version gemspec attribute to ↵Josef Šimánek
recommended section. https://github.com/rubygems/rubygems/commit/de6552ac30
2021-12-02[rubygems/rubygems] Provide distinguished name which will be correctly parsed.Vít Ondruch
It seems that since ruby openssl 2.1.0 [[1]], the distinguished name submitted to `OpenSSL::X509::Name.parse` is not correctly parsed if it does not contain the first slash: ~~~ $ ruby -v ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] $ gem list | grep openssl openssl (default: 2.2.0) $ irb -r openssl irb(main):001:0> OpenSSL::X509::Name.parse("CN=nobody/DC=example").to_s(OpenSSL::X509::Name::ONELINE) => "CN = nobody/DC=example" irb(main):002:0> OpenSSL::X509::Name.parse("/CN=nobody/DC=example").to_s(OpenSSL::X509::Name::ONELINE) => "CN = nobody, DC = example" ~~~ Instead, use `OpenSSL::X509::Name.new` directly as suggested by upstream maintainer. [1]: https://github.com/ruby/openssl/commit/19c67cd10c57f3ab7b13966c36431ebc3fdd653b https://github.com/rubygems/rubygems/commit/09ca0c2dae Co-authored-by: Kazuki Yamaguchi <k@rhe.jp>
2021-11-30[rubygems/rubygems] Fix race condition when reading & writing gemspecs ↵David Rodríguez
concurrently When bundler parallel installer installs gems concurrently, one can get confusing warnings like the following: ``` "[/home/runner/work/rubygems/rubygems/bundler/tmp/2/gems/system/specifications/zeitwerk-2.4.2.gemspec] isn't a Gem::Specification (NilClass instead). ``` I've got these warnings several times in the past, but I never managed to reproduce them, and never look deeply into the root cause, but this time a got a cause that reproduced quite frequently, so I looked into it. The problem is one thread reading a gemspec while another thread is writing it. The write of the gemspec was not protected, so `Gem::Specification.load` could end up seeing a truncated gemspec and thus throw this warning. The fix involve two changes: * Change the methods that write gemspecs to use `Gem.binary_write` which is protected by a lock. * Fix `Gem.binary_write` to create the file lock at file creation time, not when the file already exists after. The realworld user problem caused by this issue happens in bundler, but I'm fixing it in rubygems first, and then I'll backport to bundler whatever needs backporting to fix the issue on the bundler side. https://github.com/rubygems/rubygems/commit/a672e7555c
2021-11-30[rubygems/rubygems] Revert "Remove spec file before building"David Rodríguez
This reverts commit af604436d8141c34cb2e1e645b9b0d47bfd55a55. The issue that led to introducing it was never reproduced. I tried to repro with this patch and it still works just fine. Since this removal is getting in the middle for some race conditions I'm facing, I'm reverting the patch. https://github.com/rubygems/rubygems/commit/2dd267f0e4
2021-11-29[rubygems/rubygems] Deprecate typo nameNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/62d54cbf08
2021-11-19Do not document vendored files [ci skip]Nobuyoshi Nakada
Just duplications.
2021-11-18[rubygems/rubygems] Protect specs access at a finer levelDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c8cc053bde
2021-11-18[rubygems/rubygems] Stop using a constant for something not constantDavid Rodríguez
https://github.com/rubygems/rubygems/commit/5cb0b9d9b8
2021-11-18[rubygems/rubygems] Extract a helper method to reset specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/662de0c990
2021-11-18[rubygems/rubygems] Make clearing loaded spec cache really privateDavid Rodríguez
https://github.com/rubygems/rubygems/commit/19f117652b
2021-11-18[rubygems/rubygems] We can now use standard memoizationDavid Rodríguez
https://github.com/rubygems/rubygems/commit/231be44d38
2021-11-18[rubygems/rubygems] Easier preservation of activated specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/54e923ffc2
2021-11-18[rubygems/rubygems] Set `@@all` variable at class definition timeDavid Rodríguez
To spare the `defined?` check. https://github.com/rubygems/rubygems/commit/64d27bba01
2021-11-16Merge the master branch of rubygems repoHiroshi SHIBATA
Picked from https://github.com/rubygems/rubygems/commit/4b498709a015a94e14a3852a1841a7a3e669133d
2021-11-06[rubygems/rubygems] GNU Make needs DESTDIR on Windows environment like msys ↵Hiroshi SHIBATA
or mingw https://github.com/rubygems/rubygems/commit/7fd987d30d
2021-11-05[rubygems/rubygems] Fix `ruby setup.rb` command when `--prefix` is passedDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8d04092f6e
2021-11-05[rubygems/rubygems] Remove unnecessarily changing GEM_HOMEDavid Rodríguez
At this point gem paths are already loaded and memoize. Changing `GEM_HOME` has no effect. https://github.com/rubygems/rubygems/commit/a1f62f0939
2021-11-05[rubygems/rubygems] Remove unnecessary loopDavid Rodríguez
Rubygems installs a single executable. Make that explicit. https://github.com/rubygems/rubygems/commit/2839d15521
2021-11-05[rubygems/rubygems] Explicitly ignored empty value for DESTDIRHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/69dcc02553
2021-11-05[rubygems/rubygems] Skip to set DESTDIR option when it's not provided for ↵Hiroshi SHIBATA
mswin platform https://github.com/rubygems/rubygems/commit/b93546c8d8
2021-11-05[rubygems/rubygems] Don't apply `--destdir` twice when running `setup.rb`Alyssa Ross
Prior to this patch, if I ran: ruby setup.rb --destdir /foo Then Bundler files would be written into /foo/foo, because destdir was being prepended, even though `bundler_spec.bin_dir` already included destdir. https://github.com/rubygems/rubygems/commit/9e857ffb52
2021-11-05[rubygems/rubygems] Fix `--destdir` handling on WindowsDavid Rodríguez
Driver letters were not accounted for in one place. https://github.com/rubygems/rubygems/commit/fbe42460d7
2021-11-05[rubygems/rubygems] More refactoring of `--destdir` handlingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f42c2025ed
2021-11-05[rubygems/rubygems] Refactor `--destdir` handlingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/8aab3d11b0
2021-11-03[rubygems/rubygems] Fix `gem install` vs `gem fetch` inconsistencyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/b3e985799e
2021-11-02Update licenses= documentationCarlos Palhares
2021-11-02Allow custom LicenseRefCarlos Palhares
2021-11-02Removed the related code of `gem server`Hiroshi SHIBATA
2021-10-29[rubygems/rubygems] Vendor tsort into rubygemsFrederik Dudzik
So that it loads a consistent version of the library and `rubygems` is never affected by gem activation conflicts related to `tsort`. Getting CI green required updating one `bundler` spec, because `tsort` is no longer loaded by `bundle clean` until after `BUNDLE_PATH` has been changed, so to ensure it is found, it needs to be installed under `BUNDLE_PATH` as well (which will be different from the global system path on Bundler 3, meaning installing `tsort` to the global system path is not enough there). This spec workaround can be removed once we also vendor `tsort` inside `bundler`. https://github.com/rubygems/rubygems/commit/d326880999
2021-10-26[rubygems/rubygems] Add support to build and sign certificates with multiple ↵Jenny Shen
key algorithms https://github.com/rubygems/rubygems/commit/967876f15d Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
2021-10-25[rubygems/rubygems] Avoid loading the `digest` gem unnecessarilyDavid Rodriguez
OpenSSL includes what we need. https://github.com/rubygems/rubygems/commit/955f3b72ca
2021-10-25[rubygems/rubygems] Remove comment that seems no longer accurateDavid Rodriguez
We require things inline or autoload them for efficiency and to avoid as much as possible conflicting with user's choice of gems. But I removed the require and observed no deadlocks when activating gems. https://github.com/rubygems/rubygems/commit/7d6333e842
2021-10-11[ruby/rubygems] Prefer `require_relative` for internal requiresDavid Rodriguez
https://github.com/rubygems/rubygems/commit/51796f257a
2021-10-10[ruby/rubygems] We no longer need to check realpathsDavid Rodríguez
Since symlinks and absolute paths are already checked. https://github.com/rubygems/rubygems/commit/de19bc4c7e
2021-10-10[ruby/rubygems] Check safety of packaged symlinksDavid Rodríguez
If we explicitly disallow the creation of symlinks that point to files outside of the destination directory, we can avoid any other safety checks while creating directories, because we can be sure they will always fall under the destination directory as well. https://github.com/rubygems/rubygems/commit/555692b8de
2021-10-10[ruby/rubygems] Install location safety should consider casingDavid Rodríguez
https://github.com/rubygems/rubygems/commit/0a0ad34af3
2021-10-10[ruby/rubygems] Remove redundant `File.expand_path`David Rodríguez
`File.realpath` already expands paths. https://github.com/rubygems/rubygems/commit/25524ebbeb
2021-10-10[ruby/rubygems] Simplify `File.expand_path` usageDavid Rodríguez
https://github.com/rubygems/rubygems/commit/02e3cf44bf
2021-10-10[ruby/rubygems] Don't make duplicated checks on directory safetyDavid Rodríguez
This seems to speed up `gem install` on Windows by more than 50%. https://github.com/rubygems/rubygems/commit/1970b1296d
2021-10-10Needs time.rb for `Time#iso8601`Nobuyoshi Nakada
`Gem::Request.verify_certificate_message` used this method without "time" which defines it.
2021-10-09[rubygems/rubygems] Improve performance of Specification#missing_extensions?Masataka Pocke Kuwabara
https://github.com/rubygems/rubygems/commit/90c1919f94
2021-09-28[rubygems/rubygems] Only disallow FIXME/TODO for first word of gemspec ↵Ellen Marie Dash
description 7890c98 matched the start of each line, whereas this matches the start of the entire string. https://github.com/rubygems/rubygems/commit/432de7b819
2021-09-24[rubygems/rubygems] Revert "Fix an issue causing nested Gem::Uri instances"David Rodríguez
This reverts commit 6589f7bcc7a63a47cb73f58a290c1e1ac42bba99. https://github.com/rubygems/rubygems/commit/9d0ce31f08
2021-09-24[rubygems/rubygems] Fix error message building changing password of sourcehuangduirong
Do not change the password of the input parameter source during anonymization, by using the proper helper instead of changing the original uri directly. https://github.com/rubygems/rubygems/commit/eaa2dd8a97