Sha256: d55722523eaeb47ffc83da186303174fdd3815de80ef82336133c9454cddd430

Contents?: true

Size: 658 Bytes

Versions: 25

Compression:

Stored size: 658 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

25 entries across 25 versions & 3 rubygems

Version Path
rubygems-update-2.6.14 bundler/lib/bundler/match_platform.rb
rubygems-update-2.6.13 bundler/lib/bundler/match_platform.rb
bundler-1.15.4 lib/bundler/match_platform.rb
bundler-1.15.3 lib/bundler/match_platform.rb
bundler-1.15.2 lib/bundler/match_platform.rb
bundler-1.15.1 lib/bundler/match_platform.rb
bundler-1.15.0 lib/bundler/match_platform.rb
bundler-1.15.0.pre.4 lib/bundler/match_platform.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/bundler-1.14.6/lib/bundler/match_platform.rb
bundler-1.15.0.pre.3 lib/bundler/match_platform.rb
rubygems-update-2.6.12 bundler/lib/bundler/match_platform.rb
bundler-1.15.0.pre.2 lib/bundler/match_platform.rb
bundler-1.15.0.pre.1 lib/bundler/match_platform.rb
rubygems-update-2.6.11 bundler/lib/bundler/match_platform.rb
bundler-1.14.6 lib/bundler/match_platform.rb
bundler-1.14.5 lib/bundler/match_platform.rb
bundler-1.14.4 lib/bundler/match_platform.rb
bundler-1.14.3 lib/bundler/match_platform.rb
rubygems-update-2.6.10 bundler/lib/bundler/match_platform.rb
bundler-1.14.2 lib/bundler/match_platform.rb