mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update bundled bundler to 1.16.0.
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae49dbd392
commit
be7b592912
1025 changed files with 13902 additions and 3180 deletions
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "rubygems/dependency"
|
||||
require "bundler/shared_helpers"
|
||||
require "bundler/rubygems_ext"
|
||||
|
@ -90,16 +91,14 @@ module Bundler
|
|||
@autorequire = Array(options["require"] || []) if options.key?("require")
|
||||
end
|
||||
|
||||
# Returns the platforms this dependency is valid for, in the same order as
|
||||
# passed in the `valid_platforms` parameter
|
||||
def gem_platforms(valid_platforms)
|
||||
return valid_platforms if @platforms.empty?
|
||||
|
||||
platforms = []
|
||||
@platforms.each do |p|
|
||||
platform = PLATFORM_MAP[p]
|
||||
next unless valid_platforms.include?(platform)
|
||||
platforms |= [platform]
|
||||
end
|
||||
platforms
|
||||
@gem_platforms ||= @platforms.map {|pl| PLATFORM_MAP[pl] }.compact.uniq
|
||||
|
||||
valid_platforms & @gem_platforms
|
||||
end
|
||||
|
||||
def should_include?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue