stevefolder/vendor/bundle/ruby/3.1.0/gems/mimemagic-0.4.3/Rakefile

23 lines
533 B
Ruby
Raw Normal View History

2022-02-04 18:48:09 -05:00
require 'rake/testtask'
require 'rake/clean'
namespace :ext do
load 'ext/mimemagic/Rakefile'
end
CLOBBER.include("lib/mimemagic/path.rb")
task :default => %w(test)
desc 'Run tests with minitest'
Rake::TestTask.new("test" => "ext:default") do |t|
t.libs << 'test'
t.pattern = 'test/*_test.rb'
end
desc 'Generate mime tables'
task :tables => 'lib/mimemagic/tables.rb'
file 'lib/mimemagic/tables.rb' => FileList['script/freedesktop.org.xml'] do |f|
sh "script/generate-mime.rb #{f.prerequisites.join(' ')} > #{f.name}"
end