diff options
author | David RodrÃguez <[email protected]> | 2019-06-19 15:29:02 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2019-08-03 09:29:57 +0900 |
commit | 3af9d8bb671cfdc474110af3f2db24e36954d38d (patch) | |
tree | 77835084b1f9d55299d2a98823c8374bde78ff8d /lib | |
parent | ead2dc0ec998ef0453f99e24971a1d598f7522fe (diff) |
[bundler/bundler] Extract `current_platforms`
https://github.com/bundler/bundler/commit/9f07207d64
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/definition.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 98fa2c1ef7..33e7b16aeb 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -519,9 +519,7 @@ module Bundler end def add_current_platform - current_platform = Bundler.local_platform - add_platform(current_platform) if Bundler.feature_flag.specific_platform? - add_platform(generic(current_platform)) + current_platforms.each {|platform| add_platform(platform) } end def find_resolved_spec(current_spec) @@ -545,6 +543,14 @@ module Bundler private + def current_platforms + current_platform = Bundler.local_platform + platforms = [] + platforms << current_platform if Bundler.feature_flag.specific_platform? + platforms << generic(current_platform) + platforms + end + def change_reason if unlocking? unlock_reason = @unlock.reject {|_k, v| Array(v).empty? }.map do |k, v| |