Skip to content

Commit

Permalink
Merge pull request #4020 from rubygems/bring-back-support-for-path-in…
Browse files Browse the repository at this point in the history
…-plugin

Bring back the possibility to install a plugin from path

(cherry picked from commit 62782d3)
  • Loading branch information
deivid-rodriguez committed Dec 7, 2020
1 parent e8a8347 commit 5f9244f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bundler/lib/bundler/plugin/dsl.rb
Expand Up @@ -10,7 +10,7 @@ class PluginGemfileError < PluginError; end
# So that we don't have to override all there methods to dummy ones
# explicitly.
# They will be handled by method_missing
[:gemspec, :gem, :path, :install_if, :platforms, :env].each {|m| undef_method m }
[:gemspec, :gem, :install_if, :platforms, :env].each {|m| undef_method m }

# This lists the plugins that was added automatically and not specified by
# the user.
Expand Down
13 changes: 13 additions & 0 deletions bundler/spec/plugins/install_spec.rb
Expand Up @@ -208,6 +208,19 @@ def exec(command, args)
plugin_should_be_installed("ga-plugin")
end

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

install_gemfile <<-G
plugin 'ga-plugin', :path => "#{lib_path("ga-plugin-1.0")}"
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

0 comments on commit 5f9244f

Please sign in to comment.