Sha256: 15344d937965dbcf68896b0fbea8bb4c237c55835a6f9ff6fd7b7db44ffd99b6

Contents?: true

Size: 1020 Bytes

Versions: 12

Compression:

Stored size: 1020 Bytes

Contents

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

12 entries across 12 versions & 1 rubygems

Version Path
radiant-globalize2-extension-0.3.2 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.3.1 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.3.0 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.8 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.7 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.6 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.5 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.4 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.3 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.2 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.1 lib/tasks/globalize2_extension_tasks.rake
radiant-globalize2-extension-0.2.0 lib/tasks/globalize2_extension_tasks.rake