Sha256: d1dadac62060c06eadcbde3e9e4228cc33df5f8be5d1ac031cbab215c9601212
Contents?: true
Size: 1.5 KB
Versions: 2
Compression:
Stored size: 1.5 KB
Contents
# frozen_string_literal: true require 'solr_wrapper' require 'engine_cart/rake_task' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.pattern = 'spec/**/*_spec.rb' end require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc desc "Run test suite" task ci: ['blacklight:generate'] do SolrWrapper.wrap do |solr| solr.with_collection do within_test_app do system "RAILS_ENV=test rake blacklight:index:seed" end Rake::Task['blacklight:coverage'].invoke end end end namespace :blacklight do desc "Run tests with coverage" task :coverage do ENV['COVERAGE'] = 'true' Rake::Task["spec"].invoke end desc "Create the test rails app" task generate: ['engine_cart:generate'] do end namespace :internal do task seed: ['engine_cart:generate'] do within_test_app do system "bundle exec rake blacklight:index:seed" end end end desc 'Run Solr and Blacklight for interactive development' task :server, [:rails_server_args] do |_t, args| if File.exist? EngineCart.destination within_test_app do system "bundle update" end else Rake::Task['engine_cart:generate'].invoke end SolrWrapper.wrap do |solr| solr.with_collection do Rake::Task['blacklight:internal:seed'].invoke within_test_app do system "bundle exec rails s #{args[:rails_server_args]}" end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blacklight-7.0.0 | tasks/blacklight.rake |
blacklight-7.0.0.rc2 | tasks/blacklight.rake |