forked from sr/atom-tools
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
80 lines (62 loc) · 2.18 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
require "rake"
require "rake/testtask"
require "rake/rdoctask"
require "rake/gempackagetask"
require "spec/rake/spectask"
require "rake/clean"
NAME = "atom-tools"
VERS = "2.0.5"
task :default => [:spec]
# For historical reasons, atom-tools has both rspec specs and test/unit tests.
# This is silly (and there's a lot of duplication), but I have better things to
# do than rewrite the tests.
#
# Ideally all the tests should be runnable with one command, but for now you
# have to run "rake test" and "rake spec"
# spec task
desc 'Run all specs (see also "test" task)'
Spec::Rake::SpecTask.new('spec')
# test task
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
Rake::RDocTask.new do |rdoc|
rdoc.title = 'atom-tools documentation'
rdoc.main = 'README'
rdoc.rdoc_files.include 'README', 'lib/**/*.rb'
rdoc.rdoc_dir = 'doc'
end
spec = Gem::Specification.new do |s|
s.name = NAME
s.version = VERS
s.platform = Gem::Platform::RUBY
s.author = "Brendan Taylor"
s.email = '[email protected]'
s.homepage = 'http://github.com/bct/atom-tools/wikis'
s.rubyforge_project = 'ibes'
s.summary = 'Tools for working with Atom Entries, Feeds and Collections.'
s.description = 'atom-tools is an all-in-one Atom library. It parses and builds Atom (RFC 4287) entries and feeds, and manipulates Atom Publishing Protocol (RFC 5023) Collections.
It also comes with a set of commandline utilities for working with AtomPub Collections.
It is not the fastest Ruby Atom library, but it is comprehensive and makes handling extensions to the Atom format very easy.'
s.test_file = "test/runtests.rb" # TODO: should have the spec here instead?
s.has_rdoc = true
s.extra_rdoc_files = [ "README" ]
s.files = %w(COPYING README Rakefile setup.rb) +
Dir.glob("{bin,doc,test,spec,lib}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb")
s.require_path = "lib"
s.extensions = FileList["ext/**/extconf.rb"].to_a
s.bindir = "bin"
end
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_tar = true
end
task :install do
sh %{rake package}
sh %{gem install pkg/#{NAME}-#{VERS}}
end