<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/bundler/installer/standalone.rb, branch v3_4_9</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] More aggressive `Performance/FlatMap` cop configuration</title>
<updated>2024-11-26T06:11:05+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2024-11-18T19:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4addaaf4df9a7b48c3490b806c195fcb7be999b5'/>
<id>4addaaf4df9a7b48c3490b806c195fcb7be999b5</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/d8d68cc00e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/d8d68cc00e
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Fix gemspec `require_paths` type validation</title>
<updated>2024-07-18T09:25:17+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2024-07-17T20:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=86c99a8d14daa15b1b5f6c99697630aa3abb7d5d'/>
<id>86c99a8d14daa15b1b5f6c99697630aa3abb7d5d</id>
<content type='text'>
It was not properly being detected as an Array attribute, and thus not
properly validated.

Fixing this allows us to remove a strange `rescue` clause in Bundler.

https://github.com/rubygems/rubygems/commit/4121a32408
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was not properly being detected as an Array attribute, and thus not
properly validated.

Fixing this allows us to remove a strange `rescue` clause in Bundler.

https://github.com/rubygems/rubygems/commit/4121a32408
</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>
</feed>
