Skip to content

Commit

Permalink
replace copy logic with rm logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jul 23, 2010
1 parent 6653d05 commit f942e96
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions vendor/plugins/refinery/lib/tasks/refinery.rake
Expand Up @@ -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::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. FileUtils::cp_r File.join(Refinery.root, asset), File.join(Rails.root, asset), :verbose => verbose # copy the new assets into the project.
end 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. # 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 FileUtils::cp Dir[Refinery.root.join("db", "migrate", "*.rb").cleanpath.to_s], Rails.root.join("db", "migrate").cleanpath.to_s, :verbose => verbose
Expand Down Expand Up @@ -163,8 +159,10 @@ namespace :refinery do
# replace the config.ru file # 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 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 # destroy any lib/refinery directory that we don't need anymore.
FileUtils::cp_r Refinery.root.join("lib", "refinery").cleanpath.to_s, Rails.root.join("lib").cleanpath.to_s, :verbose => verbose 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 # copy any initializers
Dir[Refinery.root.join('config', 'initializers', '*.rb').to_s].each do |initializer| Dir[Refinery.root.join('config', 'initializers', '*.rb').to_s].each do |initializer|
Expand Down

0 comments on commit f942e96

Please sign in to comment.