Permalink
Browse files

add rake task to update plugins

  • Loading branch information...
1 parent 4562cb6 commit 29971b55ce90d27955ae2804b448c53fc4aff04b @ddollar ddollar committed May 24, 2011
Showing with 20 additions and 0 deletions.
  1. +20 −0 Rakefile
View
@@ -0,0 +1,20 @@
+require "fileutils"
+
+def plugin_base
+ File.expand_path("../vendor/plugins", __FILE__)
+end
+
+def vendor_plugin(git_url)
+ name = File.basename(git_url, File.extname(git_url))
+ Dir.chdir(plugin_base) do
+ FileUtils.rm_rf(name)
+ sh "git clone #{git_url} #{name}"
+ FileUtils.rm_rf("#{name}/.git")
+ end
+end
+
+desc "update plugins"
+task "plugins:update" do
+ vendor_plugin "http://github.com/ddollar/rails_log_stdout.git"
+ vendor_plugin "http://github.com/pedro/rails3_serve_static_assets.git"
+end

0 comments on commit 29971b5

Please sign in to comment.