Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Auto merge of #5483 - denniss:5430-fix-bundle-outdated-local, r=segid…
Browse files Browse the repository at this point in the history
…dins

Fix bundle outdated --local. It's supposed to use local cache to dete…

Fixes #5430
  • Loading branch information
bundlerbot committed Feb 28, 2017
2 parents 26489ed + a14bec0 commit 0b25fae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lib/bundler/cli/outdated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ def run
%w(filter-major filter-minor filter-patch)

definition_resolution = proc do
return definition.resolve_with_cache! if options[:local]
definition.resolve_remotely!
options[:local] ? definition.resolve_with_cache! : definition.resolve_remotely!
end

if options[:parseable]
Expand Down
15 changes: 15 additions & 0 deletions spec/commands/outdated_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,21 @@ def test_group_option(group = nil, gems_list_size = 1)
end

describe "with --local option" do
it "uses local cache to return a list of outdated gems" do
update_repo2 do
build_gem "activesupport", "2.3.4"
end

install_gemfile <<-G
source "file://#{gem_repo2}"
gem "activesupport", "2.3.4"
G

bundle "outdated --local"

expect(out).to include("activesupport (newest 2.3.5, installed 2.3.4, requested = 2.3.4)")
end

it "doesn't hit repo2" do
FileUtils.rm_rf(gem_repo2)

Expand Down

0 comments on commit 0b25fae

Please sign in to comment.