<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/rubygems/test_gem_commands_exec_command.rb, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[rubygems/rubygems] Have "gem exec" sort executable names in error message.</title>
<updated>2025-03-27T04:57:25+00:00</updated>
<author>
<name>Ellen Marie Dash</name>
<email>me@duckie.co</email>
</author>
<published>2025-03-25T22:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af594f5166538d6d7f5c21d26ed824f03730c61a'/>
<id>af594f5166538d6d7f5c21d26ed824f03730c61a</id>
<content type='text'>
This decouples `gem exec` behavior (and tests) from the sort order of
the gemspec.

https://github.com/rubygems/rubygems/commit/911cd29159
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This decouples `gem exec` behavior (and tests) from the sort order of
the gemspec.

https://github.com/rubygems/rubygems/commit/911cd29159
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Let `gem exec` raise an error in ambiguous cases</title>
<updated>2025-03-24T04:25:07+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2025-03-17T19:10:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4fe882e2c925c067693fbd432228d92548481ec4'/>
<id>4fe882e2c925c067693fbd432228d92548481ec4</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Run specs that now pass on JRuby</title>
<updated>2024-10-10T14:51:30+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2024-10-04T15:56:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a1492ffdc24ae96ea06f4549467211f8d0bbe675'/>
<id>a1492ffdc24ae96ea06f4549467211f8d0bbe675</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/2af077ee38
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/2af077ee38
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] [tests] Don't expect suggestions that aren't actually helpful.</title>
<updated>2024-09-28T21:12:25+00:00</updated>
<author>
<name>Ellen Marie Dash</name>
<email>me@duckie.co</email>
</author>
<published>2024-09-28T18:57:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5c18b63d0058d3d4acfce3588c3b47f3ae6c46bd'/>
<id>5c18b63d0058d3d4acfce3588c3b47f3ae6c46bd</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/e7d6b92e31
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/e7d6b92e31
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Make `gem exec` use the standard GEM_HOME</title>
<updated>2024-09-09T08:46:01+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2024-08-29T16:26:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=72e80c8f29c7da37039e16f403814aa7fedc7754'/>
<id>72e80c8f29c7da37039e16f403814aa7fedc7754</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/032b3c518a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/032b3c518a
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use preferred add_dependency instead of add_runtime_dependency</title>
<updated>2024-07-05T02:24:53+00:00</updated>
<author>
<name>Jerome Dalbert</name>
<email>jerome.dalbert@gmail.com</email>
</author>
<published>2024-07-04T19:49:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bbb4da78c7e35e41cc91af0791eb8f51c371d964'/>
<id>bbb4da78c7e35e41cc91af0791eb8f51c371d964</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/9a08043858
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/9a08043858
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use modern hashes consistently</title>
<updated>2023-12-07T22:29:33+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-12-07T21:10:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2755cb1b2fbc4a5f08ca56345b5945bd452da74e'/>
<id>2755cb1b2fbc4a5f08ca56345b5945bd452da74e</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/bb66253f2c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/bb66253f2c
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Report possible error prior checking output of gem uninstall</title>
<updated>2023-11-13T02:06:10+00:00</updated>
<author>
<name>Vít Ondruch</name>
<email>vondruch@redhat.com</email>
</author>
<published>2023-11-09T14:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=43b8b8875115f1883d7654a663a9238343cb90ab'/>
<id>43b8b8875115f1883d7654a663a9238343cb90ab</id>
<content type='text'>
Originally, the failed test case reported following error:

~~~
Failure: test_gem_exec_gem_uninstall(TestGemCommandsExecCommand):
  &lt;""&gt; was expected to include
  &lt;"Successfully uninstalled a-2\n"&gt;.
/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"
  =&gt; 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):
  &lt;"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:
  =&gt; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally, the failed test case reported following error:

~~~
Failure: test_gem_exec_gem_uninstall(TestGemCommandsExecCommand):
  &lt;""&gt; was expected to include
  &lt;"Successfully uninstalled a-2\n"&gt;.
/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"
  =&gt; 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):
  &lt;"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:
  =&gt; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation</title>
<updated>2023-04-06T23:33:20+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-04-06T02:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fb822076d79339427648cb9eacf76528f827427e'/>
<id>fb822076d79339427648cb9eacf76528f827427e</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/67ece7b8b6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/67ece7b8b6
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] remove test skips/pends on mswin platform</title>
<updated>2023-03-24T13:00:53+00:00</updated>
<author>
<name>MSP-Greg</name>
<email>Greg.mpls@gmail.com</email>
</author>
<published>2023-03-23T15:44:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7149f5763ea121b71ad0763cd8554bc663d8eedd'/>
<id>7149f5763ea121b71ad0763cd8554bc663d8eedd</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/1d52eff8bf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/1d52eff8bf
</pre>
</div>
</content>
</entry>
</feed>
