forked from neo4jrb/activegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
64 lines (51 loc) · 1.67 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
55
56
57
58
59
60
61
62
63
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'rake'
require 'rspec/core/rake_task'
require 'rcov'
require 'rdoc/task'
require "neo4j/version"
desc "Run all specs with rcov"
RSpec::Core::RakeTask.new("spec:coverage") do |t|
t.rcov = true
t.rcov_opts = %w{--rails --include views -Ispec --exclude gems\/,spec\/,features\/,seeds\/}
t.rspec_opts = ["-c"]
end
task :check_commited do
status = %x{git status}
fail("Can't release gem unless everything is committed") unless status =~ /nothing to commit \(working directory clean\)|nothing added to commit but untracked files present/
end
desc "clean all, delete all files that are not in git"
task :clean_all do
system "git clean -df"
end
desc "create the gemspec"
task :build do
system "gem build neo4j.gemspec"
end
desc "release gem to gemcutter"
task :release => [:check_commited, :build] do
system "gem push neo4j-#{Neo4j::VERSION}-java.gem"
end
desc "Generate documentation for Neo4j.rb"
RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.title = "Neo4j.rb #{Neo4j::VERSION}"
rdoc.options << '--webcvs=http://github.com/andreasronge/neo4j/tree/master/'
# rdoc.options << '-f' << 'horo'
rdoc.options << '-c' << 'utf-8'
rdoc.options << '-m' << 'README.rdoc'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
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 'Upload documentation to RubyForge.'
task 'upload-docs' do
sh "scp -r doc/rdoc/* " +
"[email protected]:/var/www/gforge-projects/neo4j/"
end
task :default => 'spec:coverage'