Sha256: fe337ddd983c9da479d3d97ec7d8e9c9471a54411b5525cdc2b49ec6e4c6f530

Contents?: true

Size: 786 Bytes

Versions: 41

Compression:

Stored size: 786 Bytes

Contents

namespace :replicator do
  
  desc 'Copy a fedora object of the given pid.'
  task :copy_object => :environment do 
    if ENV['PID']
      replicator = Solrizer::Replicator.new
      replicator.replicate_object(ENV['PID'])
    else
      puts "You must provide a pid using the format 'replicator::copy_object PID=sample:pid'."
    end
  end
  
  desc 'Copy all objects in the repository.'
  task :copy_objects => :environment do
  
    if ENV['REPLICATOR_LIST']
      REPLICATOR_LIST = ENV['REPLICATOR_LIST']
    end
  
    replicator = Solrizer::Replicator.new
    puts "Source URL: #{ActiveFedora.fedora_config[:url]}"
    puts "Destination URL: #{replicator.configs["destination"]["fedora"]["url"]}"
    replicator.replicate_objects
    puts "Replicator task complete."
  end
  
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
hydra-head-4.1.3 tasks/replicator.rake
hydra-head-4.1.2 tasks/replicator.rake
hydra-head-4.1.1 tasks/replicator.rake
hydra-head-4.1.0 tasks/replicator.rake
hydra-head-4.0.3 tasks/replicator.rake
hydra-head-4.0.2 tasks/replicator.rake
hydra-head-4.0.1 tasks/replicator.rake
hydra-head-4.0.0 tasks/replicator.rake
hydra-head-4.0.0.rc6 tasks/replicator.rake
hydra-head-4.0.0.rc5 tasks/replicator.rake
hydra-head-4.0.0.rc4 tasks/replicator.rake
hydra-head-4.0.0.rc3 tasks/replicator.rake
hydra-head-4.0.0.rc2 tasks/replicator.rake
hydra-head-3.3.0 tasks/replicator.rake
hydra-head-3.2.2 tasks/replicator.rake
hydra-head-3.2.1 tasks/replicator.rake
hydra-head-3.2.0 tasks/replicator.rake
hydra-head-3.2.0.pre3 tasks/replicator.rake
hydra-head-3.2.0.pre2 tasks/replicator.rake
hydra-head-3.2.0.pre1 tasks/replicator.rake