-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
47 lines (39 loc) · 1.02 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
# frozen_string_literal: true
require "rake/testtask"
require "rake/extensiontask"
require "ruby_memcheck"
require "bundler/gem_tasks"
require "yard"
RubyMemcheck.config(
binary_name: "geos_c_impl",
# valgrind_generate_suppressions: true,
valgrind_suppressions_dir: "test/valgrind/suppressions"
)
# Build tasks
if RUBY_DESCRIPTION.match(/^jruby/)
task :compile
else
Rake::ExtensionTask.new "geos_c_impl" do |ext|
ext.lib_dir = "lib/rgeo/geos"
end
end
Rake::TestTask.new(:test) do |task|
task.libs << "test"
task.libs << "lib"
task.test_files = FileList["test/**/*_test.rb"]
end
namespace :test do
RubyMemcheck::TestTask.new(valgrind: :compile) do |task|
task.libs << "test"
task.libs << "lib"
task.test_files = FileList["test/geos_capi/*_test.rb"]
end
end
YARD::Rake::YardocTask.new do |t|
# Runs a server to appreciate doc after having it running
t.after = proc do
exec "ruby", "-run", "-e", "httpd", File.join(__dir__, "yardoc")
end
end
task test: :compile
task default: %i[clean test]