summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_exec_command.rb
AgeCommit message (Collapse)Author
2025-03-27[rubygems/rubygems] Have "gem exec" sort executable names in error message.Ellen Marie Dash
This decouples `gem exec` behavior (and tests) from the sort order of the gemspec. https://github.com/rubygems/rubygems/commit/911cd29159
2025-03-24[rubygems/rubygems] Let `gem exec` raise an error in ambiguous casesDavid Rodríguez
When `gem exec foo` is run, and "foo" is a gem that has multiple executables, none of them named "foo", raise an error explaining the situation and telling user to be more specific. Currently the first command in the executables array is run, but this may come as surprising sometimes, so better raise an error. https://github.com/rubygems/rubygems/commit/acda5d8f6e Notes: Merged: https://github.com/ruby/ruby/pull/12968
2024-10-10[rubygems/rubygems] Run specs that now pass on JRubyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/2af077ee38
2024-09-28[rubygems/rubygems] [tests] Don't expect suggestions that aren't actually ↵Ellen Marie Dash
helpful. https://github.com/rubygems/rubygems/commit/e7d6b92e31
2024-09-09[rubygems/rubygems] Make `gem exec` use the standard GEM_HOMEDavid Rodríguez
https://github.com/rubygems/rubygems/commit/032b3c518a
2024-07-05[rubygems/rubygems] Use preferred add_dependency instead of ↵Jerome Dalbert
add_runtime_dependency https://github.com/rubygems/rubygems/commit/9a08043858
2023-12-07[rubygems/rubygems] Use modern hashes consistentlyDavid Rodríguez
https://github.com/rubygems/rubygems/commit/bb66253f2c
2023-11-13[rubygems/rubygems] Report possible error prior checking output of gem uninstallVít Ondruch
Originally, the failed test case reported following error: ~~~ Failure: test_gem_exec_gem_uninstall(TestGemCommandsExecCommand): <""> was expected to include <"Successfully uninstalled a-2\n">. /mnt/test/rubygems/test_gem_commands_exec_command.rb:742:in `block in test_gem_exec_gem_uninstall' 739: 740: # assert_empty @ui.error 741: refute_includes @ui.output, "running gem exec with" => 742: assert_includes @ui.output, "Successfully uninstalled a-2\n" 743: 744: invoke "--verbose", "gem", "uninstall", "b" 745: assert_includes @ui.output, "Successfully uninstalled b-2\n" /mnt/lib/rubygems/user_interaction.rb:46:in `use_ui' /mnt/lib/rubygems/user_interaction.rb:69:in `use_ui' /mnt/test/rubygems/test_gem_commands_exec_command.rb:726:in `test_gem_exec_gem_uninstall' ~~~ This does not tell much. Empty string is more often good sign, but not in this case. However, checking error output first helps with understanding possible issue: ~~~ Failure: test_gem_exec_gem_uninstall(TestGemCommandsExecCommand): <"ERROR: While executing gem ... (Gem::FilePermissionError)\n" + " You don't have write permissions for the /builddir/bin directory.\n" + "\t/mnt/lib/rubygems/uninstaller.rb:213:in `remove_executables'\n" + ... snip ... /mnt/test/rubygems/test_gem_commands_exec_command.rb:740:in `block in test_gem_exec_gem_uninstall' 737: nil 738: end 739: => 740: assert_empty @ui.error 741: refute_includes @ui.output, "running gem exec with" 742: assert_includes @ui.output, "Successfully uninstalled a-2\n" 743: /mnt/lib/rubygems/user_interaction.rb:46:in `use_ui' /mnt/lib/rubygems/user_interaction.rb:69:in `use_ui' /mnt/test/rubygems/test_gem_commands_exec_command.rb:726:in `test_gem_exec_gem_uninstall' ~~~ BTW this issue is caused by operating_system.rb overriding `Gem.operating_system_defaults` method and explicitly adding `--bindir` option. https://github.com/rubygems/rubygems/commit/d98e36bbe7
2023-04-06[rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenationHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/67ece7b8b6
2023-03-24[rubygems/rubygems] remove test skips/pends on mswin platformMSP-Greg
https://github.com/rubygems/rubygems/commit/1d52eff8bf
2023-03-23Skip test_gem_with_platform_and_platform_dependencies only ruby/ruby repositoryHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/7582
2023-03-23util/rubocop -A --only Layout/EmptyLineAfterMagicCommentHiroshi SHIBATA
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/RescueModifierHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/b490379eab
2023-03-17[rubygems/rubygems] util/rubocop -A --only ↵Hiroshi SHIBATA
Layout/SpaceInsidePercentLiteralDelimiters https://github.com/rubygems/rubygems/commit/c6de27fc6d
2023-03-17[rubygems/rubygems] util/rubocop -A --only Layout/SpaceInsideArrayPercentLiteralHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/75abd2e504
2023-03-03[rubygems/rubygems] Fix warning about ambiguous `/`David Rodríguez
``` /path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:745: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator ``` https://github.com/rubygems/rubygems/commit/e6a538b5c8
2023-03-03[rubygems/rubygems] Fix warnings about unused variableDavid Rodríguez
``` /path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:180: warning: assigned but unused variable - platforms ``` https://github.com/rubygems/rubygems/commit/7e022cb5e3
2023-03-03[rubygems/rubygems] Fix warning about ambiguous `*`David Rodríguez
``` /path/to/rubygems/test/rubygems/test_gem_commands_exec_command.rb:42: warning: `*' interpreted as argument prefix ``` https://github.com/rubygems/rubygems/commit/0806ebf4e0
2023-03-02[rubygems/rubygems] Enable `Layout/DefEndAlignment`David Rodríguez
https://github.com/rubygems/rubygems/commit/4403613fae
2023-02-28fix test/rubygems/test_gem_package_task.rb when in -j modelukeg
This test skipped sometimes due to failure to load 'rake/packagetask'. This is due to manipulation of $LOAD_PATH by other rubygems tests. If rake is loaded before any rubygems tests run, then it works fine. To reproduce the skipping behavior: $ make test-all TESTOPTS="-j6 --test-order=sorted test/rubygems/test_*.rb" Notes: Merged: https://github.com/ruby/ruby/pull/7394
2023-02-22Skip failing test on MSWinNobuyoshi Nakada
2023-02-22[rubygems/rubygems] Skip extension test on jrubySamuel Giddins
https://github.com/rubygems/rubygems/commit/38ee82c297
2023-02-22[rubygems/rubygems] Better teardownSamuel Giddins
https://github.com/rubygems/rubygems/commit/5fa0ebf09b
2023-02-22[rubygems/rubygems] Always join with a stringSamuel Giddins
Gem.path_separator can also be a regexp... https://github.com/rubygems/rubygems/commit/7e6e56a5f3
2023-02-22[rubygems/rubygems] Nil out Gem.configuration after testsSamuel Giddins
https://github.com/rubygems/rubygems/commit/3135ad91d4
2023-02-22[rubygems/rubygems] Use assert_raise instead of assert_raisesSamuel Giddins
For ruby-core compat https://github.com/rubygems/rubygems/commit/c8f85c91a8
2023-02-22[rubygems/rubygems] Add tests covering pre-releases for gem execSamuel Giddins
https://github.com/rubygems/rubygems/commit/f6877c29b9
2023-02-22[rubygems/rubygems] Fix resetting env in gem exec, and make sure it is set ↵Samuel Giddins
for gem exec gem https://github.com/rubygems/rubygems/commit/13a6dd4992
2023-02-22[rubygems/rubygems] Allow gem exec gemSamuel Giddins
https://github.com/rubygems/rubygems/commit/a767f7b9be
2023-02-22[rubygems/rubygems] Remove platform option for gem execSamuel Giddins
Also fix native extensions that load dependencies https://github.com/rubygems/rubygems/commit/a06f9870c7
2023-02-22[rubygems/rubygems] Ensure dependencies are updated by default when running ↵Samuel Giddins
gem exec https://github.com/rubygems/rubygems/commit/664f3e1e5f
2023-02-22[rubygems/rubygems] Add specs for gem execSamuel Giddins
https://github.com/rubygems/rubygems/commit/3078e5834e