<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/bundler/installer/standalone.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Update RubyGems 3.5.16 and Bundler 2.5.16 for Ruby 3.3 (#11252)</title>
<updated>2024-07-30T16:05:54+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-07-30T16:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f85c7deacc25738bd83ba182370c283ba82b61d4'/>
<id>f85c7deacc25738bd83ba182370c283ba82b61d4</id>
<content type='text'>
* Merge RubyGems-3.5.12 and Bundler-2.5.12

* Merge RubyGems-3.5.13 and Bundler-2.5.13

* Merge RubyGems-3.5.14 and Bundler-2.5.14

* Merge RubyGems-3.5.15 and Bundler-2.5.15

* Merge RubyGems-3.5.16 and Bundler-2.5.16</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Merge RubyGems-3.5.12 and Bundler-2.5.12

* Merge RubyGems-3.5.13 and Bundler-2.5.13

* Merge RubyGems-3.5.14 and Bundler-2.5.14

* Merge RubyGems-3.5.15 and Bundler-2.5.15

* Merge RubyGems-3.5.16 and Bundler-2.5.16</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] Prevent gem activation in standalone mode</title>
<updated>2023-10-03T17:16:19+00:00</updated>
<author>
<name>Daniel Colson</name>
<email>danieljamescolson@gmail.com</email>
</author>
<published>2023-08-29T12:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=accda74cbeb96a5539e0cf44741418654291d3c0'/>
<id>accda74cbeb96a5539e0cf44741418654291d3c0</id>
<content type='text'>
As discussed in https://github.com/rubygems/rubygems/issues/6273#issuecomment-1449176658

The `gem` method behaves awkwardly in standalone mode. Assuming bundler
isn't loaded at all, a call to gem might activate a gem that is not part
of the bundle (because it's the gem method defined in
lib/rubygems/core_ext/kernel_gem.rb and not
lib/bundler/rubygems_integration.rb). And when running with
`--disable-gems`, the gem method won't be defined at all so we'll get a
NoMethodError.

Calls to `gem` can appear in dependencies outside an application's
control. To work around this at GitHub we defined our own `Kernel#gem`
that no-ops.

I agree with https://github.com/rubygems/rubygems/issues/6273#issuecomment-1440755882

&gt; people using standalone mode don't want to activate gems like Kernel.gem

This commit redefines `Kernel#gem` in the standalone script to no-op.

https://github.com/rubygems/rubygems/commit/bea17b55f1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As discussed in https://github.com/rubygems/rubygems/issues/6273#issuecomment-1449176658

The `gem` method behaves awkwardly in standalone mode. Assuming bundler
isn't loaded at all, a call to gem might activate a gem that is not part
of the bundle (because it's the gem method defined in
lib/rubygems/core_ext/kernel_gem.rb and not
lib/bundler/rubygems_integration.rb). And when running with
`--disable-gems`, the gem method won't be defined at all so we'll get a
NoMethodError.

Calls to `gem` can appear in dependencies outside an application's
control. To work around this at GitHub we defined our own `Kernel#gem`
that no-ops.

I agree with https://github.com/rubygems/rubygems/issues/6273#issuecomment-1440755882

&gt; people using standalone mode don't want to activate gems like Kernel.gem

This commit redefines `Kernel#gem` in the standalone script to no-op.

https://github.com/rubygems/rubygems/commit/bea17b55f1
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Centralize logic using `Pathname#relative_path_from`</title>
<updated>2023-09-27T05:20:58+00:00</updated>
<author>
<name>Ry Biesemeyer</name>
<email>ry.biesemeyer@elastic.co</email>
</author>
<published>2021-12-02T16:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bece8808744ee178a4c55c6954edd30fb93b9ad3'/>
<id>bece8808744ee178a4c55c6954edd30fb93b9ad3</id>
<content type='text'>
To avoid potential crashes when trying to jump from a drive to another
on Windows, and take the change refactor things a bit.

https://github.com/rubygems/rubygems/commit/7c9a9a431a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid potential crashes when trying to jump from a drive to another
on Windows, and take the change refactor things a bit.

