Commit a886e96f by Andrew Haines

Write path.rb to Ruby arch dir so that it can be cached by Bundler

parent ffcff44b
...@@ -23,7 +23,11 @@ end ...@@ -23,7 +23,11 @@ end
desc "Build a file pointing at the database" desc "Build a file pointing at the database"
task :default do task :default do
mime_database_path = locate_mime_database mime_database_path = locate_mime_database
open("../../lib/mimemagic/path.rb", "w") do |f|
target_dir = "#{ENV.fetch("RUBYARCHDIR")}/mimemagic"
mkdir_p target_dir
open("#{target_dir}/path.rb", "w") do |f|
f.print(%Q{ f.print(%Q{
class MimeMagic class MimeMagic
DATABASE_PATH="#{mime_database_path}" DATABASE_PATH="#{mime_database_path}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment