Sha256: b738b9340b0516983b7efe035b9e4159d4b59e543460ef9a35f944492147bd64
Contents?: true
Size: 653 Bytes
Versions: 38
Compression:
Stored size: 653 Bytes
Contents
namespace :spree do namespace :extensions do namespace :promotions do desc "Copies public assets of the Promotions to the instance public/ directory." task :update => :environment do is_svn_git_or_dir = proc {|path| path =~ /\.svn/ || path =~ /\.git/ || File.directory?(path) } Dir[PromotionsExtension.root + "/public/**/*"].reject(&is_svn_git_or_dir).each do |file| path = file.sub(PromotionsExtension.root, '') directory = File.dirname(path) puts "Copying #{path}..." mkdir_p Rails.root + directory cp file, Rails.root + path end end end end end
Version data entries
38 entries across 38 versions & 6 rubygems