https://github.com/rubygems/rubygems/commit/7c9a9a431a
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Allow standalone mode to work on a Windows edge case</title>
<updated>2023-09-25T07:13:21+00:00</updated>
<author>
<name>David Rodriguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-09-22T20:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0e808183eea91b610a17a941e4592b494e445203'/>
<id>0e808183eea91b610a17a941e4592b494e445203</id>
<content type='text'>
If a gem is located in a different drive than the Gemfile, standalone
mode will fail to generate the `bundler/setup` script, failing with an
error like

```
ArgumentError: different prefix: "C:/" and "D:/a/rubygems/rubygems/bundler/tmp/2/bundled_app/bundle/bundler"
  C:/hostedtoolcache/windows/Ruby/3.0.5/x64/lib/ruby/3.0.0/pathname.rb:528:in `relative_path_from'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:58:in `gem_path'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:33:in `block (2 levels) in paths'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:32:in `map'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:32:in `block in paths'
```

I'm fixing this by falling back to using a full path in this case.

This was caught by a failing spec, so I'm not adding new specs.

https://github.com/rubygems/rubygems/commit/3cb9b9ab7a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a gem is located in a different drive than the Gemfile, standalone
mode will fail to generate the `bundler/setup` script, failing with an
error like

```
ArgumentError: different prefix: "C:/" and "D:/a/rubygems/rubygems/bundler/tmp/2/bundled_app/bundle/bundler"
  C:/hostedtoolcache/windows/Ruby/3.0.5/x64/lib/ruby/3.0.0/pathname.rb:528:in `relative_path_from'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:58:in `gem_path'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:33:in `block (2 levels) in paths'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:32:in `map'
  D:/a/rubygems/rubygems/bundler/tmp/2/gems/system/gems/bundler-2.4.20/lib/bundler/installer/standalone.rb:32:in `block in paths'
```

I'm fixing this by falling back to using a full path in this case.

This was caught by a failing spec, so I'm not adding new specs.

https://github.com/rubygems/rubygems/commit/3cb9b9ab7a
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Use Kernel.singleton_class</title>
<updated>2023-08-01T00:31:22+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-07-31T11:08:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=de91ce980ad6022a506ec12c7eb20392a37e98fe'/>
<id>de91ce980ad6022a506ec12c7eb20392a37e98fe</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/9be984f281
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/9be984f281
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge rubygems/bundler master</title>
<updated>2023-02-21T10:28:12+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-02-21T09:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1'/>
<id>38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1</id>
<content type='text'>
  Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Make `--standalone` play nice with `--local`</title>
<updated>2022-07-29T19:24:25+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-07-24T20:32:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=030050cdfa9ae65cbbcd0f708aa2459e0ef17c3a'/>
<id>030050cdfa9ae65cbbcd0f708aa2459e0ef17c3a</id>
<content type='text'>
I'm not sure if using relative paths in the generated script is best for
this case, since it makes the script not movable, but that can be
improved later.

https://github.com/rubygems/rubygems/commit/7f5bdbb842
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm not sure if using relative paths in the generated script is best for
this case, since it makes the script not movable, but that can be
improved later.

https://github.com/rubygems/rubygems/commit/7f5bdbb842
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix standalone script generation for statically linked dev ruby</title>
<updated>2022-06-23T09:17:37+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-06-21T16:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6f229da2c07aec3441078248d7fd2fe844e8bc92'/>
<id>6f229da2c07aec3441078248d7fd2fe844e8bc92</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/4d0d7b3c97
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/4d0d7b3c97
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix extension paths in generated standalone script</title>
<updated>2022-06-20T07:04:47+00:00</updated>
<author>
<name>citrusmoose</name>
<email>citrusmoose@users.noreply.github.com</email>
</author>
<published>2022-06-16T19:13:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8d689294d033d59f211a6d2c2da72b34ce53c4e5'/>
<id>8d689294d033d59f211a6d2c2da72b34ce53c4e5</id>
<content type='text'>
The paths for extensions of gems would contain the hardcoded ruby
version on which the extension was built. This will replace it with
runtime ruby version like the parent version directory. It will make the
standalone script compatible between different ruby version installations.

https://github.com/rubygems/rubygems/commit/a9dae93d5d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The paths for extensions of gems would contain the hardcoded ruby
version on which the extension was built. This will replace it with
runtime ruby version like the parent version directory. It will make the
standalone script compatible between different ruby version installations.

https://github.com/rubygems/rubygems/commit/a9dae93d5d
</pre>
</div>
</content>
</entry>
</feed>
