Sha256: 18b8662941aacb706ecfc7306e994651d471ade465d74718c642dcd1f69f9680
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
require 'jettywrapper' namespace :sm_wrap do namespace :jetty do desc "Modify test jetty solr to be multicore" task :config => ['sm_wrap:solrmarc:setup_test_jetty'] do # copy the solr.xml file for multi-core to test jetty solr jetty_solr_dir = "solrmarc/test/jetty/solr" cp('spec/solr/solr.xml', jetty_solr_dir, :verbose => true) # set up solr dev and test conf directories dev_conf_dir = "#{jetty_solr_dir}/dev/conf" test_conf_dir = "#{jetty_solr_dir}/test/conf" mkdir_p(dev_conf_dir) unless Dir.exists?(dev_conf_dir) mkdir_p(test_conf_dir) unless Dir.exists?(test_conf_dir) single_core_conf_dir = "#{jetty_solr_dir}/conf" Dir["#{single_core_conf_dir}/*"].each { |f| cp_r(f, dev_conf_dir, :verbose => true) cp_r(f, test_conf_dir, :verbose => true) } require 'fileutils' # remove single core conf directory FileUtils.rm_rf("#{jetty_solr_dir}/conf/.", :verbose => true) Dir.foreach(jetty_solr_dir + "/conf") { |f| fn = File.join(jetty_solr_dir, f) File.delete(fn) if f != '.' && f != '..' } end desc "Copies the SOLR config files and starts up the test-jetty instance" task :load => [:config, 'jetty:start'] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
solrmarc_wrapper-0.0.4 | lib/tasks/jetty.rake |
solrmarc_wrapper-0.0.3 | lib/tasks/jetty.rake |
solrmarc_wrapper-0.0.2 | lib/tasks/jetty.rake |