-
Notifications
You must be signed in to change notification settings - Fork 7
/
Rakefile
56 lines (43 loc) · 1.41 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
54
55
56
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::Folders'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.4.zip"
require 'jettywrapper'
task :default => [:spec]
desc "Clean out the test rails app"
task :clean => ['engine_cart:clean', 'jetty:clean'] do
end
desc "Run test suite"
task :ci => ['clean', 'jetty:add_test_core', 'engine_cart:generate'] do
jetty_params = Jettywrapper.load_config('test')
error = Jettywrapper.wrap(jetty_params) do
Rake::Task['spec'].invoke
end
raise "test failures: #{error}" if error
end
namespace :jetty do
desc 'Add test-core to solr for test environment'
task :add_test_core do
require 'nokogiri'
# copy config files
FileUtils.mkdir_p('jetty/solr/test-core/conf')
FileList['jetty/solr/blacklight-core/conf/*'].each do |f|
cp_r("#{f}", 'jetty/solr/test-core/conf/', verbose: true)
end
cp('jetty/solr/blacklight-core/core.properties', 'jetty/solr/test-core/', verbose: true)
end
end