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

Version Path
trusty-cms-6.3.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-7.0.2 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-7.0.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-7.0.0 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.3 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.2.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.2.2.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.2.0 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.1.2 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.1.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.0.5 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.0.4 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.0.3 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.0.2 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.0.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-5.6.1 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-6.0.0 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-5.6.0 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-5.5.9 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake
trusty-cms-5.5.8 vendor/extensions/multi-site-extension/lib/tasks/multi_site_extension_tasks.rake