Module: Zerg::Support::Gems

Defined in:
ext/extconf.rb

Class Method Summary collapse

Class Method Details

.emulate_extension_install(extension_name) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'ext/extconf.rb', line 16

def self.emulate_extension_install(extension_name)
  File.open('Makefile', 'w') { |f| f.write "all:\n\ninstall:\n\n" }
  File.open('make', 'w') do |f|
    f.write '#!/bin/sh'
    f.chmod f.stat.mode | 0111
  end
  File.open(extension_name + '.so', 'w') {}
  File.open(extension_name + '.dll', 'w') {}
  File.open('nmake.bat', 'w') { |f| }
end