Sha256: 9c8579543caab6c912ce3408cbd025c8897c270740d7b2d9be20adac64689073
Contents?: true
Size: 1.03 KB
Versions: 173
Compression:
Stored size: 1.03 KB
Contents
namespace :radiant do namespace :extensions do namespace :<%= file_name %> do desc "Runs the migration of the <%= localization_name %> language pack" task :migrate => :environment do require 'trusty_cms/extension_migrator' if ENV["VERSION"] <%= class_name %>.migrator.migrate(ENV["VERSION"].to_i) else <%= class_name %>.migrator.migrate end end desc "Copies public assets of the <%= localization_name %> language pack to the instance public/ directory." task :update => :environments 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) mkdir_p Rails.root + directory, :verbose => false cp file, Rails.root + path, :verbose => false end end end end end
Version data entries
173 entries across 173 versions & 1 rubygems