-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
54 lines (41 loc) · 1.72 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
# encoding: utf-8
require 'bones'
Bones.setup
PROJ.name = 'pagify'
PROJ.authors = 'Lin Jen-Shin (aka godfat 真常)'
PROJ.email = 'godfat (XD) godfat.org'
PROJ.url = "http://github.com/godfat/#{PROJ.name}"
PROJ.rubyforge.name = 'ludy'
PROJ.gem.development_dependencies << ['dm-core', '>=0.9.9'] <<
['dm-aggregates', '>=0.9.9'] <<
['activerecord', '>=2.1.1']
# supress warnings, there's too many warnings in dm-core
PROJ.ruby_opts.delete '-w'
PROJ.description = PROJ.summary = paragraphs_of('README', 'description').join("\n\n")
PROJ.changes = paragraphs_of('CHANGES', 0..1).join("\n\n")
PROJ.version = File.read("lib/#{PROJ.name}/version.rb").gsub(/.*VERSION = '(.*)'.*/m, '\1')
PROJ.exclude += ['^tmp', 'tmp$', '^pkg', '^\.gitignore$',
'^ann-', '\.sqlite3$', '\.db$']
PROJ.rdoc.remote_dir = PROJ.name
PROJ.readme_file = 'README'
PROJ.rdoc.main = 'README'
PROJ.rdoc.exclude += ['Rakefile', '^tasks', '^test']
PROJ.rdoc.include << '\w+'
# PROJ.rdoc.opts << '--diagram' if !Rake::WIN32 and `which dot` =~ %r/\/dot/
PROJ.rdoc.opts += ['--charset=utf-8', '--inline-source',
'--line-numbers', '--promiscuous']
PROJ.spec.opts << '--color'
PROJ.ann.file = "ann-#{PROJ.name}-#{PROJ.version}"
PROJ.ann.paragraphs.concat %w[LINKS SYNOPSIS REQUIREMENTS INSTALL LICENSE]
CLEAN.include Dir['**/*.rbc']
task :default do
Rake.application.options.show_task_pattern = /./
Rake.application.display_tasks_and_comments
end
namespace :gem do
desc "create #{PROJ.name}.gemspec"
task 'gemspec' do
puts "rake gem:debug > #{PROJ.name}.gemspec"
File.open("#{PROJ.name}.gemspec", 'w'){|spec| spec << `rake gem:debug`.sub(/.*/, '')}
end
end