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
radiantcms-couchrest_model-0.1.9 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.8 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.7 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.6 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.5 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.4 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.3 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiantcms-couchrest_model-0.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.7.2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.9.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.8.2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.9.0.rc2 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-rc-0.9.0 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.8.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.7.0 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.7.1 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake
radiant-0.8.0 spec/fixtures/example_extension/lib/tasks/example_extension_tasks.rake