Sha256: 3665debd32fe114a3a07528e81f58d26c7fc0aa194c293faf1abff38e704e559

Contents?: true

Size: 583 Bytes

Versions: 62

Compression:

Stored size: 583 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 gemspec_platform == Gem::Platform::RUBY
      return true if local_platform == gemspec_platform
      gemspec_platform = Gem::Platform.new(gemspec_platform)
      return true if gemspec_platform === local_platform

      false
    end
  end
end

Version data entries

62 entries across 62 versions & 4 rubygems

Version Path
rubygems-update-3.6.6 bundler/lib/bundler/match_platform.rb
bundler-2.6.6 lib/bundler/match_platform.rb
rubygems-update-3.6.5 bundler/lib/bundler/match_platform.rb
bundler-2.6.5 lib/bundler/match_platform.rb
rubygems-update-3.6.4 bundler/lib/bundler/match_platform.rb
bundler-2.6.4 lib/bundler/match_platform.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/bundler-2.5.21/lib/bundler/match_platform.rb
rubygems-update-3.6.3 bundler/lib/bundler/match_platform.rb
bundler-2.6.3 lib/bundler/match_platform.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/bundler-2.5.5/lib/bundler/match_platform.rb
rubygems-update-3.6.2 bundler/lib/bundler/match_platform.rb
bundler-2.6.2 lib/bundler/match_platform.rb
rubygems-update-3.6.1 bundler/lib/bundler/match_platform.rb
bundler-2.6.1 lib/bundler/match_platform.rb
rubygems-update-3.6.0 bundler/lib/bundler/match_platform.rb
bundler-2.6.0 lib/bundler/match_platform.rb
rubygems-update-3.5.23 bundler/lib/bundler/match_platform.rb
bundler-2.5.23 lib/bundler/match_platform.rb
rubygems-update-3.5.22 bundler/lib/bundler/match_platform.rb
bundler-2.5.22 lib/bundler/match_platform.rb