Permalink
Browse files

Dev: remove wrap_parameters initializer if present

  • Loading branch information...
1 parent 162edd9 commit 2a74f08a0e851df54e6d2ee6ccb0d1612b21ed87 @dchelimsky dchelimsky committed May 7, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 Rakefile
View
11 Rakefile
@@ -90,11 +90,16 @@ namespace :generate do
Dir.chdir("./tmp/example_app") do
sh "rm -rf test"
sh "ln -s #{bindir}"
- application_file = File.read("config/application.rb")
- sh "rm config/application.rb"
- File.open("config/application.rb","w") do |f|
+ application_filename = "config/application.rb"
+ application_file = File.read(application_filename)
+ sh "rm #{application_filename}"
+ puts "rewrite #{application_filename} with config.assets.enabled = false"
+ File.open(application_filename, "w") do |f|
f.write application_file.gsub("config.assets.enabled = true","config.assets.enabled = false")
end
+ "config/initializers/wrap_parameters.rb".tap do |f|
+ sh "rm #{f}" if test ?f, f
+ end
end
end
end

0 comments on commit 2a74f08

Please sign in to comment.