aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_installer.rb
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Fix a typoNobuyoshi Nakada2022-12-301-1/+1
| | | | https://github.com/rubygems/rubygems/commit/7c096a5df8
* [rubygems/rubygems] Cleanup intermediate artifacts after installing built ↵Eloy Espinaco2022-12-201-0/+35
| | | | | | extensions https://github.com/rubygems/rubygems/commit/98b6a959bd
* [rubygems/rubygems] Fix tests checking intermediate filesEloy Espinaco2022-12-201-1/+1
| | | | | | | Some tests check that the shared objects are actually installed, but checking an intermediate build file instead of the installed one. https://github.com/rubygems/rubygems/commit/ad526073b0
* [rubygems/rubygems] Delete partial file and re-raise on Errno::ENOSPC.Ellen Marie Dash2022-12-021-0/+31
| | | | | | Add test for not leaving empty files if ENOSPC is raised during 'gem install' https://github.com/rubygems/rubygems/commit/8e0e20f079
* Merge rubygems/bundler HEAD.Hiroshi SHIBATA2022-08-091-2/+2
| | | | Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199
* [rubygems/rubygems] Warn dangling symlinksDavid Rodríguez2022-08-041-1/+4
| | | | https://github.com/rubygems/rubygems/commit/425b78637f
* Merge rubygems/bundler HEADHiroshi SHIBATA2022-08-031-1/+1
| | | | Pick from https://github.com/rubygems/rubygems/commit/8331e63263081a6aa690d8025d2957f30c4e814a
* RubyGems: Enable Style/StringLiterals copTakuya Noguchi2022-07-221-297/+297
| | | | Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* [rubygems/rubygems] Fix test issues surfaced using a stricter behavior of ↵David Rodríguez2022-04-161-5/+3
| | | | | | | | | | | | | | | | | | | | `FileUtils` We were trying to remove directories using `FileUtils.rm_f` which is unexpected and does not remove anything. Changing to `FileUtils.rm_rf` actually removes the directories properly. That itself showed other issues: * One test was actually removing the gem package it was about to install, since it was living in the cache folder. To fix that, avoid removing the cache folder, and only make sure the other directories are created automatically, which seems enough. * Another test was actually removing an incorrect directory. Change it to remove the right one (the one that's asserted later to have been created). https://github.com/rubygems/rubygems/commit/5538e7ff20
* [rubygems/rubygems] Support binstubs with `--enable-load-relative` prologDavid Rodríguez2022-01-151-58/+168
| | | | https://github.com/rubygems/rubygems/commit/32a5e9057a
* [rubygems/rubygems] Privatize some test utilsDavid Rodríguez2022-01-151-0/+2
| | | | https://github.com/rubygems/rubygems/commit/386b3b85ca
* Merge RubyGems-3.3.2 and Bundler-2.3.2Hiroshi SHIBATA2021-12-241-27/+0
|
* [rubygems/rubygems] Fix race condition when reading & writing gemspecs ↵David Rodríguez2021-11-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [rubygems/rubygems] Revert "Remove spec file before building"David Rodríguez2021-11-301-3/+0
| | | | | | | | | | | 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
* [rubygems/rubygems] Run hooks tests on gemspecs not already installedDavid Rodríguez2021-11-301-2/+10
| | | | | | | | | | | | The current `setup_base_installer` ends up using the `quick_gem` helper, which leaves the created specification installed. Instead, make sure to use the `util_spec` helper, which does a similar thing but doesn't leave the specification installed. The idea is that tests do not rely on the installer removing existing gemspecs, bacause I plan to stop doing that. https://github.com/rubygems/rubygems/commit/843f1a0abc
* [rubygems/rubygems] Use `Gem.use_gemdeps` only from binstubsDavid Rodríguez2021-08-311-0/+2
| | | | | | | The previous behavior was to automatically require `bundler/setup` everytime `rubygems` was required, which I think was too much. https://github.com/rubygems/rubygems/commit/b25379a295
* Sync latest bundler & rubygems development versionDavid Rodríguez2021-07-071-0/+20
|
* [rubygems/rubygems] Use pend instead of skipHiroshi SHIBATA2021-05-281-12/+12
|
* [rubygems/rubygems] Fix "instance variable not initialized" warningDavid Rodríguez2021-05-281-1/+0
| | | | | | | This variable had a typo (it's `@gemhome`), but the test is still passing, so I assume it's not needed. https://github.com/rubygems/rubygems/commit/3b88642bdb
* [rubygems/rubygems] Require the new files in `test/` relativelyDavid Rodríguez2021-05-281-1/+1
| | | | https://github.com/rubygems/rubygems/commit/c77868a555
* [rubygems/rubygems] Added begin-end block for java platformHiroshi SHIBATA2021-05-121-34/+36
| | | | | | Because pend of test-unit raises exception. https://github.com/rubygems/rubygems/commit/b5e2d0855a
* [rubygems/rubygems] Replace skip to pendHiroshi SHIBATA2021-05-121-4/+4
| | | | https://github.com/rubygems/rubygems/commit/0b145135c7
* [rubygems/rubygems] Use assert_raise instead of assert_raisesHiroshi SHIBATA2021-05-121-21/+21
| | | | https://github.com/rubygems/rubygems/commit/769e87f011
* [rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead ↵Hiroshi SHIBATA2021-05-121-72/+72
| | | | | | of assert_path_exists and refute_path_exists https://github.com/rubygems/rubygems/commit/a7c93558c3
* Run nmake check on Actions (#4487)Takashi Kokubun2021-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Run nmake check on Actions * Skip tests not working in mswin GitHub Actions * Override TEMP * Revert "Skip tests not working in mswin GitHub Actions" This reverts commit 544d2575fcdf23ae63cd25aa03fce10c28b259f2. * Revert "Revert "Skip tests not working in mswin GitHub Actions"" This reverts commit e1f8ad7862c9c4be52dc6e1031a004621eb07e6e. * Fix timeouts * Skip some more broken tests * Update windows.yml * Add a guard for rbasic_spec * Revert "Update windows.yml" This reverts commit bc9694b6b3b9594d406378d15ca11723fb052bc8. * Skip the ensure clause * Simplify the ensure
* Merge the master branch of RubyGemsHiroshi SHIBATA2021-04-151-1/+21
|
* Sync latest development version of bundler & rubygemsDavid Rodríguez2021-03-081-0/+2
|
* Merge RubyGems 3.2.3 and Bundler 2.2.3Hiroshi SHIBATA2020-12-231-60/+6
|
* Merge prepare version of RubyGems 3.2.0Hiroshi SHIBATA2020-12-081-11/+74
|
* Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA2020-09-231-2/+0
| | | | | 31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
* Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA2020-09-231-0/+2
| | | | Enable Style/EmptyLinesAroundClassBody rubocop cop.
* [rubygems/rubygems] Install plugins to user directoryNobuyoshi Nakada2020-07-311-0/+22
| | | | | | | | Fixes the `Gem::FilePermissionError` without the privilege. Initialize `@plugins_dir` to the user gem directory, when installing with `--user` option. https://github.com/rubygems/rubygems/commit/21a71ac769
* [rubygems/rubygems] Support PATH's using `File::ALT_SEPARATOR` in ↵David Rodríguez2020-07-311-0/+10
| | | | | | | | `Gem::Installer` Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/710b969b60
* [rubygems/rubygems] Prefer the standard separator on WindowsDavid Rodríguez2020-07-311-2/+2
| | | | | | | | | It seems like the most common case since it requires no tricks on our CI environment. Co-authored-by: MSP-Greg <MSP-Greg@users.noreply.github.com> https://github.com/rubygems/rubygems/commit/751c475574
* Enforce no empty lines around class body in rubygemsDavid Rodríguez2020-07-311-2/+0
| | | | To normalize the code style with `bundler`.
* Use space inside block braces everywhereDavid Rodríguez2020-06-151-2/+2
| | | | To make rubygems code style consistent with bundler.
* [rubygems/rubygems] Fix ruby warnings about a shadowed variableDavid Rodríguez2020-05-081-2/+2
| | | | https://github.com/rubygems/rubygems/commit/5cfb3252d9
* [rubygems/rubygems] Fix symlink RubyGems test problems for non-admin user.Josef Šimánek2020-05-081-19/+7
| | | | https://github.com/rubygems/rubygems/commit/75f672ff0e
* [rubygems/rubygems] Make the test suite pass under `umask 077`Yusuke Endoh2020-04-281-1/+1
| | | | | | | | | | Some tests had failed under `umask 077` mode. As far as I investigated, there is no actual bug. All failures were caused by tests that create a wrong-permission file or expect wrong permission. This changeset fixes the tests. https://github.com/rubygems/rubygems/commit/078213e527
* [rubygems/rubygems] Enable Style/PercentLiteralDelimiters cop in rubygemsDavid Rodríguez2020-03-301-18/+18
| | | | | | So it matches the style used by bundler. https://github.com/rubygems/rubygems/commit/ab0580fd65
* test/rubygems: Try not only /usr/bin/env but also /bin/envYusuke Endoh2020-03-241-4/+12
| | | | | | | | | | | RubyGems chooses available one from the two: /usr/bin/env or /bin/env https://github.com/rubygems/rubygems/blob/20b0d609484df2b514954ba9ef890a7cbdd01d18/lib/rubygems/installer.rb#L38 So, it is good not to hard-code /usr/bin/env in tests. This is a retry of 65201c054a90c8e7beb8fe1e6d0006541ac33449 which was accidentally deleted by 96064e6f1ce100a37680dc8f9509f06b3350e9c8
* Sync rubygems with current master (#2889)David Rodríguez2020-03-241-16/+48
|
* test/rubygems: Try not only /usr/bin/env but also /bin/envYusuke Endoh2020-02-121-4/+12
| | | | | | | | RubyGems chooses available one from the two https://github.com/rubygems/rubygems/blob/20b0d609484df2b514954ba9ef890a7cbdd01d18/lib/rubygems/installer.rb#L38 So, it is good not to hard-code /usr/bin/env in tests.
* Merge the current master branch of rubygems/rubygems.Hiroshi SHIBATA2020-02-011-3/+71
| | | | Just started to develop RubyGems 3.2.0.
* Merge RubyGems 3.1.2Hiroshi SHIBATA2019-12-201-23/+10
|
* Merge RubyGems 3.1.0.pre3Hiroshi SHIBATA2019-11-111-5/+8
| | | | | | | | | | | | | | | | | | | * Fix gem pristine not accounting for user installed gems. Pull request #2914 by Luis Sagastume. * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by SHIBATA Hiroshi. * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi Nakada. * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans. * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez. * Clarify symlink conditionals in tests. Pull request #2962 by David Rodríguez. * Update command line parsing to work under ps. Pull request #2966 by David Rodríguez. * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by David Rodríguez. * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request #2985 by MSP-Greg.
* [rubygems/rubygems] Remove warning: shadowing outer local variable - specbronzdoc2019-07-311-2/+2
| | | | https://github.com/rubygems/rubygems/commit/70c5c17a5f
* [rubygems/rubygems] Add a package attr_reader to Gem::Installer.Daniel Berger2019-07-311-0/+10
| | | | | | Add some basic specs for the package attr_reader. https://github.com/rubygems/rubygems/commit/68af2a0ee3
* Merge rubygems master from upstream.Hiroshi SHIBATA2019-06-011-226/+336
| | | | I picked the commit from 3c469e0da538428a0ddd94f99aa73c32da22e8ba
* Update rubygems with latest upstream changesDavid Rodríguez2019-04-281-1/+33
| | | | Closes: https://github.com/ruby/ruby/pull/2154