Sha256: e7774f5b173cb2d33e0cc11966178ef2eedd3a6674cf5b11f60a1d596724d9de

Contents?: true

Size: 798 Bytes

Versions: 14

Compression:

Stored size: 798 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 all_platforms
      [rb, java, linux, mswin]
    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

14 entries across 14 versions & 3 rubygems

Version Path
honkster-bundler-1.1.pre spec/support/platforms.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.3.0 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb
bundler-1.0.3 spec/support/platforms.rb
bundler-1.0.2 spec/support/platforms.rb