tasks/dev.rake in valkyrie-1.5.1 vs tasks/dev.rake in valkyrie-1.6.0
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
namespace :server do
desc "Start solr and fedora servers for testing"
task :test do
+ require 'rails'
require 'solr_wrapper'
require 'fcrepo_wrapper'
SolrWrapper.wrap(shared_solr_opts.merge(port: 8984, instance_dir: 'tmp/blacklight-core-test')) do |solr|
solr.with_collection(name: "blacklight-core-test", dir: Pathname.new(__dir__).join("..", "solr", "config").to_s) do
FcrepoWrapper.wrap(shared_fedora_opts.merge(port: 8988, fcrepo_home_dir: "tmp/fcrepo4-test-data", version: "4.7.5", instance_directory: "tmp/fcrepo4")) do |_fcrepo|
@@ -19,19 +20,21 @@
end
end
desc "Cleanup test servers"
task :clean_test do
+ require 'rails'
require 'solr_wrapper'
require 'fcrepo_wrapper'
SolrWrapper.instance(shared_solr_opts.merge(port: 8984, instance_dir: 'tmp/blacklight-core-test')).remove_instance_dir!
FcrepoWrapper.default_instance(shared_fedora_opts.merge(port: 8988, fcrepo_home_dir: "tmp/fcrepo4-test-data", instance_directory: "tmp/fcrepo4")).remove_instance_dir!
FcrepoWrapper::Instance.new(shared_fedora_opts.merge(port: 8998, fcrepo_home_dir: "tmp/fcrepo5-test-data", instance_directory: "tmp/fcrepo5")).remove_instance_dir!
puts "Cleaned up test solr & fedora servers."
end
desc "Start solr and fedora servers for development"
task :development do
+ require 'rails'
require 'solr_wrapper'
require 'fcrepo_wrapper'
SolrWrapper.wrap(shared_solr_opts.merge(port: 8983, instance_dir: 'tmp/blacklight-core')) do |solr|
solr.with_collection(name: "blacklight-core", dir: Pathname.new(__dir__).join("..", "solr", "config").to_s) do