tasks/db.rake in pact_broker-0.0.1 vs tasks/db.rake in pact_broker-0.0.2
- old
+ new
@@ -13,9 +13,10 @@
desc 'drop DB'
task :drop do
require 'yaml'
puts "Removing database #{db_file}"
FileUtils.rm_f db_file
+ FileUtils.mkdir_p File.dirname(db_file)
end
def db_file
@@db_file ||= YAML.load(ERB.new(File.read(File.join('./config', 'database.yml'))).result)[RACK_ENV]["database"]
end
\ No newline at end of file