Sha256: b423752e7a45f2c49b63fcd153de8edec0952dbc77891b55450a1b4b893fbe80

Contents?: true

Size: 958 Bytes

Versions: 39

Compression:

Stored size: 958 Bytes

Contents

namespace :radiant do
  namespace :extensions do
    namespace :example do
      
      desc "Runs the migration of the Example extension"
      task :migrate => :environment do
        require 'radiant/extension_migrator'
        if ENV["VERSION"]
          ExampleExtension.migrator.migrate(ENV["VERSION"].to_i)
        else
          ExampleExtension.migrator.migrate
        end
      end
      
      desc "Copies public assets of the Example to the instance public/ directory."
      task :update => :environment do
        is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
        puts "Copying assets from ExampleExtension"
        Dir[ExampleExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
          path = file.sub(ExampleExtension.root, '')
          directory = File.dirname(path)
          mkdir_p RAILS_ROOT + directory
          cp file, RAILS_ROOT + path
        end
      end  
    end
  end
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
radiant-1.1.4 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.3 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.0 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.0.rc1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.0.beta spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.1.0.alpha spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.0 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.0.rc5 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.0.rc4 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.0.rc3 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.0.rc2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-1.0.0.rc1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-rails3-0.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.2.4 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.2.2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.2.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake