summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_installer.rb
AgeCommit message (Collapse)Author
2024-01-29[rubygems/rubygems] Remove annoying debug infoDavid Rodríguez
Sometimes you want this, sometimes you don't. And when you don't, this hides other debugging puts you may have added. https://github.com/rubygems/rubygems/commit/df37582c81
2023-12-13[rubygems/rubygems] Test if the user dir is used for auto user installationVít Ondruch
This is mainly to align this test case with the `test_process_options_does_not_fallback_to_user_install_when_gem_home_ not_writable_and_no_user_install`, where the `install_dir` is checked already. https://github.com/rubygems/rubygems/commit/02b1884b61
2023-12-13[rubygems/rubygems] Make sure `--no-user-install` is respected for auto user ↵Vít Ondruch
installation The `options[:user_install]` might have three states: * `true`: `--user-install` * `false`: `--no-user-install` and * `nil`: option was not specified However, this had not been respected previously and the `false` and `nil` were treated the same. This could lead to auto user installation despite `--no-user-install` being specified on the command line. Fixes https://github.com/rubygems/rubygems/pull/7237 https://github.com/rubygems/rubygems/commit/9281545474
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-12-07[rubygems/rubygems] Make --build-root disable auto-user-install.Ellen Marie Dash
https://github.com/rubygems/rubygems/commit/6a06b0763f
2023-12-07[rubygems/rubygems] Better approach to falling back to user installation ↵David Rodríguez
when GEM_HOME not writable https://github.com/rubygems/rubygems/commit/f67bced16b
2023-11-08[rubygems/rubygems] Check for `:install_dir` precedence over `:user_install`Vít Ondruch
https://github.com/rubygems/rubygems/commit/6539da07aa
2023-11-08[rubygems/rubygems] Make the user installation less exceptionalVít Ondruch
The main purpose is to put handling of user installation into the same place as e.g. handling the --build-root option handling. There is no reason why the --build-root option should not prefix also paths used for user installation. Please note that the `util_installer` in `test_generate_plugins_with_user_install` enforced the `:install_dir`, which is against what user install is about. https://github.com/rubygems/rubygems/commit/0b10cb41aa
2023-06-19[rubygems/rubygems] Escape regexp metachacters or use `assert_include`Nobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/6d445a85d7
2023-06-15[rubygems/rubygems] Removed unnecessary disabling of Lint/DuplicateMethodsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/225fdf0b2e
2023-05-25[rubygems/rubygems] Load plugin immediatelySutou Kouhei
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
2023-04-13[rubygems/rubygems] Downcase camel like cases of instance variableHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/4eaac27107
2023-04-11util/rubocop -A --only Style/NumericLiteralPrefixHiroshi SHIBATA
2023-04-07[rubygems/rubygems] util/rubocop -A --only Style/FormatStringHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/132a56569d
2023-04-06[rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenationHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/67ece7b8b6
2023-04-05[rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteralHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/9264d83421
2023-04-05[rubygems/rubygems] Unify win_platform? to Gem.win_platform?Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b18a4ef076
2023-03-24[rubygems/rubygems] remove test skips/pends on mswin platformMSP-Greg
https://github.com/rubygems/rubygems/commit/1d52eff8bf
2023-03-23util/rubocop -A --only Layout/EmptyLineAfterMagicCommentHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-23[rubygems/rubygems] util/rubocop -A --only Style/MultilineTernaryOperatorHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/be853dfe3b Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/RescueStandardErrorHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/80b57da926
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/ParenthesesAroundConditionHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/c766a65885
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/CommentAnnotationHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/4e77a1d1d5
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/ParallelAssignmentHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/5c88c77873
2023-03-17[rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolationHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/cb554f6eb7
2023-03-17[rubygems/rubygems] util/rubocop -A --only ↵Hiroshi SHIBATA
Layout/EmptyLinesAroundExceptionHandlingKeywords https://github.com/rubygems/rubygems/commit/ad1fe68d97
2023-03-17[rubygems/rubygems] util/rubocop -A --only Layout/LeadingCommentSpaceHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/4d680320e3
2023-03-17[rubygems/rubygems] util/rubocop -A --only Layout/EmptyLineBetweenDefsHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/00117e69cc
2023-03-17[rubygems/rubygems] util/rubocop -A --only Lint/UnusedBlockArgumentHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/d8efd919db
2022-12-30[rubygems/rubygems] Fix a typoNobuyoshi Nakada
https://github.com/rubygems/rubygems/commit/7c096a5df8
2022-12-20[rubygems/rubygems] Cleanup intermediate artifacts after installing built ↵Eloy Espinaco
extensions https://github.com/rubygems/rubygems/commit/98b6a959bd Notes: Merged: https://github.com/ruby/ruby/pull/6966
2022-12-20[rubygems/rubygems] Fix tests checking intermediate filesEloy Espinaco
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 Notes: Merged: https://github.com/ruby/ruby/pull/6966
2022-12-02[rubygems/rubygems] Delete partial file and re-raise on Errno::ENOSPC.Ellen Marie Dash
Add test for not leaving empty files if ENOSPC is raised during 'gem install' https://github.com/rubygems/rubygems/commit/8e0e20f079
2022-08-09Merge rubygems/bundler HEAD.Hiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/dfbb5a38114640e0d8d616861607f3de73ee0199 Notes: Merged: https://github.com/ruby/ruby/pull/6224
2022-08-04[rubygems/rubygems] Warn dangling symlinksDavid Rodríguez
https://github.com/rubygems/rubygems/commit/425b78637f
2022-08-03Merge rubygems/bundler HEADHiroshi SHIBATA
Pick from https://github.com/rubygems/rubygems/commit/8331e63263081a6aa690d8025d2957f30c4e814a Notes: Merged: https://github.com/ruby/ruby/pull/6209
2022-07-22RubyGems: Enable Style/StringLiterals copTakuya Noguchi
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-04-16[rubygems/rubygems] Fix test issues surfaced using a stricter behavior of ↵David Rodríguez
`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
2022-01-15[rubygems/rubygems] Support binstubs with `--enable-load-relative` prologDavid Rodríguez
https://github.com/rubygems/rubygems/commit/32a5e9057a
2022-01-15[rubygems/rubygems] Privatize some test utilsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/386b3b85ca
2021-12-24Merge RubyGems-3.3.2 and Bundler-2.3.2Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/5334
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-30[rubygems/rubygems] Run hooks tests on gemspecs not already installedDavid Rodríguez
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
2021-08-31[rubygems/rubygems] Use `Gem.use_gemdeps` only from binstubsDavid Rodríguez
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 Notes: Merged: https://github.com/ruby/ruby/pull/4789
2021-07-07Sync latest bundler & rubygems development versionDavid Rodríguez
Notes: Merged: https://github.com/ruby/ruby/pull/4533
2021-05-28[rubygems/rubygems] Use pend instead of skipHiroshi SHIBATA
2021-05-28[rubygems/rubygems] Fix "instance variable not initialized" warningDavid Rodríguez
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
2021-05-28[rubygems/rubygems] Require the new files in `test/` relativelyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c77868a555
2021-05-12[rubygems/rubygems] Added begin-end block for java platformHiroshi SHIBATA
Because pend of test-unit raises exception. https://github.com/rubygems/rubygems/commit/b5e2d0855a Notes: Merged: https://github.com/ruby/ruby/pull/4491