begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end Bundler::GemHelper.install_tasks task default: [:ci, :rubocop] require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) require 'engine_cart/rake_task' desc 'Run tests in generated test Rails app with generated Solr instance running' task ci: ['engine_cart:generate'] do require 'solr_wrapper' require 'exhibits_solr_conf' ENV['environment'] = 'test' SolrWrapper.wrap(port: '8983') do |solr| solr.with_collection(name: 'blacklight-core', dir: ExhibitsSolrConf.path) do # run the tests Rake::Task['spec'].invoke end 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