forked from deepakjois/gchartrb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
61 lines (51 loc) · 1.5 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
# -*- ruby -*-
require 'rubygems'
require 'hoe'
require "spec/rake/spectask"
require './lib/gchartrb'
class Hoe
def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end
end # copied from the Rakefile of the sup project
Hoe.new('gchartrb', "0.9") do |p|
p.rubyforge_name = 'gchartrb'
p.author = 'Deepak Jois'
p.email = 'deepak.jois@gmail.com'
p.summary = 'Ruby Wrapper for the Google Chart API'
p.description = p.paragraphs_of('README.txt', 2..3).join("\n\n")
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
p.remote_rdoc_dir = ''
end
RDOC_OPTS = [
'--quiet',
'--title', 'gchartrb API',
'--main', 'README.txt',
'--charset', 'utf-8',
'--inline-source',
'--tab-width', '2',
'--line-numbers',
]
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/'
rdoc.options = RDOC_OPTS
rdoc.main = "README.txt"
rdoc.rdoc_files.add [
'README.txt',
'History.txt',
'lib/**/*.rb'
]
end
desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList["spec/**/*_spec.rb"]
t.spec_opts = ["--options", "spec/spec.opts"]
end
desc "Run all specs and get coverage statistics"
Spec::Rake::SpecTask.new('spec:rcov') do |t|
t.spec_files = FileList["spec/**/*_spec.rb"]
t.rcov = true
t.spec_opts = ["--options", "spec/spec.opts"]
end
Rake::Task[:default].prerequisites.clear
task :default => :spec
# vim: syntax=Ruby