Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 60 lines (48 sloc) 1.181 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
d6555b2 @stereobooster add checkout task
stereobooster authored
17 desc "checkout libgit2 source"
18 task :checkout do
19 sh "git submodule update --init"
20 end
21 Rake::Task[:compile].prerequisites.insert(0, :checkout)
22
b3fc7bf @brianmario only unpack and rebuild libgit2 if libgit2_embed.a isn't built
brianmario authored
23 task :embedded_clean do
24 lib_path = File.expand_path '../ext/rugged/libgit2_embed.a', __FILE__
25 system "rm #{lib_path}"
26 end
27 Rake::Task[:clean].prerequisites << :embedded_clean
28
25b5d3b @holman rake console
holman authored
29 desc "Open an irb session preloaded with Rugged"
30 task :console do
31 sh "irb -rubygems -I lib -r ./lib/rugged"
32 end
33
6fe2ba2 @schacon more of a proper ext setup
schacon authored
34 #
35 # Tests
36 #
711cc9d @vmg Update Rakefile
vmg authored
37 task :default => [:compile, :test]
eafbbe8 @schacon moved turn based tests to "rake turn"
schacon authored
38
ccdad0b @vmg Prepare for release
vmg authored
39 task :cover do
40 ruby 'test/coverage/cover.rb'
41 end
42
eafbbe8 @schacon moved turn based tests to "rake turn"
schacon authored
43 Rake::TestTask.new do |t|
cdee343 @tenderlove adjust load path to avoid expand_path copy / paste.
tenderlove authored
44 t.libs << 'lib:test'
eafbbe8 @schacon moved turn based tests to "rake turn"
schacon authored
45 t.pattern = 'test/**/*_test.rb'
46 t.verbose = false
40648e5 @tenderlove run tests with warnings and eliminate warnings
tenderlove authored
47 t.warning = true
6fe2ba2 @schacon more of a proper ext setup
schacon authored
48 end
68d041e @vmg Add rdoc documentation to Reference
vmg authored
49
50 begin
51 require 'rdoc/task'
52 Rake::RDocTask.new do |rdoc|
d6555b2 @stereobooster add checkout task
stereobooster authored
53 rdoc.rdoc_dir = 'rdoc'
54 rdoc.rdoc_files.include('ext/**/*.c')
55 rdoc.rdoc_files.include('lib/**/*.rb')
68d041e @vmg Add rdoc documentation to Reference
vmg authored
56 end
57 rescue LoadError
58 end
59
Something went wrong with that request. Please try again.