-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
47 lines (35 loc) · 1.07 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
require 'rake'
require 'bundler'
Bundler::GemHelper.install_tasks
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.10.2.zip"
APP_ROOT = File.dirname(__FILE__)
require 'rspec/core/rake_task'
require 'engine_cart/rake_task'
require 'jettywrapper'
task :default => :ci
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
end
desc "Load fixtures"
task :fixtures => ['engine_cart:generate'] do
within_test_app do
system "rake blacklight:solr:seed RAILS_ENV=test"
abort "Error running fixtures" unless $?.success?
end
end
desc "Execute Continuous Integration build"
task :ci => ['jetty:clean', 'engine_cart:generate'] do
require 'jettywrapper'
jetty_params = {
:jetty_home => File.expand_path(File.dirname(__FILE__) + '/jetty'),
:quiet => false,
:jetty_port => 8888,
:solr_home => File.expand_path(File.dirname(__FILE__) + '/jetty/solr'),
:startup_wait => 30
}
error = Jettywrapper.wrap(jetty_params) do
Rake::Task['fixtures'].invoke
Rake::Task['spec'].invoke
end
raise "test failures: #{error}" if error
end