Sha256: 9b03bfb3f7fe576f529f34f1708fcff9657300283616facf934c63058e5b9842

Contents?: true

Size: 1.01 KB

Versions: 13

Compression:

Stored size: 1.01 KB

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) }
        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

13 entries across 13 versions & 3 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.2.2 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.2.1 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.2 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.1.9 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.1.8 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.1.7 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.1.6 lib/generators/extension/templates/tasks.rake
radiantcms-couchrest_model-0.1.5 lib/generators/extension/templates/tasks.rake
radiant-0.8.2 lib/generators/extension/templates/tasks.rake
radiant-rc-0.9.0 lib/generators/extension/templates/tasks.rake
radiant-0.8.1 lib/generators/extension/templates/tasks.rake
radiant-0.8.0 lib/generators/extension/templates/tasks.rake