Sha256: b1c028f49d90e54c27af2d245013dda7860286803e082382bd09a939422db62a

Contents?: true

Size: 997 Bytes

Versions: 42

Compression:

Stored size: 997 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require "pathname"

def run(*cmd)
  return if system(*cmd)
  raise "Running `#{cmd.join(" ")}` failed"
end

version = ENV.delete("RGV")
rubygems_path = Pathname.new(__FILE__).join("../../tmp/rubygems").expand_path
unless rubygems_path.directory?
  rubygems_path.parent.mkpath unless rubygems_path.directory?
  run("git", "clone", "https://github.com/rubygems/rubygems.git", rubygems_path.to_s)
end
Dir.chdir(rubygems_path) do
  version = "v#{version}" if version =~ /\A\d/
  run("git", "checkout", version, "--quiet")
end if version

rubygems_lib = rubygems_path + "lib"
ENV["RUBYOPT"] = %(-I#{rubygems_lib} #{ENV["RUBYOPT"]})

if $0 != __FILE__
  ARGV.unshift($0)
elsif cmd = ARGV.first
  possible_dirs = [
    Pathname.new(__FILE__) + "..",
    Pathname.new(__FILE__) + "../../exe",
    rubygems_path + "bin",
  ]
  cmd = possible_dirs.map do |dir|
    dir.join(cmd).expand_path
  end.find(&:file?)
  ARGV[0] = cmd.to_s if cmd
end

exec(*ARGV)

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
bundler-1.15.4 bin/with_rubygems
bundler-1.15.3 bin/with_rubygems
bundler-1.15.2 bin/with_rubygems
bundler-1.15.1 bin/with_rubygems
bundler-1.15.0 bin/with_rubygems
bundler-1.15.0.pre.4 bin/with_rubygems
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/bundler-1.14.6/bin/with_rubygems
bundler-1.15.0.pre.3 bin/with_rubygems
bundler-1.15.0.pre.2 bin/with_rubygems
bundler-1.15.0.pre.1 bin/with_rubygems
bundler-1.14.6 bin/with_rubygems
bundler-1.14.5 bin/with_rubygems
bundler-1.14.4 bin/with_rubygems
bundler-1.14.3 bin/with_rubygems
bundler-1.14.2 bin/with_rubygems
bundler-1.14.1 bin/with_rubygems
bundler-1.14.0 bin/with_rubygems
bundler-1.14.0.pre.2 bin/with_rubygems
bundler-1.14.0.pre.1 bin/with_rubygems
bundler-1.13.7 bin/with_rubygems