adding a task for fat binary shim
This commit is contained in:
parent
50775163ed
commit
84dc998a3b
|
@ -9,3 +9,4 @@ mkmf.log
|
||||||
pkg/
|
pkg/
|
||||||
tmp
|
tmp
|
||||||
vendor
|
vendor
|
||||||
|
lib/mysql2/mysql2.rb
|
||||||
|
|
|
@ -30,3 +30,12 @@ Rake::ExtensionTask.new("mysql2", gemspec) do |ext|
|
||||||
CLEAN.include "#{ext.lib_dir}/*.#{RbConfig::CONFIG['DLEXT']}"
|
CLEAN.include "#{ext.lib_dir}/*.#{RbConfig::CONFIG['DLEXT']}"
|
||||||
end
|
end
|
||||||
Rake::Task[:spec].prerequisites << :compile
|
Rake::Task[:spec].prerequisites << :compile
|
||||||
|
|
||||||
|
file 'lib/mysql2/mysql2.rb' do
|
||||||
|
name = gemspec.name
|
||||||
|
File.open("lib/#{name}/#{name}.rb", 'wb') do |f|
|
||||||
|
f.write <<-eoruby
|
||||||
|
require "#{name}/\#{RUBY_VERSION.sub(/\\.\\d+$/, '')}/#{name}"
|
||||||
|
eoruby
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue