summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-03-31 11:26:35 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-03-31 11:26:35 -0500
commit276c82b5e84829f579f0bdfb3ce59fad8c85f6a4 (patch)
treeadcebaa5c1a30b0460e8feb7a0e8933a6c8d73b6
parent4e2763d275fae85f174e707698dc541a988b9151 (diff)
downloadbundler-276c82b5e84829f579f0bdfb3ce59fad8c85f6a4.tar.gz
[Outdated] Support running when gems are not yet installed
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--spec/commands/outdated_spec.rb15
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 93e50b10b6..9050126cd1 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -20,7 +20,7 @@ module Bundler
end
Bundler.definition.validate_runtime!
- current_specs = Bundler.ui.silence { Bundler.load.specs }
+ current_specs = Bundler.ui.silence { Bundler.definition.resolve }
current_dependencies = {}
Bundler.ui.silence do
Bundler.load.dependencies.each do |dep|
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index b927a0be2b..c6b6c9f59e 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -489,6 +489,21 @@ RSpec.describe "bundle outdated" do
it_behaves_like "version update is detected"
end
+ context "when on a new machine" do
+ before do
+ simulate_new_machine
+
+ update_git "foo", :path => lib_path("foo")
+ update_repo2 do
+ build_gem "activesupport", "3.3.5"
+ build_gem "weakling", "0.8.0"
+ end
+ end
+
+ subject { bundle "outdated" }
+ it_behaves_like "version update is detected"
+ end
+
shared_examples_for "minor version updates are detected" do
before do
update_repo2 do