Sha256: d2ba17ede3b287ee82648186059b6f6a69491bb319a7cfabc46d242cbbf2c338

Contents?: true

Size: 980 Bytes

Versions: 12

Compression:

Stored size: 980 Bytes

Contents

namespace :radiant do
  namespace :extensions do
    namespace :metry do
      
      desc "Runs the migration of the Metry extension"
      task :migrate => :environment do
        require 'radiant/extension_migrator'
        if ENV["VERSION"]
          MetryExtension.migrator.migrate(ENV["VERSION"].to_i)
        else
          MetryExtension.migrator.migrate
        end
      end
      
      desc "Copies public assets of the Metry to the instance public/ directory."
      task :update => :environment do
        is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
        puts "Copying assets from MetryExtension"
        Dir[MetryExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
          path = file.sub(MetryExtension.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
metry-2.0.4 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.0.5 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.1.0 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.1.1 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.0.0 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.0.1 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.0.2 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-2.0.3 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-1.0.0 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-1.0.1 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-1.1.0 radiant/extension/lib/tasks/metry_extension_tasks.rake
metry-1.2.0 radiant/extension/lib/tasks/metry_extension_tasks.rake