summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/outdated.rb
diff options
context:
space:
mode:
authorJames Wen <jrw2175@columbia.edu>2016-04-25 01:51:03 -0400
committerJames Wen <jrw2175@columbia.edu>2016-04-25 01:51:03 -0400
commitcc3558650ed94c110ee1ab50ea75cd556dc188e9 (patch)
tree7e8f0efa137be773008827fda114d2073a93e9a7 /lib/bundler/cli/outdated.rb
parentf8c6f25f499a6286be94d48db4f1c211b7e00f4d (diff)
downloadbundler-cc3558650ed94c110ee1ab50ea75cd556dc188e9.tar.gz
Only report same platform gem updates for `bundle outdated`
- `bundle outdated` will now only show updates for a gem if there are available updates for that gem on the same platform - ex. gem `laduradura` is being used on ruby platform but updates are available on gem `laduradura` for java platform = do not display potential update versions for java
Diffstat (limited to 'lib/bundler/cli/outdated.rb')
-rw-r--r--lib/bundler/cli/outdated.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index ba2ba90de4..09b2d71453 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -48,9 +48,9 @@ module Bundler
dependency = current_dependencies[current_spec.name]
if options["strict"]
- active_spec = definition.specs.detect {|spec| spec.name == current_spec.name }
+ active_spec = definition.specs.detect {|spec| spec.name == current_spec.name && spec.platform == current_spec.platform }
else
- active_specs = definition.index[current_spec.name].sort_by(&:version)
+ active_specs = definition.index[current_spec.name].select {|spec| spec.platform == current_spec.platform }.sort_by(&:version)
if !current_spec.version.prerelease? && !options[:pre] && active_specs.size > 1
active_spec = active_specs.delete_if {|b| b.respond_to?(:version) && b.version.prerelease? }
end