summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-06-19 17:01:36 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-03 09:29:57 +0900
commitc1ca77281d60e5b81dd4ba0df36f7ea6abf3f92a (patch)
tree76d0b8a72ff3063b0d26ea0bca818f3fbca19540 /lib/bundler
parentd8cd45cb1a459f8e82f055d8c2d335f57962dc31 (diff)
[bundler/bundler] Add all platforms to lockfile by default
https://github.com/bundler/bundler/commit/3dc509e645
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--lib/bundler/definition.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 857caf0a03..2075fe83c8 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -172,6 +172,8 @@ module Bundler
end
def retrieve_active_spec(strict, definition, current_spec)
+ return unless current_spec.match_platform(Bundler.local_platform)
+
if strict
active_spec = definition.find_resolved_spec(current_spec)
else
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 562b1a0ed1..8f85b2ccec 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -113,7 +113,7 @@ module Bundler
end
@unlocking ||= @unlock[:ruby] ||= (!@locked_ruby_version ^ !@ruby_version)
- add_current_platform unless Bundler.frozen_bundle?
+ add_platforms unless Bundler.frozen_bundle?
converge_path_sources_to_gemspec_sources
@path_changes = converge_paths
@@ -543,6 +543,12 @@ module Bundler
private
+ def add_platforms
+ (@dependencies.flat_map(&:expanded_platforms) + current_platforms).uniq.each do |platform|
+ add_platform(platform)
+ end
+ end
+
def current_platforms
current_platform = Bundler.local_platform
platforms = []