From 0cf67e05821ec4b81a78baa6da1908b46c54e17d Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 4 Jun 2010 01:05:00 +0100 Subject: [PATCH] Add rake tolk:import_assets for copying asstes to the app --- lib/tasks/tolk_tasks.rake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tasks/tolk_tasks.rake b/lib/tasks/tolk_tasks.rake index 994b7c4..3a44ec4 100644 --- a/lib/tasks/tolk_tasks.rake +++ b/lib/tasks/tolk_tasks.rake @@ -22,4 +22,13 @@ namespace :tolk do puts "#{bt.phrase.key} - #{bt.text}" end end + + desc "Copies required assets from tolk to application's public/ directory" + task :import_assets do + tolk_assets = File.expand_path(File.join(File.dirname(__FILE__), '../../public/tolk')) + command = "cp -R #{tolk_assets} #{Rails.root}/public/" + puts command + system(command) + end + end