forked from fumi/rdf-4store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
40 lines (33 loc) · 961 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
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end
task :default => :spec
namespace "4store" do
kbname = "rdf4storetest"
httpd_options = "-U -s -1 -p 10008"
desc 'Init 4store'
task :init => [:stop] do
sh "4s-backend-setup #{kbname}"
end
desc 'Start 4store'
task :start => [:stop] do
sh "4s-backend #{kbname}"
sh "4s-httpd #{httpd_options} #{kbname}"
end
desc 'Stop 4store'
task :stop do
sh "pkill -f '4s-backend #{kbname}'" if system("pgrep -f '4s-backend #{kbname}'")
sh "pkill -f '4s-httpd #{httpd_options} #{kbname}'" if system("pgrep -f '4s-httpd #{httpd_options} #{kbname}'")
end
end
desc 'Run specs'
task :spec => ["4store:init", "4store:start"] do
RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/**/*.spec'
t.rspec_opts = ["-fs", "-c"]
end
end