Module: Bundler::GemHelpers
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/bundler/gem_helpers.rb |
Constant Summary
-
GENERICS =
# File 'lib/bundler/gem_helpers.rb', line 6[ [Gem::Platform.new("java"), Gem::Platform.new("java")], [Gem::Platform.new("mswin32"), Gem::Platform.new("mswin32")], [Gem::Platform.new("mswin64"), Gem::Platform.new("mswin64")], [Gem::Platform.new("universal-mingw32"), Gem::Platform.new("universal-mingw32")], [Gem::Platform.new("x64-mingw32"), Gem::Platform.new("x64-mingw32")], [Gem::Platform.new("x86_64-mingw32"), Gem::Platform.new("x64-mingw32")], [Gem::Platform.new("mingw32"), Gem::Platform.new("x86-mingw32")] ].freeze
-
GENERIC_CACHE =
# File 'lib/bundler/gem_helpers.rb', line 5{}
Class Method Summary
- .generic(p) mod_func
- .generic_local_platform mod_func
- .platform_specificity_match(spec_platform, user_platform) mod_func
- .select_best_platform_match(specs, platform) mod_func
Class Method Details
.generic(p) (mod_func)
[ GitHub ].generic_local_platform (mod_func)
[ GitHub ]# File 'lib/bundler/gem_helpers.rb', line 28
def generic_local_platform generic(Bundler.local_platform) end
.platform_specificity_match(spec_platform, user_platform) (mod_func)
[ GitHub ]# File 'lib/bundler/gem_helpers.rb', line 33
def platform_specificity_match(spec_platform, user_platform) spec_platform = Gem::Platform.new(spec_platform) return PlatformMatch::EXACT_MATCH if spec_platform == user_platform return PlatformMatch::WORST_MATCH if spec_platform.nil? || spec_platform == Gem::Platform::RUBY || user_platform == Gem::Platform::RUBY PlatformMatch.new( PlatformMatch.os_match(spec_platform, user_platform), PlatformMatch.cpu_match(spec_platform, user_platform), PlatformMatch.platform_version_match(spec_platform, user_platform) ) end
.select_best_platform_match(specs, platform) (mod_func)
[ GitHub ]# File 'lib/bundler/gem_helpers.rb', line 46
def select_best_platform_match(specs, platform) specs.select {|spec| spec.match_platform(platform) }. min_by {|spec| platform_specificity_match(spec.platform, platform) } end