Sha256: a2251b8db85526b37af3719648b45c219d00c8ea608288035a5dc65e583a4359

Contents?: true

Size: 670 Bytes

Versions: 14

Compression:

Stored size: 670 Bytes

Contents

if ENV["RUBYOPT"] || defined? Gem
  ENV.delete "RUBYOPT"

  require "rbconfig"
  cmd = [RbConfig.ruby, "--disable-gems", "build.rb", *ARGV]

  exec(*cmd)
end

require "tmpdir"

lp = File.expand_path("../../../../lib", __dir__)
gem = ["ruby", "-I#{lp}", File.expand_path("../../../../bin/gem", __dir__)]
gemspec = File.expand_path("custom_name.gemspec", __dir__)

Dir.mktmpdir("custom_name") do |dir|
  built_gem = File.expand_path(File.join(dir, "custom_name.gem"))
  system(*gem, "build", gemspec, "--output", built_gem)
  system(*gem, "install", "--verbose", "--local", built_gem, *ARGV)
  system %q(ruby -rcustom_name -e "puts 'Result: ' + CustomName.say_hello")
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rubygems-update-3.3.27 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.4.5 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.4.4 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.4.3 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.4.2 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.4.1 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.4.0 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.26 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.25 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.24 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.23 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.22 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.21 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.20 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb