Sha256: 7b9621ca7540b9532a239e75473781cec58d4bd9a3e6658fecaca2f92bab685f

Contents?: true

Size: 1.83 KB

Versions: 102

Compression:

Stored size: 1.83 KB

Contents

namespace :jetty do
  desc "Apply all configs to Testing Server (relies on hydra:jetty:config tasks unless you override it)"
  task :config do
    Rake::Task["hydra:jetty:config"].invoke
  end
end

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:config_fedora"].invoke
      Rake::Task["hydra:jetty:config_solr"].invoke
    end
    
    desc "Copies the contents of solr_conf into the Solr development-core and test-core of 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","development","fedora.fcfg")
      if File.exists?(fcfg)
        puts "copying over development/fedora.fcfg"
        cp("#{fcfg}", 'jetty/fedora/default/server/config/', :verbose => true)
      else
        puts "#{fcfg} file not found -- skipping fedora config"
      end
      fcfg = File.join(app_root,"fedora_conf","conf","test","fedora.fcfg")
      if File.exists?(fcfg)
        puts "copying over test/fedora.fcfg"
        cp("#{fcfg}", 'jetty/fedora/test/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']

  end
end

Version data entries

102 entries across 102 versions & 2 rubygems

Version Path
hydra-core-8.2.0 lib/railties/hydra_jetty.rake
hydra-core-5.4.1 lib/railties/hydra_jetty.rake
hydra-core-8.1.0 lib/railties/hydra_jetty.rake
hydra-core-8.0.0 lib/railties/hydra_jetty.rake
hydra-core-9.0.0.rc2 lib/railties/hydra_jetty.rake
hydra-core-9.0.0.rc1 lib/railties/hydra_jetty.rake
hydra-core-9.0.0.beta2 lib/railties/hydra_jetty.rake
hydra-core-9.0.0.beta1 lib/railties/hydra_jetty.rake
hydra-core-8.0.0.beta1 lib/railties/hydra_jetty.rake
hydra-core-7.2.2 lib/railties/hydra_jetty.rake
hydra-core-7.2.1 lib/railties/hydra_jetty.rake
hydra-core-7.2.0 lib/railties/hydra_jetty.rake
hydra-core-7.1.0 lib/railties/hydra_jetty.rake
hydra-core-7.1.0.rc2 lib/railties/hydra_jetty.rake
hydra-core-7.1.0.rc1 lib/railties/hydra_jetty.rake
hydra-core-6.5.2 lib/railties/hydra_jetty.rake
hydra-core-6.5.1 lib/railties/hydra_jetty.rake
hydra-core-7.0.2 lib/railties/hydra_jetty.rake
hydra-core-6.4.2 lib/railties/hydra_jetty.rake
hydra-core-7.0.1 lib/railties/hydra_jetty.rake