aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
Commit message (Collapse)AuthorAgeFilesLines
...
* [rubygems/rubygems] Update SPDX list and warn on deprecated identifiers.Josef Šimánek2023-09-302-38/+79
| | | | https://github.com/rubygems/rubygems/commit/61667028f5
* [rubygems/rubygems] Remove usage of Dir.chdir that just execute a subprocessSamuel Giddins2023-09-211-3/+1
| | | | | | Preferring instead to spawn the subprocess in the correct directory https://github.com/rubygems/rubygems/commit/ad5abd6a45
* [rubygems/rubygems] Freeze more strings in generated gemspecsSamuel Giddins2023-09-211-6/+5
| | | | | | | | | | Specifically, this will have frozen string literals for: - Gem platform tuple entries - Gem::Version strings - Gem::Specification#installed_by_version - Dependency requirement strings https://github.com/rubygems/rubygems/commit/6195da5bdb
* [rubygems/rubygems] Aggressively optimize allocations in SafeMarshalSamuel Giddins2023-09-213-88/+224
| | | | | | | | | | | | | | | | Reduces allocations in a bundle install --full-index by an order of magnitude Main wins are (a) getting rid of exessive string allocations for exception message stack (b) Avoiding hash allocations caused by kwargs for #initialize (c) avoid using unpack to do bit math, its easy enough to do by hand (d) special case the most common elements so they can be read without an allocation (e) avoid string allocations every time a symbol->string lookup is done by using symbol#name https://github.com/rubygems/rubygems/commit/7d2ee51402
* [rubygems/rubygems] Give up, load Time via Marshal.loadSamuel Giddins2023-09-201-46/+13
| | | | https://github.com/rubygems/rubygems/commit/6c92ba2ba3
* [rubygems/rubygems] All rubies working with different time zonesSamuel Giddins2023-09-202-5/+7
| | | | | | | | Tested with: `ruby -e 'trap("INT") { exit 1 }; TZ=%w[UTC +0000 -0000]; RUBY=%w[ruby-2.7 ruby-3.2.2 jruby-9.4 truffleruby-22 truffleruby-23]; TZ.product(RUBY).each { |t, r| puts ?**120, "TZ=#{t} RUBY=#{r}", "*"*120; system({"TZ"=>t,"RUBY"=>r}, *ARGV) }' zsh -lic 'chruby $RUBY; ruby -vw -Ilib test/rubygems/test_gem_safe_marshal.rb --verbose=progress'` https://github.com/rubygems/rubygems/commit/6192005afb
* [rubygems/rubygems] Tests passing on truffleruby 22 in addition to 23Samuel Giddins2023-09-201-5/+18
| | | | https://github.com/rubygems/rubygems/commit/8065530d43
* [rubygems/rubygems] Bundler error handlingSamuel Giddins2023-09-203-10/+54
| | | | https://github.com/rubygems/rubygems/commit/63b422b71a
* [rubygems/rubygems] Allow bundler to load from the dependency apiSamuel Giddins2023-09-202-1/+8
| | | | https://github.com/rubygems/rubygems/commit/3303957286
* [rubygems/rubygems] Verified working on mri/jruby/truffleruby with specs on ↵Samuel Giddins2023-09-203-64/+159
| | | | | | rubygems.org https://github.com/rubygems/rubygems/commit/4f51741cc6
* [rubygems/rubygems] Broader version compatibility in marshal testsSamuel Giddins2023-09-201-0/+1
| | | | https://github.com/rubygems/rubygems/commit/6ec518c563
* [rubygems/rubygems] Fix UTC time loadingSamuel Giddins2023-09-201-1/+6
| | | | https://github.com/rubygems/rubygems/commit/2a4d0a44b0
* [rubygems/rubygems] Add a Marshal.load replacement that walks an AST to ↵Samuel Giddins2023-09-208-5/+741
| | | | | | safely load permitted classes/symbols https://github.com/rubygems/rubygems/commit/7e4478fe73
* [rubygems/rubygems] Reduce allocations for stub specificationsSamuel Giddins2023-09-192-9/+14
| | | | | | | | | | | | | | | | | | | This helps with memory usage during application boot time ``` ==> memprof.after.txt <== Total allocated: 1.43 MB (18852 objects) Total retained: 421.12 kB (4352 objects) ==> memprof.before.txt <== Total allocated: 2.43 MB (28355 objects) Total retained: 469.69 kB (5425 objects) ``` See https://bugs.ruby-lang.org/issues/19890 about the readline allocations https://github.com/rubygems/rubygems/commit/d7eb66eee3
* [rubygems/rubygems] Stop allocating the same settings keys repeatedlySamuel Giddins2023-09-151-7/+6
| | | | | | | | | | | | | | | | | | | Running `bundle update --bundler` on a rails app locally: ``` ==> memprof.after.txt <== Total allocated: 301.90 kB (3794 objects) Total retained: 73.24 kB (698 objects) ==> memprof.before.txt <== Total allocated: 14.47 MB (196378 objects) Total retained: 25.93 kB (202 objects) ``` So for a slight increase in retained memory (all keys are now retained), we go from about 200k allocations in the settings file to under 4k https://github.com/rubygems/rubygems/commit/e64debb6ae
* [rubygems/rubygems] Fixed include realpath in error statementnegi01092023-09-111-2/+2
| | | | https://github.com/rubygems/rubygems/commit/ac3b85bd5e
* [rubygems/rubygems] Fixed false positive SymlinkError in symbolic link directorynegi01092023-09-111-1/+3
| | | | https://github.com/rubygems/rubygems/commit/58173ff2ea
* Update specification.rbSamuel Giddins2023-08-201-1/+1
| | | Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
* [rubygems/rubygems] Ensure that loading multiple gemspecs with legacy YAML ↵Samuel Giddins2023-08-201-2/+13
| | | | | | | | | | class references does not warn Before this, you would get constant redefinition warnings on Psych::DefaultKey Additionally, ensure the retries wont continue infinitely in the case of the ArgumentError not being caused by Marshal trying to load the undefined classes https://github.com/rubygems/rubygems/commit/919e8c2de4
* [rubygems/rubygems] choose_from_list may return nil index sinceAkira Matsuda2023-08-201-1/+1
| | | | | | https://github.com/rubygems/rubygems/commit/abacb0cb34cd https://github.com/rubygems/rubygems/commit/5e2e9d6e50
* [rubygems/rubygems] Make nil a valid license specJohn Hong2023-08-181-4/+8
| | | | https://github.com/rubygems/rubygems/commit/675effb67e
* [rubygems/rubygems] Update SPDX license list as of 2023-06-18License Update2023-08-181-0/+28
| | | | https://github.com/rubygems/rubygems/commit/3db9165335
* [rubygems/rubygems] Raise Gem::Package::FormatError on EOF, indicating ↵Martin Emde2023-08-173-27/+24
| | | | | | | | | | | | | | | | | | | | | corrupt gem Gem::Package::TarReader::Entry now raises EOFError or returns nil appropriately based on Ruby core IO.read and IO.readpartial behavior. Zlib will respond accordingly by raising Zlib::GzipFile::Error on EOF. When verifying a gem or extracting contents, raise FormatError similar to other cases of corrupt gems. Addresses a bug where Gem::Package would attempt to call size on nil instead of raising a more descriptive and useful error, leading users to assume the problem is internal to rubygems. Remove unused error class TarReader::UnexpectedEOF that was never raised since the NoMethodError on nil would happen first. Use EOFError instead. https://github.com/rubygems/rubygems/commit/dc6129644b
* [rubygems/rubygems] Set thread configurations inside block in the thread ↵Nobuyoshi Nakada2023-07-302-14/+12
| | | | | | local manner https://github.com/rubygems/rubygems/commit/965e54b8f1
* [rubygems/rubygems] Use the dedicated method to convert file pathNobuyoshi Nakada2023-07-301-2/+1
| | | | | | | | The dedicated method `File.path` to deal with pathname-like objects has been provided since ruby 1.9.0. Also adds a test for rubygems/rubygems#6837. https://github.com/rubygems/rubygems/commit/258c6eda80
* Revert "[rubygems/rubygems] Set thread configurations inside block"ko12023-07-292-4/+4
| | | | | | | | | | | | This reverts commit db80e947a382a6a9ef2295e81f5b97c6a8ecbce7. This patch uses `Thread.abort_on_exception = true` and it affects all of threads. This is why CI systems fails. How to modify: - use `thread.abort_on_exception = true` for specific threads - Run this code in a separated process
* [rubygems/rubygems] Add charset to Webauthn response content-typeJenny Shen2023-07-281-1/+1
| | | | https://github.com/rubygems/rubygems/commit/442a3e8f37
* [rubygems/rubygems] Set thread configurations inside blockJenny Shen2023-07-282-4/+4
| | | | https://github.com/rubygems/rubygems/commit/860b145359
* [rubygems/rubygems] Move Webauthn listener thread to WebauthnListener classJenny Shen2023-07-281-8/+6
| | | | https://github.com/rubygems/rubygems/commit/6ec474975e
* [rubygems/rubygems] Move WebauthnListener into the Gem::GemcutterUtilities ↵Jenny Shen2023-07-285-269/+273
| | | | | | namespace https://github.com/rubygems/rubygems/commit/3080394f81
* [rubygems/rubygems] Extract polling logic into its own classJenny Shen2023-07-282-41/+81
| | | | https://github.com/rubygems/rubygems/commit/218b83abed
* [rubygems/rubygems] Add Webauthn verification poller to fetch OTPJenny Shen2023-07-281-12/+69
| | | | https://github.com/rubygems/rubygems/commit/39c5e86a67
* Warn default gems which will be gemified in futureNobuyoshi Nakada2023-07-281-0/+1
|
* [rubygems/rubygems] Simplify double loopNobuyoshi Nakada2023-07-251-7/+3
| | | | https://github.com/rubygems/rubygems/commit/630dc02112
* [rubygems/rubygems] Use `Monitor#synchronize` to ensure to exitNobuyoshi Nakada2023-07-251-32/+12
| | | | https://github.com/rubygems/rubygems/commit/b424353239
* [rubygems/rubygems] Avoid unnecessary network requests for local gemDavid Rodríguez2023-07-241-1/+3
| | | | https://github.com/rubygems/rubygems/commit/ec5f04f7b1
* [rubygems/rubygems] Deprecate Gem::Platform.matchHiroshi SHIBATA2023-07-211-0/+5
| | | | https://github.com/rubygems/rubygems/commit/e3ba3e2225
* [rubygems/rubygems] Boundary check in `Gem::StreamUI#choose_from_list`Nobuyoshi Nakada2023-07-211-0/+1
| | | | https://github.com/rubygems/rubygems/commit/abacb0cb34
* [rubygems/rubygems] Clear `YAML` constant if it was undefined previouslyNobuyoshi Nakada2023-07-191-1/+8
| | | | https://github.com/rubygems/rubygems/commit/31d0311258
* [rubygems/rubygems] FixupHiroshi SHIBATA2023-06-271-2/+1
| | | | | | https://github.com/rubygems/rubygems/pull/6766 https://github.com/rubygems/rubygems/commit/c5c5797227
* [rubygems/rubygems] Removed unused variableHiroshi SHIBATA2023-06-271-5/+0
| | | | https://github.com/rubygems/rubygems/commit/68cc941bed
* [rubygems/rubygems] Molinillo::DependencyGraph is initialized in ↵Hiroshi SHIBATA2023-06-271-2/+1
| | | | | | Molinillo::Resolver#resolve https://github.com/rubygems/rubygems/commit/1c39e24c95
* [rubygems/rubygems] auto-correct Style/YodaConditionHiroshi SHIBATA2023-06-158-8/+8
| | | | https://github.com/rubygems/rubygems/commit/6d9e8025dc
* [rubygems/rubygems] Autoload shellwords when it's needed.Samuel Williams2023-06-134-8/+11
| | | | https://github.com/rubygems/rubygems/commit/e916ccb2d9
* Merge RubyGems/Bundler master from 4076391fce5847689bf2ec402b17133fe4e32285Hiroshi SHIBATA2023-05-301-1/+1
|
* [rubygems/rubygems] Load plugin immediatelySutou Kouhei2023-05-251-0/+15
| | | | | | | | | | | | | | | We can install RubyGems plugin by "gem install XXX". The installed plugin is used from the NEXT "gem ...". For example, "gem install gem-src kaminari" doesn't use gem-src plugin for kaminari. "gem install gem-src && gem install kaminari" uses gem-src plugin for kaminari. How about loading a plugin immediately when the plugin is installed? If this proposal is implemented, "gem install gem-src kaminari" works like "gem install gem-src && gem install kaminari". https://github.com/rubygems/rubygems/commit/4917d96f4c
* [rubygems/rubygems] Remove forward slash in key regardless if it contains __Jenny Shen2023-05-231-1/+1
| | | | https://github.com/rubygems/rubygems/commit/33a02eec00
* [rubygems/rubygems] Modify invalid key check to accept keys with colonsJenny Shen2023-05-231-1/+1
| | | | | | https://github.com/rubygems/rubygems/commit/413033198b Co-authored-by: Eric Herscovich <eric.herscovich@shopify.com>
* Update SPDX license listSamuel Giddins2023-05-101-0/+40
|
* [rubygems/rubygems] Simplify code by Gem::Specification#runtime_dependenciesTakumasa Ochi2023-05-081-10/+5
| | | | https://github.com/rubygems/rubygems/commit/324139af8f