Sha256: 96d853cac1c31169dc5fcd3bf92d843c5c2e43cec5b70c57783e8cb6758d5ceb

Contents?: true

Size: 928 Bytes

Versions: 3

Compression:

Stored size: 928 Bytes

Contents

namespace :radiant do
  namespace :extensions do
    namespace :vapor do
      
      desc "Runs the migration of the Vapor extension"
      task :migrate => :environment do
        require 'radiant/extension_migrator'
        if ENV["VERSION"]
          VaporExtension.migrator.migrate(ENV["VERSION"].to_i)
        else
          VaporExtension.migrator.migrate
        end
      end
      
      desc "Copies public assets of the Vapor to the instance public/ directory."
      task :update => :environment do
        is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
        Dir[VaporExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
          path = file.sub(VaporExtension.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

3 entries across 3 versions & 1 rubygems

Version Path
radiant-vapor-extension-2.1.2 lib/tasks/vapor_extension_tasks.rake
radiant-vapor-extension-2.1.1 lib/tasks/vapor_extension_tasks.rake
radiant-vapor-extension-2.1.0 lib/tasks/vapor_extension_tasks.rake