Skip to content

Commit

Permalink
Less verbose extension:update task
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh French committed Aug 18, 2008
1 parent ae779a7 commit e60e553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/extension/templates/tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ namespace :radiant do
desc "Copies public assets of the <%= extension_name %> to the instance public/ directory."
task :update => :environment do
is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
puts "Copying assets from <%= class_name %>"
Dir[<%= class_name %>.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
path = file.sub(<%= class_name %>.root, '')
directory = File.dirname(path)
puts "Copying #{path}..."
mkdir_p RAILS_ROOT + directory
cp file, RAILS_ROOT + path
end
Expand Down

0 comments on commit e60e553

Please sign in to comment.