Skip to content

Commit

Permalink
remove the unused generator tasks from the Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-burns committed Oct 24, 2008
1 parent 6808e27 commit 4b161f1
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,29 +31,4 @@ namespace :generator do
system "cp -R generators test/rails_root/vendor/plugins/clearance" system "cp -R generators test/rails_root/vendor/plugins/clearance"
system "cd test/rails_root; ./script/generate clearance" system "cd test/rails_root; ./script/generate clearance"
end end

task :templates do
app_files = FileList["test/rails_root/app/{controllers,models,views}/**/*"]
app_files.reject! { |file| file.include?("test/rails_root/app/views/layouts") }
test_files = FileList["test/rails_root/test/{functional,unit}/**/*"]
test_files += ["test/rails_root/test/factories.rb"]
files = test_files + app_files
templates_path = "generators/clearance/templates"
system `rm -rf #{templates_path}`
system `mkdir #{templates_path}`
["app", "app/controllers", "app/models", "app/views",
"test", "test/functional", "test/unit"].each do |directory|
system `mkdir #{templates_path}/#{directory}`
end
files.each do |file|
template = "generators/clearance/templates/#{file.gsub("test/rails_root/", "")}"
if File.directory?(file)
system `rm -rf #{template}`
system `mkdir #{template}`
else
system `rm #{template}` if File.exists?(template)
system `cp #{file} #{template}`
end
end
end
end end

0 comments on commit 4b161f1

Please sign in to comment.