Sha256: c2f19f0c943c95927a7af5cdce82e8936ca482efc2efbe4f1e01148ae169b7c7
Contents?: true
Size: 1.04 KB
Versions: 23
Compression:
Stored size: 1.04 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 'radiant/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 => :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) mkdir_p RAILS_ROOT + directory, :verbose => false cp file, RAILS_ROOT + path, :verbose => false end end end end end
Version data entries
23 entries across 23 versions & 3 rubygems