Sha256: ea911d347b71ffbb36cbec8a9882879d2ed83dcc540fbd922e3c3b035370ea17

Contents?: true

Size: 668 Bytes

Versions: 7

Compression:

Stored size: 668 Bytes

Contents

if ENV['RUBYOPT'] or 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

7 entries across 7 versions & 1 rubygems

Version Path
rubygems-update-3.3.17 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.16 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.15 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.14 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.13 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.12 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
rubygems-update-3.3.11 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb