forked from projectblacklight/blacklight_range_limit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
45 lines (31 loc) · 955 Bytes
/
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
require 'rake'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
require 'engine_cart/rake_task'
EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.3.zip"
require 'jettywrapper'
task :default => :ci
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
end
task :ci => ['jetty:clean', 'engine_cart:generate'] do
jetty_params = Jettywrapper.load_config('test')
jetty_params[:startup_wait]= 60
error = Jettywrapper.wrap(jetty_params) do
Rake::Task["test:seed"].invoke
Rake::Task['spec'].invoke
end
raise "test failures: #{error}" if error
end
namespace :test do
desc "Put sample data into solr"
task :seed => ['engine_cart:generate'] do
within_test_app do
ENV['RAILS_ENV'] ||= 'test'
system "rake blacklight:solr:seed"
system "rake blacklight_range_limit:seed"
end
end
end