Sha256: e47cc3365cc026c9a07828f3cf7d8bd5009a2f1162b2964cfdd03e4869b58c1f
Contents?: true
Size: 1017 Bytes
Versions: 138
Compression:
Stored size: 1017 Bytes
Contents
namespace :trusty do namespace :extensions do namespace :multi_site do desc "Runs the migration of the Multi Site extension" task :migrate => :environment do require 'trusty_cms/extension_migrator' if ENV["VERSION"] MultiSiteExtension.migrator.migrate(ENV["VERSION"].to_i) else MultiSiteExtension.migrator.migrate end end desc "Copies public assets of the Multi Site to the instance public/ directory." task :update => :environment do is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) } puts "Copying assets from MultiSiteExtension" Dir[MultiSiteExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file| path = file.sub(MultiSiteExtension.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
138 entries across 138 versions & 2 rubygems