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-6.3.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-7.0.2 lib/generators/language_extension/templates/tasks.rake
trusty-cms-7.0.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-7.0.0 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.3 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.2.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.2.2.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.2.0 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.1.2 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.1.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.0.5 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.0.4 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.0.3 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.0.2 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.0.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.6.1 lib/generators/language_extension/templates/tasks.rake
trusty-cms-6.0.0 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.6.0 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.5.9 lib/generators/language_extension/templates/tasks.rake
trusty-cms-5.5.8 lib/generators/language_extension/templates/tasks.rake