summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/dsl.rb2
-rw-r--r--lib/bundler/source/metadata.rb6
-rw-r--r--spec/plugins/source/example_spec.rb2
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 5435512810..b91e4034a7 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -134,7 +134,7 @@ module Bundler
if options.key?("type")
options["type"] = options["type"].to_s
unless Plugin.source?(options["type"])
- raise "No sources available for #{options["type"]}"
+ raise InvalidOption, "No plugin sources available for #{options["type"]}"
end
unless block_given?
diff --git a/lib/bundler/source/metadata.rb b/lib/bundler/source/metadata.rb
index 63d16365c5..e35a52e597 100644
--- a/lib/bundler/source/metadata.rb
+++ b/lib/bundler/source/metadata.rb
@@ -33,7 +33,7 @@ module Bundler
{}
end
- def install(spec, opts)
+ def install(spec, _opts = {})
Bundler.ui.info "Using #{version_message(spec)}"
nil
end
@@ -50,6 +50,10 @@ module Bundler
def hash
self.class.hash
end
+
+ def version_message(spec)
+ "#{spec.name} #{spec.version}"
+ end
end
end
end
diff --git a/spec/plugins/source/example_spec.rb b/spec/plugins/source/example_spec.rb
index 69e33e4077..28fdd6c03f 100644
--- a/spec/plugins/source/example_spec.rb
+++ b/spec/plugins/source/example_spec.rb
@@ -172,7 +172,7 @@ RSpec.describe "real source plugins" do
end
it "installs" do
- bundle "install"
+ bundle! "install"
expect(the_bundle).to include_gems("a-path-gem 1.0")
end