Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Commit

Permalink
Task for making a plugin out of conductor
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Nov 24, 2008
1 parent 950a04f commit 1d7bf44
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pluginization/init.rb
@@ -0,0 +1,2 @@
# Add routes
# Add view paths?
1 change: 1 addition & 0 deletions lib/pluginization/install.rb
@@ -0,0 +1 @@
# Install CSS and JS?
1 change: 1 addition & 0 deletions lib/pluginization/uninstall.rb
@@ -0,0 +1 @@
# Remove CSS and JS?
17 changes: 17 additions & 0 deletions lib/tasks/pluginize.rake
@@ -0,0 +1,17 @@
desc 'Turn conductor into a plugin.'
task :pluginize => :environment do
mkdir_p('pkg/conductor')

cp_r 'app/controllers/conductor', 'pkg/conductor/lib'
cp_r 'app/views/conductor', 'pkg/conductor/lib/views'

FileList['app/helpers/conductor/*'].each do |helper|
cp_r helper, "pkg/conductor/lib/conductor/#{File.basename(helper)}"
end
end

namespace :pluginize do
task :clobber do
FileUtils.rm_r('pkg')
end
end

0 comments on commit 1d7bf44

Please sign in to comment.