Sha256: fea40c405378ebd03241db51377bcd8c1519df7fa01195de9d21d6715869470f

Contents?: true

Size: 660 Bytes

Versions: 129

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

require_relative "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

129 entries across 129 versions & 4 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/bundler-2.3.5/lib/bundler/match_platform.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/bundler-2.3.5/lib/bundler/match_platform.rb
rubygems-update-3.2.34 bundler/lib/bundler/match_platform.rb
bundler-2.2.34 lib/bundler/match_platform.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/bundler-2.3.7/lib/bundler/match_platform.rb
rubygems-update-3.3.16 bundler/lib/bundler/match_platform.rb
bundler-2.3.16 lib/bundler/match_platform.rb
rubygems-update-3.3.15 bundler/lib/bundler/match_platform.rb
bundler-2.3.15 lib/bundler/match_platform.rb
rubygems-update-3.3.14 bundler/lib/bundler/match_platform.rb
bundler-2.3.14 lib/bundler/match_platform.rb
rubygems-update-3.3.13 bundler/lib/bundler/match_platform.rb
bundler-2.3.13 lib/bundler/match_platform.rb
rubygems-update-3.3.12 bundler/lib/bundler/match_platform.rb
bundler-2.3.12 lib/bundler/match_platform.rb
rubygems-update-3.3.11 bundler/lib/bundler/match_platform.rb
bundler-2.3.11 lib/bundler/match_platform.rb
rubygems-update-3.3.10 bundler/lib/bundler/match_platform.rb
bundler-2.3.10 lib/bundler/match_platform.rb
rubygems-update-3.3.9 bundler/lib/bundler/match_platform.rb