summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgrim Mittal <agrimmittal97@gmail.com>2018-05-27 12:55:48 +0530
committerAgrim Mittal <agrimmittal97@gmail.com>2018-06-28 15:35:16 +0530
commitdad7312a22c84defbd07ea7f2bfc8787d32abce8 (patch)
tree2eeb00e4cfbd4d2464518004cfb558d95bdecf19
parenta851f9f7154e2d845a5da2e9e11bd411a6cf9f8f (diff)
downloadbundler-dad7312a22c84defbd07ea7f2bfc8787d32abce8.tar.gz
fix requirement in pretty_dependency when version not specified
-rw-r--r--lib/bundler/shared_helpers.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index e0376eb00b..6072b6f514 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -197,12 +197,13 @@ module Bundler
def pretty_dependency(dep, print_source = false, print_requirements = false)
msg = String.new(dep.name)
- msg << " (#{dep.requirement})" unless dep.requirement == Gem::Requirement.default
+ msg << " (#{dep.requirement})" if dep.requirement != Gem::Requirement.default || print_requirements
+
if dep.is_a?(Bundler::Dependency)
platform_string = dep.platforms.join(", ")
msg << " " << platform_string if !platform_string.empty? && platform_string != Gem::Platform::RUBY
end
- msg << " (#{dep.requirement})" if print_requirements && dep.requirement
+
msg << " from the `#{dep.source}` source" if print_source && dep.source
msg
end