Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 57 lines (47 sloc) 1.435 kb
44bc010 Nick Quaranto Adding in basic jeweler template
qrush authored
1 require 'rubygems'
2 require 'rake'
3
4 begin
5 require 'jeweler'
6 Jeweler::Tasks.new do |gem|
7 gem.name = "pythagoras"
8 gem.summary = %Q{Automatic building and reporting of metrics with metric_fu through integrity}
9 gem.email = "nick@quaran.to"
10 gem.homepage = "http://github.com/thoughtbot/pythagoras"
11 gem.authors = ["Nick Quaranto"]
12 # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13 end
14
15 rescue LoadError
16 puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17 end
18
19 require 'rake/testtask'
20 Rake::TestTask.new(:test) do |test|
21 test.libs << 'lib' << 'test'
22 test.pattern = 'test/**/*_test.rb'
23 test.verbose = true
24 end
25
26 begin
27 require 'rcov/rcovtask'
28 Rcov::RcovTask.new do |test|
29 test.libs << 'test'
30 test.pattern = 'test/**/*_test.rb'
31 test.verbose = true
32 end
33 rescue LoadError
34 task :rcov do
35 abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
36 end
37 end
38
39
40 task :default => :test
41
42 require 'rake/rdoctask'
43 Rake::RDocTask.new do |rdoc|
44 if File.exist?('VERSION.yml')
45 config = YAML.load(File.read('VERSION.yml'))
46 version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
47 else
48 version = ""
49 end
50
51 rdoc.rdoc_dir = 'rdoc'
52 rdoc.title = "pythagoras #{version}"
53 rdoc.rdoc_files.include('README*')
54 rdoc.rdoc_files.include('lib/**/*.rb')
55 end
56
Something went wrong with that request. Please try again.