forked from neo4jrb/activegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (44 loc) · 1.15 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
require 'rake'
require 'bundler/gem_tasks'
require 'neo4j-core'
load 'neo4j/tasks/neo4j_server.rake'
load 'neo4j/tasks/migration.rake'
desc 'Generate YARD documentation'
namespace :docs do
task :yard do
`rm -rf docs/_build/_yard/*`
abort("can't generate YARD") unless system('yard -p docs/_yard/custom_templates -f rst')
end
task :sphinx do
`mkdir -p docs/api`
`rm -rf docs/api/*`
`cp -r docs/_build/_yard/* docs/api/`
`cp -r docs/assets/* docs/_build/html/_static/`
abort("can't generate Sphinx docs") unless system('cd docs && make html')
end
task :open do
`open docs/_build/html/index.html`
end
task all: [:yard, :sphinx]
end
task docs: 'docs:all'
desc 'Run neo4j.rb specs'
task 'spec' do
success = system('rspec spec')
abort('RSpec neo4j failed') unless success
end
require 'rake/testtask'
Rake::TestTask.new(:test_generators) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
desc 'Generate coverage report'
task 'coverage' do
ENV['COVERAGE'] = 'true'
rm_rf 'coverage/'
task = Rake::Task['spec']
task.reenable
task.invoke
end
task default: ['spec']