begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end ZIP_URL = 'https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.4.zip' Bundler::GemHelper.install_tasks task default: [:ci, :rubocop] namespace :spotlight do desc 'Copies the default SOLR config for the bundled Testing Server' task :configure_jetty do FileList['solr_conf/conf/*'].each do |f| cp("#{f}", 'jetty/solr/blacklight-core/conf/', verbose: true) end end end require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) require 'jettywrapper' require 'engine_cart/rake_task' task ci: ['engine_cart:generate', 'jetty:clean', 'spotlight:configure_jetty'] do ENV['environment'] = 'test' jetty_params = Jettywrapper.load_config jetty_params[:startup_wait] = 60 Jettywrapper.wrap(jetty_params) do # run the tests Rake::Task['spec'].invoke end end require 'rdoc/task' RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = 'Spotlight::Dor::Resources' rdoc.options << '--line-numbers' rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('lib/**/*.rb') end