diff --git a/vendor/plugins/refinery/lib/tasks/refinery.rake b/vendor/plugins/refinery/lib/tasks/refinery.rake index 5df6560420..519a169095 100644 --- a/vendor/plugins/refinery/lib/tasks/refinery.rake +++ b/vendor/plugins/refinery/lib/tasks/refinery.rake @@ -111,10 +111,6 @@ namespace :refinery do FileUtils::rm_rf File.join(Rails.root, asset), :secure => true, :verbose => verbose # ensure the destination is clear. FileUtils::cp_r File.join(Refinery.root, asset), File.join(Rails.root, asset), :verbose => verbose # copy the new assets into the project. end - - if Rails.root.join('lib', 'refinery').directory? - FileUtils::rm_rf Rails.root.join('lib', 'refinery').cleanpath.to_s, :secure => true, :verbose => verbose - end # copy in any new migrations. FileUtils::cp Dir[Refinery.root.join("db", "migrate", "*.rb").cleanpath.to_s], Rails.root.join("db", "migrate").cleanpath.to_s, :verbose => verbose @@ -163,8 +159,10 @@ namespace :refinery do # replace the config.ru file FileUtils::cp Refinery.root.join('config.ru').cleanpath.to_s, Rails.root.join('config.ru').cleanpath.to_s, :verbose => verbose - # copy the lib/refinery directory in - FileUtils::cp_r Refinery.root.join("lib", "refinery").cleanpath.to_s, Rails.root.join("lib").cleanpath.to_s, :verbose => verbose + # destroy any lib/refinery directory that we don't need anymore. + if Rails.root.join('lib', 'refinery').directory? + FileUtils::rm_rf Rails.root.join('lib', 'refinery').cleanpath.to_s, :secure => true, :verbose => verbose + end # copy any initializers Dir[Refinery.root.join('config', 'initializers', '*.rb').to_s].each do |initializer|