Sha256: 4fe56f4ab6cc5dffee3c9bdc1ba8efd478ac35c76077f4ed63715e4804ffed54

Contents?: true

Size: 983 Bytes

Versions: 8

Compression:

Stored size: 983 Bytes

Contents

namespace :radiant do
  namespace :extensions do
    namespace :<%= file_name %> do
      
      desc "Runs the migration of the <%= extension_name %> extension"
      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 <%= extension_name %> to the instance public/ directory."
      task :update => :environment do
        is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
        Dir[<%= class_name %>.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
          path = file.sub(<%= class_name %>.root, '')
          directory = File.dirname(path)
          puts "Copying #{path}..."
          mkdir_p RAILS_ROOT + directory
          cp file, RAILS_ROOT + path
        end
      end  
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
radiant-0.6.3 lib/generators/extension/templates/tasks.rake
radiant-0.6.4 lib/generators/extension/templates/tasks.rake
radiant-0.6.5.1 lib/generators/extension/templates/tasks.rake
radiant-0.6.5 lib/generators/extension/templates/tasks.rake
radiant-0.6.6 lib/generators/extension/templates/tasks.rake
radiant-0.6.7 lib/generators/extension/templates/tasks.rake
radiant-0.6.9 lib/generators/extension/templates/tasks.rake
radiant-0.6.8 lib/generators/extension/templates/tasks.rake