summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/definition.rb9
-rw-r--r--spec/install/gemfile/gemspec_spec.rb8
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 4b9a781c82..930386afda 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -205,19 +205,18 @@ module Bundler
end
def missing_specs?
- missing = []
- resolve.materialize(requested_dependencies, missing)
+ missing = missing_specs
return false if missing.empty?
Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
true
rescue BundlerError => e
- Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
- true
- ensure
@index = nil
@resolve = nil
@specs = nil
@gem_version_promoter = nil
+
+ Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
+ true
end
def requested_specs
diff --git a/spec/install/gemfile/gemspec_spec.rb b/spec/install/gemfile/gemspec_spec.rb
index 6ab974ee41..1dc016ed23 100644
--- a/spec/install/gemfile/gemspec_spec.rb
+++ b/spec/install/gemfile/gemspec_spec.rb
@@ -145,7 +145,9 @@ RSpec.describe "bundle install from an existing gemspec" do
G
bundle! "install", :verbose => true
- expect(out).to include("Found no changes, using resolution from the lockfile")
+
+ message = "Found no changes, using resolution from the lockfile"
+ expect(out.scan(message).size).to eq(1)
end
it "should match a lockfile without needing to re-resolve with development dependencies" do
@@ -162,7 +164,9 @@ RSpec.describe "bundle install from an existing gemspec" do
G
bundle! "install", :verbose => true
- expect(out).to include("Found no changes, using resolution from the lockfile")
+
+ message = "Found no changes, using resolution from the lockfile"
+ expect(out.scan(message).size).to eq(1)
end
it "should match a lockfile on non-ruby platforms with a transitive platform dependency" do