summaryrefslogtreecommitdiff
path: root/spec/support/hax.rb
blob: a47376853105bc384a6c1ef02d0e9b6e0c723992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'rubygems'

class Gem::Platform
  @local = new(ENV['BUNDLER_SPEC_PLATFORM']) if ENV['BUNDLER_SPEC_PLATFORM']
end

if ENV['BUNDLER_SPEC_VERSION']
  module Bundler
    VERSION = ENV['BUNDLER_SPEC_VERSION'].dup
  end
end

class Object
  if ENV['BUNDLER_SPEC_RUBY_ENGINE']
    remove_const :RUBY_ENGINE if defined?(RUBY_ENGINE)
    RUBY_ENGINE = ENV['BUNDLER_SPEC_RUBY_ENGINE']

    if RUBY_ENGINE == "jruby"
      JRUBY_VERSION = ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"]
    end
  end
end