Sha256: 941a53402205349eb2d8fc055574c1c3b32426665e5c916f56102b92ad311c77

Contents?: true

Size: 1.15 KB

Versions: 9

Compression:

Stored size: 1.15 KB

Contents

require 'rspec/core/rake_task'
require 'solr_wrapper'   # necessary for rake_support to work
require 'fcrepo_wrapper' # necessary for rake_support to work
require 'engine_cart/rake_task'
require 'rubocop/rake_task'
require 'active_fedora/rake_support'

desc 'Run style checker'
RuboCop::RakeTask.new(:rubocop) do |task|
  task.fail_on_error = true
end

RSpec::Core::RakeTask.new(:spec)

desc 'Spin up test servers and run specs'
task :spec_with_app_load  do
  with_test_server do
    Rake::Task['spec'].invoke
  end
end

desc "Sort locales keys in alphabetic order."
task :i18n_sorter do
  require 'i18n_yaml_sorter'
  locales = Dir.glob(File.expand_path('../../config/locales/**/*.yml', __FILE__))
  locales.each do |locale_path|
    sorted_contents = File.open(locale_path) { |f| I18nYamlSorter::Sorter.new(f).sort }
    File.open(locale_path, 'w') { |f|  f << sorted_contents}
    abort("Bad I18n conversion!") unless Psych.load_file(locale_path).is_a?(Hash)
  end
end

desc 'Generate the engine_cart and spin up test servers and run specs'
task ci: ['rubocop', 'engine_cart:generate'] do
  puts 'running continuous integration'
  Rake::Task['spec_with_app_load'].invoke
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 tasks/hyrax-dev.rake
hyrax-1.1.0 tasks/hyrax-dev.rake
hyrax-1.0.5 tasks/hyrax-dev.rake
hyrax-1.0.4 tasks/hyrax-dev.rake
hyrax-1.0.3 tasks/hyrax-dev.rake
hyrax-1.0.2 tasks/hyrax-dev.rake
hyrax-1.0.1 tasks/hyrax-dev.rake
hyrax-1.0.0.rc2 tasks/hyrax-dev.rake
hyrax-1.0.0.rc1 tasks/hyrax-dev.rake