Skip to content

Commit

Permalink
Merge pull request #7572 from rubygems/release/bundler_2.5.9_rubygems…
Browse files Browse the repository at this point in the history
…_3.5.9

Prepare RubyGems 3.5.9 and Bundler 2.5.9
  • Loading branch information
deivid-rodriguez committed Apr 12, 2024
2 parents cf66a73 + b367481 commit 4304697
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,9 @@
# 3.5.9 / 2024-04-12

## Enhancements:

* Installs bundler 2.5.9 as a default gem.

# 3.5.8 / 2024-04-11

## Security:
Expand Down
6 changes: 6 additions & 0 deletions bundler/CHANGELOG.md
@@ -1,3 +1,9 @@
# 2.5.9 (April 12, 2024)

## Bug fixes:

- Fix installing plugins via relative paths [#7571](https://github.com/rubygems/rubygems/pull/7571)

# 2.5.8 (April 11, 2024)

## Enhancements:
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/plugin/installer.rb
Expand Up @@ -77,7 +77,7 @@ def install_git(names, version, options)

def install_path(names, version, path)
source_list = SourceList.new
source = source_list.add_path_source({ "path" => path })
source = source_list.add_path_source({ "path" => path, "root_path" => SharedHelpers.pwd })

install_all_sources(names, version, source_list, source)
end
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/plugin/installer/path.rb
Expand Up @@ -5,7 +5,7 @@ module Plugin
class Installer
class Path < Bundler::Source::Path
def root
Plugin.root
SharedHelpers.in_bundle? ? Bundler.root : Plugin.root
end

def generate_bin(spec, disable_extensions = false)
Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/version.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false

module Bundler
VERSION = "2.5.8".freeze
VERSION = "2.5.9".freeze

def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i
Expand Down
55 changes: 49 additions & 6 deletions bundler/spec/plugins/install_spec.rb
Expand Up @@ -212,14 +212,42 @@ def exec(command, args)
end
end

it "installs from a path source" do
build_lib "path_plugin" do |s|
s.write "plugins.rb"
context "path plugins" do
it "installs from a path source" do
build_lib "path_plugin" do |s|
s.write "plugins.rb"
end
bundle "plugin install path_plugin --path #{lib_path("path_plugin-1.0")}"

expect(out).to include("Installed plugin path_plugin")
plugin_should_be_installed("path_plugin")
end

it "installs from a relative path source" do
build_lib "path_plugin" do |s|
s.write "plugins.rb"
end
path = lib_path("path_plugin-1.0").relative_path_from(bundled_app)
bundle "plugin install path_plugin --path #{path}"

expect(out).to include("Installed plugin path_plugin")
plugin_should_be_installed("path_plugin")
end
bundle "plugin install path_plugin --path #{lib_path("path_plugin-1.0")}"

expect(out).to include("Installed plugin path_plugin")
plugin_should_be_installed("path_plugin")
it "installs from a relative path source when inside an app" do
allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile)
gemfile ""

build_lib "ga-plugin" do |s|
s.write "plugins.rb"
end

path = lib_path("ga-plugin-1.0").relative_path_from(bundled_app)
bundle "plugin install ga-plugin --path #{path}"

plugin_should_be_installed("ga-plugin")
expect(local_plugin_gem("foo-1.0")).not_to be_directory
end
end

context "Gemfile eval" do
Expand Down Expand Up @@ -291,6 +319,21 @@ def exec(command, args)
plugin_should_be_installed("ga-plugin")
end

it "accepts relative path sources" do
build_lib "ga-plugin" do |s|
s.write "plugins.rb"
end

path = lib_path("ga-plugin-1.0").relative_path_from(bundled_app)
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
plugin 'ga-plugin', :path => "#{path}"
G

expect(out).to include("Installed plugin ga-plugin")
plugin_should_be_installed("ga-plugin")
end

context "in deployment mode" do
it "installs plugins" do
install_gemfile <<-G
Expand Down
2 changes: 1 addition & 1 deletion lib/rubygems.rb
Expand Up @@ -9,7 +9,7 @@
require "rbconfig"

module Gem
VERSION = "3.5.8"
VERSION = "3.5.9"
end

# Must be first since it unloads the prelude from 1.9.2
Expand Down
2 changes: 1 addition & 1 deletion rubygems-update.gemspec
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = "rubygems-update"
s.version = "3.5.8"
s.version = "3.5.9"
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]

Expand Down
2 changes: 1 addition & 1 deletion tool/bundler/dev_gems.rb.lock
Expand Up @@ -116,4 +116,4 @@ CHECKSUMS
webrick (1.8.1) sha256=19411ec6912911fd3df13559110127ea2badd0c035f7762873f58afc803e158f

BUNDLED WITH
2.5.8
2.5.9
2 changes: 1 addition & 1 deletion tool/bundler/lint_gems.rb.lock
Expand Up @@ -65,4 +65,4 @@ CHECKSUMS
unicode-display_width (2.5.0) sha256=7e7681dcade1add70cb9fda20dd77f300b8587c81ebbd165d14fd93144ff0ab4

BUNDLED WITH
2.5.8
2.5.9
2 changes: 1 addition & 1 deletion tool/bundler/release_gems.rb.lock
Expand Up @@ -74,4 +74,4 @@ CHECKSUMS
uri (0.13.0) sha256=26553c2a9399762e1e8bebd4444b4361c4b21298cf1c864b22eeabc9c4998f24

BUNDLED WITH
2.5.8
2.5.9
2 changes: 1 addition & 1 deletion tool/bundler/rubocop_gems.rb.lock
Expand Up @@ -107,4 +107,4 @@ CHECKSUMS
unicode-display_width (2.5.0) sha256=7e7681dcade1add70cb9fda20dd77f300b8587c81ebbd165d14fd93144ff0ab4

BUNDLED WITH
2.5.8
2.5.9
2 changes: 1 addition & 1 deletion tool/bundler/standard_gems.rb.lock
Expand Up @@ -128,4 +128,4 @@ CHECKSUMS
unicode-display_width (2.5.0) sha256=7e7681dcade1add70cb9fda20dd77f300b8587c81ebbd165d14fd93144ff0ab4

BUNDLED WITH
2.5.8
2.5.9
2 changes: 1 addition & 1 deletion tool/bundler/test_gems.rb.lock
Expand Up @@ -65,4 +65,4 @@ CHECKSUMS
webrick (1.7.0) sha256=87e9b8e39947b7925338a5eb55427b11ce1f2b25a3645770ec9f39d8ebdb8cb4

BUNDLED WITH
2.5.8
2.5.9
2 changes: 1 addition & 1 deletion tool/bundler/vendor_gems.rb.lock
Expand Up @@ -68,4 +68,4 @@ CHECKSUMS
uri (0.13.0) sha256=26553c2a9399762e1e8bebd4444b4361c4b21298cf1c864b22eeabc9c4998f24

BUNDLED WITH
2.5.8
2.5.9

0 comments on commit 4304697

Please sign in to comment.