summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Arko <andre@arko.net>2013-09-06 17:53:24 -0700
committerAndré Arko <andre@arko.net>2013-09-06 17:53:24 -0700
commit8844af2cdf3c8c8cfccda0faf052534aa192ee3f (patch)
treedcebf03c263274ded893cbfefcd3713ecb79a634
parentc17c215411e62ff4de64d5bfa51ca3a74a0b89b4 (diff)
parentcea21184cd23a0fab8e01d48d50f409cf4792b50 (diff)
downloadbundler-8844af2cdf3c8c8cfccda0faf052534aa192ee3f.tar.gz
Merge pull request #2630 from jendiamond/invalid_gemname
Invalid gemname
-rw-r--r--lib/bundler/cli.rb7
-rw-r--r--spec/commands/outdated_spec.rb7
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index a1c54cf4fb..232d518333 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -418,8 +418,12 @@ module Bundler
"Do not attempt to fetch gems remotely and use the gem cache instead"
def outdated(*gems)
sources = Array(options[:source])
- Bundler.definition.validate_ruby!
+ gems.each do |gem_name|
+ select_spec(gem_name)
+ end
+
+ Bundler.definition.validate_ruby!
current_specs = Bundler.ui.silence { Bundler.load.specs }
current_dependencies = {}
Bundler.ui.silence { Bundler.load.dependencies.each { |dep| current_dependencies[dep.name] = dep } }
@@ -879,7 +883,6 @@ module Bundler
message
end
-
def without_groups_message
groups = Bundler.settings.without
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index b498510ff7..f0ccd1427a 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -113,4 +113,11 @@ describe "bundle outdated" do
end
end
end
+
+ describe "with invalid gem name" do
+ it "returns could not find gem name" do
+ bundle "outdated invalid_gem_name"
+ expect(out).to include("Could not find gem 'invalid_gem_name'.")
+ end
+ end
end