summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-05-03 12:35:36 -0700
committerAndre Arko <andre@arko.net>2015-05-03 13:11:36 -0700
commit4fc94ba129970908d02c549584336e5836a31019 (patch)
tree88891e1bffcb3b4e3743bba6ebadc33968f7b570
parent954388e96ec8d465249cca01571a7362df20ec84 (diff)
downloadbundler-4fc94ba129970908d02c549584336e5836a31019.tar.gz
show groups in non-verbose mode, fix NoMethodError
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--spec/commands/outdated_spec.rb5
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 7e60621ff7..08bcbde609 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -64,7 +64,7 @@ module Bundler
current_version = "#{current_spec.version}#{current_spec.git_version}"
dependency_version = %|, requested #{dependency.requirement}| if dependency && dependency.specific?
- if options["verbose"]
+ if dependency
groups = dependency.groups.join(", ")
pl = (dependency.groups.length > 1) ? "s" : ""
groups = " in group#{pl} \"#{groups}\""
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index 9ecdc067eb..fe3508ad70 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -52,11 +52,8 @@ describe "bundle outdated" do
expect(exitstatus).to be_zero if exitstatus
end
- end
- describe "with --verbose option" do
it "adds gem group to dependency output when repo is updated" do
-
install_gemfile <<-G
source "file://#{gem_repo2}"
@@ -68,9 +65,7 @@ describe "bundle outdated" do
update_repo2 { build_gem "activesupport", "3.0" }
bundle "outdated --verbose"
-
expect(out).to include("activesupport (newest 3.0, installed 2.3.5, requested = 2.3.5) in groups \"development, test\"")
-
end
end