module Gem
def glob_files_in_dir(glob, base_path)
def glob_files_in_dir(glob, base_path) Dir.glob(glob, :base => base_path).map! {|f| File.expand_path(f, base_path) } end
def match_gem?(platform, gem_name)
def match_gem?(platform, gem_name) match_platforms?(platform, Gem.platforms) end
def match_platforms?(platform, platforms)
def match_platforms?(platform, platforms) platforms.any? do |local_platform| platform.nil? || local_platform == platform || (local_platform != Gem::Platform::RUBY && platform =~ local_platform) end end
def match_spec?(spec)
def match_spec?(spec) match_gem?(spec.platform, spec.name) end