Sha256: 7cc46e0563edd1d6efc9d8aa03088e492c1f7cc71f445a4b31cf3ec7c55f250f
Contents?: true
Size: 1 KB
Versions: 13
Compression:
Stored size: 1 KB
Contents
namespace :radiant do namespace :extensions do namespace :tags do desc "Runs the migration and update tasks of the Tags extension" task :install => [:environment, :migrate, :update] desc "Runs the migration of the Tags extension" task :migrate => :environment do require 'radiant/extension_migrator' if ENV["VERSION"] TagsExtension.migrator.migrate(ENV["VERSION"].to_i) else TagsExtension.migrator.migrate end end desc "Copy needed files to public dir" task :update => :environment do is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) } Dir[TagsExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file| path = file.sub(TagsExtension.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
13 entries across 13 versions & 2 rubygems