Sha256: b46270fde61020f1851cb470106a90064393f725be7e32f7c5b206a324308342

Contents?: true

Size: 1.85 KB

Versions: 34

Compression:

Stored size: 1.85 KB

Contents

##For jettywrapper set the app_ROOT
APP_ROOT= File.expand_path(File.join(File.dirname(__FILE__),"../.."))
require 'jettywrapper'

namespace :hydra do
  namespace :jetty do
    desc "Copies the default Solr & Fedora configs into the bundled Hydra Testing Server"
    task :config do
      Rake::Task["hydra:jetty:reset"].reenable
      Rake::Task["hydra:jetty:reset"].invoke
      Rake::Task["hydra:jetty:config_fedora"].reenable
      Rake::Task["hydra:jetty:config_fedora"].invoke
      Rake::Task["hydra:jetty:config_solr"].reenable
      Rake::Task["hydra:jetty:config_solr"].invoke
    end
    
    desc "Copies the default SOLR config for the bundled Hydra Testing Server"
    task :config_solr do
      FileList['solr_conf/conf/*'].each do |f|  
        cp("#{f}", 'jetty/solr/development-core/conf/', :verbose => true)
        cp("#{f}", 'jetty/solr/test-core/conf/', :verbose => true)
      end

    end

    desc "Copies a custom fedora config for the bundled Hydra Testing Server"
    task :config_fedora do
      # load a custom fedora.fcfg - 
      if defined?(Rails.root)
        app_root = Rails.root
      else
        app_root = File.join(File.dirname(__FILE__),"..")
      end
       
      fcfg = File.join(app_root,"fedora_conf","conf","test","fedora.fcfg")
      puts "PWD:: #{FileUtils.pwd}"
      if File.exists?(fcfg)
        puts "copying over fedora.fcfg"
        cp("#{fcfg}", 'jetty/fedora/default/server/config/', :verbose => true)
      else
        puts "#{fcfg} file not found -- skipping fedora config"
      end
    end

    desc "Copies the default SOLR config files and starts up the fedora instance."
    task :load => [:config, 'jetty:start']

    desc "return development jetty to its pristine state, as pulled from git"
    task :reset => ['jetty:stop'] do
      system("cd jetty && git reset --hard HEAD && git clean -dfx && cd ..")
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
hydra-core-5.4.1 tasks/hydra_jetty.rake
hydra-core-6.0.0.rc3 tasks/hydra_jetty.rake
hydra-core-6.0.0.rc2 tasks/hydra_jetty.rake
hydra-core-6.0.0.rc1 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre8 tasks/hydra_jetty.rake
hydra-core-5.4.0 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre7 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre6 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre5 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre4 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre3 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre2 tasks/hydra_jetty.rake
hydra-core-6.0.0.pre1 tasks/hydra_jetty.rake
hydra-core-5.4.0.pre1 tasks/hydra_jetty.rake
hydra-core-5.3.0 tasks/hydra_jetty.rake
hydra-core-5.2.0 tasks/hydra_jetty.rake
hydra-core-5.1.0 tasks/hydra_jetty.rake
hydra-core-5.0.1 tasks/hydra_jetty.rake
hydra-core-5.0.0 tasks/hydra_jetty.rake
hydra-core-5.0.0.rc1 tasks/hydra_jetty.rake