-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
53 lines (41 loc) · 1.2 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rdoc/task'
require 'engine_cart/rake_task'
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Blacklight::LocalePicker'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.md')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require 'bundler/gem_tasks'
require 'solr_wrapper'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop)
namespace :i18n do
desc 'Check for missing translations'
task :health do
system 'bundle exec i18n-tasks health'
end
end
require 'engine_cart/rake_task'
task ci: ['engine_cart:generate'] do
ENV['environment'] = 'test'
SolrWrapper.wrap(port: '8983') do |solr|
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), '.internal_test_app', 'solr', 'conf')) do
within_test_app do
system 'bundle install'
system 'bundle exec rake db:migrate'
end
# run the tests
Rake::Task['spec'].invoke
end
end
end
task default: %i[i18n:health ci]