Sha256: 3a93455ef9789a9fe322f35e23f8968eee3a572533c45628796a3e87c0c7f2e1

Contents?: true

Size: 1.31 KB

Versions: 3

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

begin
  require 'bundler/setup'
rescue LoadError
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end

APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
# load rake tasks defined in lib/tasks that are not loaded in lib/active_fedora.rb
Dir['lib/tasks/*.rake'].each { |rake| load rake }

load 'rails/tasks/engine.rake'
load 'rails/tasks/statistics.rake'

begin
  require 'rubocop/rake_task'
  RuboCop::RakeTask.new(:rubocop) do |task|
    task.requires << 'rubocop-rspec'
    task.requires << 'rubocop-performance'
    task.requires << 'rubocop-rails'
    task.requires << 'rubocop-capybara'
    task.requires << 'rubocop-factory_bot'
    task.fail_on_error = true
  end
rescue LoadError
  task rubocop: :environment do
    warn 'Rubocop is disabled'
  end
end

require 'solr_wrapper'
require 'solr_wrapper/rake_task'

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new

desc 'Lint, spin up Solr, index test docs, run test suite'
task ci: [:environment, :rubocop] do
  SolrWrapper.wrap(port: 8984, version: '8.11.2', persist: false) do |solr|
    solr.with_collection(name: 'blacklight-core', dir: 'spec/dummy/solr/conf/') do
      system 'RAILS_ENV=test rake app:bpluser:test_index:seed'
      Rake::Task['spec'].invoke
    end
  end
end

task default: [:ci]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bpluser-0.5.0 Rakefile
bpluser-0.4.0 Rakefile
bpluser-0.3.0 Rakefile