forked from neo4jrb/activegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
63 lines (49 loc) · 1.56 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
srand # Workaround for JRuby bug 1.6.5
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'rake'
require 'rspec/core/rake_task'
require 'rdoc/task'
require "neo4j/version"
desc "Run all specs"
RSpec::Core::RakeTask.new("spec") do |t|
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 Neo4j gem"
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/* " +
"ronge@rubyforge.org:/var/www/gforge-projects/neo4j/"
end
task :default => 'spec'