summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-06-09 23:42:20 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-06-15 07:01:24 +0900
commit2ff9b7b93dc3929426be393ccd05ece2f89d8276 (patch)
tree958d9477fac16c016c07e27efb68b0baf66abdb8 /lib/bundler/definition.rb
parent21238f38a8eb881d403e47395781c2cc9eafbd9a (diff)
[rubygems/rubygems] Show missing spec in lockfile incomplete error message
https://github.com/rubygems/rubygems/commit/b86caaa3d5
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r--lib/bundler/definition.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 7bcc768b51..0e71ef94b1 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -146,7 +146,7 @@ module Bundler
@dependency_changes = converge_dependencies
@local_changes = converge_locals
- @incomplete_lockfile = check_missing_lockfile_specs
+ @missing_lockfile_dep = check_missing_lockfile_dep
end
def gem_version_promoter
@@ -474,7 +474,7 @@ module Bundler
private :sources
def nothing_changed?
- !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@incomplete_lockfile
+ !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@missing_lockfile_dep
end
def no_resolve_needed?
@@ -615,7 +615,7 @@ module Bundler
[@new_platform, "you added a new platform to your gemfile"],
[@path_changes, "the gemspecs for path gems changed"],
[@local_changes, "the gemspecs for git local gems changed"],
- [@incomplete_lockfile, "your lock file is missing some gems"],
+ [@missing_lockfile_dep, "your lock file is missing \"#{@missing_lockfile_dep}\""],
].select(&:first).map(&:last).join(", ")
end
@@ -670,7 +670,7 @@ module Bundler
!sources_with_changes.each {|source| @unlock[:sources] << source.name }.empty?
end
- def check_missing_lockfile_specs
+ def check_missing_lockfile_dep
all_locked_specs = @locked_specs.map(&:name) << "bundler"
missing = @locked_specs.select do |s|
@@ -680,7 +680,7 @@ module Bundler
if missing.any?
@locked_specs.delete(missing)
- true
+ missing.first.name
else
false
end