Sha256: 56eebc0fc4487c998278b467eb9ea73abbc7cc46b4a716855a87407b645a6889
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
require 'jettywrapper' namespace :sm_wrap do namespace :jetty do desc "Modify test jetty solr to be multicore" task :config_ci => ['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_ci => [:config_ci, 'jetty:start'] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solrmarc_wrapper-0.0.1 | lib/tasks/jetty.rake |