forked from yob/onix
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
79 lines (70 loc) · 2.14 KB
/
Rakefile
File metadata and controls
79 lines (70 loc) · 2.14 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
begin
require 'spec'
rescue LoadError
require 'rubygems'
require 'spec'
end
require 'rake/rdoctask'
require 'spec/rake/spectask'
require 'rake/gempackagetask'
# allow require of spec/spec_helper
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../'
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'
require 'onix'
desc "Default Task"
task :default => [ :spec ]
desc 'Generate documentation'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'ONIX'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.markdown')
rdoc.rdoc_files.include('TODO')
rdoc.rdoc_files.include('CHANGELOG')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc "Run the specs under spec"
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
end
desc "Generate RCov reports"
Spec::Rake::SpecTask.new(:rcov) do |t|
t.libs << 'lib'
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['-c']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec', '--exclude', 'gems', '--exclude', 'riddle']
end
spec = Gem::Specification.new do |s|
s.name = "onix"
s.version = ONIX::Version::String
s.summary = "A convient mapping between ruby objects and the ONIX XML specification"
s.description = "A convient mapping between ruby objects and the ONIX XML specification"
s.author = "James Healy"
s.email = "jimmy@deefa.com"
s.has_rdoc = true
s.rubyforge_project = "rbook"
s.homepage = "http://github.com/yob/onix/tree/master"
s.rdoc_options << "--title" << "ONIX - Working with the ONIX XML spec" <<
"--line-numbers"
s.test_files = FileList["spec/**/*.rb"]
s.files = FileList[
"lib/**/*.rb",
"README.markdown",
"TODO",
"CHANGELOG",
"tasks/**/*.rb",
"tasks/**/*.rake",
"dtd/**/*.*",
"support/**/*.*",
"spec/**/*.*"
]
s.add_dependency('roxml', '2.5.3')
s.add_dependency('libxml-ruby', '>=1.1.3')
s.add_dependency('andand')
end
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_tar = true
p.need_zip = true
end