From bc70e1b093ea938d71aeba9216931b74b70ceac7 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 16 Sep 2011 10:17:22 -0400 Subject: [PATCH] correct rake task to not move directories, only move files --- lib/tasks/flutie.rake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tasks/flutie.rake b/lib/tasks/flutie.rake index 8b73d46..b5dd62e 100644 --- a/lib/tasks/flutie.rake +++ b/lib/tasks/flutie.rake @@ -3,7 +3,7 @@ require 'fileutils' def copy_files(source_path, destination_path, directory) source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path) FileUtils.mkdir_p(destination, :verbose => true) unless File.exist?(destination) - FileUtils.cp_r(source, destination, :verbose => true) + FileUtils.cp_r(Dir.glob(source), destination, :verbose => true) end directory = File.dirname(__FILE__) @@ -15,11 +15,11 @@ namespace :flutie do # No copy is needed when asset pipelining is enabled puts "Flutie stylesheets are provided via asset pipelining." else - # Copy the flutie stylesheets into rails_root/public/flutie - copy_files("../../public/stylesheets", "/public/flutie", directory) + # Copy the flutie stylesheets into rails_root/public/stylesheets + copy_files("../../public/stylesheets/*", "/public/stylesheets", directory) - # Copy the flutie sass stylesheets into rails_root/public/sass/flutie - copy_files("../../app/assets/stylesheets", "/public/sass/flutie", directory) + # Copy the flutie sass stylesheets into rails_root/public/stylesheets/sass/flutie + copy_files("../../app/assets/stylesheets/*", "/public/stylesheets/sass/flutie", directory) end end end