Permalink
Browse files

updated rake tasks. removed swp

  • Loading branch information...
1 parent 8acd193 commit 97c4cc4780dba58ae14e5ae843688eaa70ec1855 @antono committed Jul 29, 2009
Showing with 9 additions and 15 deletions.
  1. BIN tasks/.markitup_rails_tasks.rake.swp
  2. +9 −15 tasks/markitup_rails_tasks.rake
Binary file not shown.
@@ -1,32 +1,26 @@
namespace :markitup do
- PLUGIN_ROOT = File.dirname(__FILE__) + '/..'
-
- STYLESHEETS = Dir[PLUGIN_ROOT + '/assets/stylesheets/*'].select { |e| File.file?(e) }
- JAVASCRIPTS = Dir[PLUGIN_ROOT + '/assets/javascripts/*'].select { |e| File.file?(e) }
+ src = File.join(File.dirname(__FILE__), 'assets/*')
+ dst = File.join(RAILS_ROOT, "public/plugin_assets/markitup/")
desc "Copies markitups assets (css+js+images) to public dir"
task :install do
- dest = File.join(RAILS_ROOT, 'public/plugin_assets/markitup')
- FileUtils.mkdir(dest)
- FileUtils.cp .constantize, dest, :verbose => true
+ FileUtils.mkdir_p dst
+ FileUtils.cp_r(src, dst, :verbose => true)
puts "\n==> Markitup assets installed!"
end
desc "Updates syntax highlighter assets (css+js) in public dir"
task :update do
- uninstall
- install
- puts "\n==> Syntax Highlighter assets updated!"
+ Rake::Task["markitup:uninstall"].invoke
+ Rake::Task["markitup:install"].invoke
+ puts "\n==> Markitup assets updated!"
end
desc "Deletes syntax highlighter assets (css+js) from public dir"
task :uninstall do
- %w{javascripts stylesheets}.each do |atype|
- dest = File.join(RAILS_ROOT, 'public', atype, 'sh2')
- FileUtils.rm_rf(dest)
- end
- puts "\n==> Syntax Highlighter assets uninstalled!"
+ FileUtils.rm_rf dst, :verbose => true
+ puts "\n==> Markitup assets uninstalled!"
end
end

0 comments on commit 97c4cc4

Please sign in to comment.