Sha256: 490463bbb8460aa1e93ff4ed90afdf59bcbee1ae368147ba541139e50c172e6a
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
# frozen_string_literal: true require 'solr_wrapper' require 'fcrepo_wrapper' require 'active_fedora/rake_support' require 'bundler' Bundler::GemHelper.install_tasks # This is to fix a breaking change with Ruby 3.2 where some methods # in fcrepo_wrapper use the removed `File.exists?` alias, preventing # tests from being set up. class File class << self alias exists? exist? end end require 'rspec/core/rake_task' desc 'Run tests only' RSpec::Core::RakeTask.new(:rspec) do |spec| spec.rspec_opts = ['--backtrace'] if ENV['CI'] end require 'rubocop/rake_task' desc 'Run style checker' RuboCop::RakeTask.new(:rubocop) do |task| task.requires << 'rubocop-rspec' task.fail_on_error = true end RSpec::Core::RakeTask.new(:rcov) do |spec| spec.rcov = true end desc "CI build" task :ci do Rake::Task['rubocop'].invoke unless ENV['NO_RUBOCOP'] ENV['environment'] = "test" with_test_server do Rake::Task[:coverage].invoke end end desc "Execute specs with coverage" task :coverage do # Put spec opts in a file named .rspec in root ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby' Rake::Task[:spec].invoke end desc "Execute specs with coverage" task :spec do with_test_server do Rake::Task[:rspec].invoke end end task default: :ci
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
speedy-af-0.4.0 | Rakefile |