Sha256: 7371799e827d29bb6ed7ed27313efb6d0cca3b1ace6d4b4a5a4ff040d9c24950

Contents?: true

Size: 877 Bytes

Versions: 44

Compression:

Stored size: 877 Bytes

Contents

module Spec
  module Platforms
    include Bundler::GemHelpers

    def rb
      Gem::Platform::RUBY
    end

    def mac
      Gem::Platform.new('x86-darwin-10')
    end

    def java
      Gem::Platform.new([nil, "java", nil])
    end

    def linux
      Gem::Platform.new(['x86', 'linux', nil])
    end

    def mswin
      Gem::Platform.new(['x86', 'mswin32', nil])
    end

    def mingw
      Gem::Platform.new(['x86', 'mingw32', nil])
    end

    def all_platforms
      [rb, java, linux, mswin, mingw]
    end

    def local
      generic(Gem::Platform.local)
    end

    def not_local
      all_platforms.find { |p| p != generic(Gem::Platform.local) }
    end

    def local_tag
      if RUBY_PLATFORM == "java"
        :jruby
      else
        :ruby
      end
    end

    def not_local_tag
      [:ruby, :jruby].find { |tag| tag != local_tag }
    end
  end
end

Version data entries

44 entries across 44 versions & 4 rubygems

Version Path
bundler-1.1.5 spec/support/platforms.rb
bundler-1.1.4 spec/support/platforms.rb
bundler-1.1.3 spec/support/platforms.rb
bundler-1.1.2 spec/support/platforms.rb
bundler-1.1.1 spec/support/platforms.rb
bundler-1.1.0 spec/support/platforms.rb
bundler-1.1.rc.8 spec/support/platforms.rb
bundler-1.0.22 spec/support/platforms.rb
bundler-1.1.rc.7 spec/support/platforms.rb
bundler-1.1.rc.6 spec/support/platforms.rb
bundler-1.1.rc.5 spec/support/platforms.rb
bundler-1.1.rc.3 spec/support/platforms.rb
bundler-1.1.rc.2 spec/support/platforms.rb
mpapis-bundler-1.0.21.1 spec/support/platforms.rb
mpapis-bundler-1.0.21 spec/support/platforms.rb
bundler-maglev--1.0.21 spec/support/platforms.rb
bundler-1.1.rc spec/support/platforms.rb
bundler-1.0.21 spec/support/platforms.rb
bundler-1.0.21.rc spec/support/platforms.rb
bundler-1.0.20 spec/support/platforms.rb