Permalink
Browse files

Adding app_helpers:reinstall

  • Loading branch information...
1 parent 4b09f5c commit 44044bfa421ad3f977f7d1458fa5b862bd325215 @winton committed Jan 30, 2009
Showing with 18 additions and 3 deletions.
  1. +13 −2 tasks/app_helpers.rake
  2. +5 −1 tasks/git.rake
View
@@ -1,5 +1,8 @@
+install_tasks = [ 'app_helpers:db', 'app_helpers:git', 'app_helpers:views', 'app_helpers:widgets' ]
+remove_tasks = [ 'app_helpers:db:remove', 'app_helpers:git:plugins:remove', 'app_helpers:git:remove', 'app_helpers:views:remove', 'app_helpers:widgets:remove' ]
+
desc 'Copy database config, git assets, views, widget assets'
-task :app_helpers => [ 'app_helpers:db', 'app_helpers:git', 'app_helpers:views', 'app_helpers:widgets' ]
+task :app_helpers => install_tasks
namespace :plugins do
desc 'Adds plugins defined in config/plugins.rb'
@@ -15,7 +18,15 @@ end
namespace :app_helpers do
desc 'Removes files created by rake app_helpers'
- task :remove => [ 'app_helpers:db:remove', 'app_helpers:git:plugins:remove', 'app_helpers:git:remove', 'app_helpers:views:remove', 'app_helpers:widgets:remove' ]
+ task :remove => remove_tasks
+
+ desc 'Reinstall files created by rake app_helpers'
+ task :reinstall do
+ `rm -Rf vendor/plugins/app_helpers`
+ `git clone git@github.com:winton/app_helpers.git vendor/plugins/app_helpers`
+ Rake::Task['app_helpers:remove'].invoke
+ Rake::Task['app_helpers'].invoke
+ end
def app_helper_resource(type, to, reverse=false, overwrite=true)
from = "#{File.dirname(__FILE__)}/../resources/#{type}"
View
@@ -20,7 +20,7 @@ namespace :app_helpers do
desc 'Removes files from rake app_helpers:git'
task :remove do
`rm .gitignore`
- `rm config/plugins.rb`
+ #`rm config/plugins.rb`
end
namespace :plugins do
@@ -86,6 +86,10 @@ namespace :app_helpers do
end
def remove_plugin(plugin)
+ if plugin[:repo] && plugin[:repo].include?('app_helpers')
+ puts "Skipping #{plugin[:repo]}"
+ return
+ end
path = install_path plugin
return path unless File.exists?(path)
puts "Removing #{path}"

0 comments on commit 44044bf

Please sign in to comment.