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

Version Path
trusty-cms-5.5.7 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.5.6 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.5.5.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.5.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.5 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.4.4 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.4.3 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.4.2 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.4.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.4.0 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.9 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.8 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.7 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.6 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.5 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.4 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.3 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.2 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.3 lib/generators/language_extension/templates/tasks.rake