Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 56 lines (45 sloc) 1.172 kb
6fe2ba2 @schacon more of a proper ext setup
schacon authored
1 require 'rake/testtask'
52b7b39 @vmg Complain when rake-compiler is missing
vmg authored
2
3 begin
4 require 'rake/extensiontask'
5 rescue LoadError
6 abort <<-error
7 rake-compile is missing; Rugged depends on rake-compiler to build the C wrapping code.
8
9 Install it by running `gem i rake-compiler`
10 error
11 end
6fe2ba2 @schacon more of a proper ext setup
schacon authored
12
b6eac62 @schacon renamed everything to Rugged from Ribbit
schacon authored
13 Rake::ExtensionTask.new('rugged') do |r|
14 r.lib_dir = 'lib/rugged'
acf8d94 @schacon extend the ribbit classes with ruby
schacon authored
15 end
6fe2ba2 @schacon more of a proper ext setup
schacon authored
16
b3fc7bf @brianmario only unpack and rebuild libgit2 if libgit2_embed.a isn't built
brianmario authored
17 task :embedded_clean do
18 lib_path = File.expand_path '../ext/rugged/libgit2_embed.a', __FILE__
19 system "rm #{lib_path}"
20 end
21 Rake::Task[:clean].prerequisites << :embedded_clean
22
6fe2ba2 @schacon more of a proper ext setup
schacon authored
23 #
24 # Tests
25 #
711cc9d @vmg Update Rakefile
vmg authored
26 task :default => [:compile, :test]
eafbbe8 @schacon moved turn based tests to "rake turn"
schacon authored
27
ccdad0b @vmg Prepare for release
vmg authored
28 task :pack_dist do
29 dir = File.dirname(File.expand_path(__FILE__))
30 output = File.join(dir, 'ext', 'rugged', 'vendor', 'libgit2-dist.tar.gz')
31 Dir.chdir(ENV['LIBGIT2_PATH']) do
32 `git archive --format=tar --prefix=libgit2-dist/ HEAD | gzip > #{output}`
33 end
34 end
35
36 task :cover do
37 ruby 'test/coverage/cover.rb'
38 end
39
eafbbe8 @schacon moved turn based tests to "rake turn"
schacon authored
40 Rake::TestTask.new do |t|
41 t.libs << 'lib'
42 t.pattern = 'test/**/*_test.rb'
43 t.verbose = false
6fe2ba2 @schacon more of a proper ext setup
schacon authored
44 end
68d041e @vmg Add rdoc documentation to Reference
vmg authored
45
46 begin
47 require 'rdoc/task'
48 Rake::RDocTask.new do |rdoc|
49 rdoc.rdoc_dir = 'rdoc'
50 rdoc.rdoc_files.include('ext/**/*.c')
51 rdoc.rdoc_files.include('lib/**/*.rb')
52 end
53 rescue LoadError
54 end
55
Something went wrong with that request. Please try again.