diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-06-19 15:29:02 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-10 12:08:13 +0200 |
commit | 9f07207d64c7044c35774f852f56aedadf863e22 (patch) | |
tree | 04d104bb9980c2f9fbd6b7beb63f10b59987fe58 /lib | |
parent | c17f24747a3e5254a57ef360ac8300d0244fd421 (diff) | |
download | bundler-9f07207d64c7044c35774f852f56aedadf863e22.tar.gz |
Extract `current_platforms`
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| |