Permalink
Browse files

add mkdir_p to handle if directory doesn't exist

  • Loading branch information...
1 parent af4861e commit 5325cb90472d971d2eba78cf044fe4efc3f240f0 @suoqin suoqin committed Aug 21, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/tasks/jasmine.rake
View
1 lib/tasks/jasmine.rake
@@ -2,6 +2,7 @@ require 'fileutils'
def copy_files
dist_dir = "#{Rails.root}/../../public/javascripts/"
+ FileUtils.mkdir_p(dist_dir)
['backbone.js', 'handlebars-runtime.js', 'underscore.js'].each do |file|
fullpath = "#{Rails.root}/../../app/assets/javascripts/#{file}"
FileUtils.copy_file fullpath, "#{dist_dir}/#{file}"

0 comments on commit 5325cb9

Please sign in to comment.