Sha256: a4c7418455e74e2ffcf60dd35a42d97536d5bc9f4f2e8afa6f6879b224f5cb70

Contents?: true

Size: 659 Bytes

Versions: 46

Compression:

Stored size: 659 Bytes

Contents

# frozen_string_literal: true

require "bundler/gem_helpers"

module Bundler
  module MatchPlatform
    include GemHelpers

    def match_platform(p)
      MatchPlatform.platforms_match?(platform, p)
    end

    def self.platforms_match?(gemspec_platform, local_platform)
      return true if gemspec_platform.nil?
      return true if Gem::Platform::RUBY == gemspec_platform
      return true if local_platform == gemspec_platform
      gemspec_platform = Gem::Platform.new(gemspec_platform)
      return true if GemHelpers.generic(gemspec_platform) === local_platform
      return true if gemspec_platform === local_platform

      false
    end
  end
end

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
rubygems-update-3.0.9 bundler/lib/bundler/match_platform.rb
rubygems-update-2.7.11 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.8 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.7 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.6 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.5 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.4 bundler/lib/bundler/match_platform.rb
rubygems-update-2.7.10 bundler/lib/bundler/match_platform.rb
bundler-2.0.2 lib/bundler/match_platform.rb
rubygems-update-2.7.9 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.3 bundler/lib/bundler/match_platform.rb
bundler-2.0.1 lib/bundler/match_platform.rb
bundler-2.0.0 lib/bundler/match_platform.rb
rubygems-update-3.0.2 bundler/lib/bundler/match_platform.rb
bundler-2.0.0.pre.3 lib/bundler/match_platform.rb
bundler-1.17.3 lib/bundler/match_platform.rb
rubygems-update-3.0.1 bundler/lib/bundler/match_platform.rb
rubygems-update-3.0.0 bundler/lib/bundler/match_platform.rb
bundler-1.17.2 lib/bundler/match_platform.rb
bundler-2.0.0.pre.2 lib/bundler/match_platform.rb