public
Description: An RDoc template which looks better on the iPhone web browser. See the Rails example at http://pocketrails.com
Homepage: http://pocketrails.com
Clone URL: git://github.com/trak3r/iphone-rdoc-template.git
Click here to lend your support to: iphone-rdoc-template and make a donation at www.pledgie.com !
100644 33 lines (27 sloc) 1.032 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
require 'echoe'
require 'rake/rdoctask'
 
task :test => :rerdoc
 
Echoe.new('iphone_rdoc_template') do |gem|
  gem.version = '0.0.1'
  gem.summary = 'An RDoc template to look good in the iPhone web browser'
  gem.description = gem.summary
  gem.author = "Thomas 'Ted' Davis"
  gem.email = 'ted@pocketrails.com'
  gem.url = 'https://github.com/trak3r/iphone-rdoc-template'
end
 
PROJECT_PATH = '/Users/ted/Desktop/iPhone/personal\ projects/pocketrails/iphone-rdoc-template'
RAILS_PATH = "#{PROJECT_PATH}/../rails"
TEMPLATE_PATH = "#{PROJECT_PATH}/lib/iphone_rdoc_template"
IUI_PATH = "#{PROJECT_PATH}/../iui-0.13"
RDOC_PATH = "#{RAILS_PATH}/doc/rdoc"
 
desc "Copy the image files referenced by the templates"
task :copy_images do
  [ 'listArrow.png', 'pinstripes.png', 'toolbar.png' ].each do |image|
    system "cp #{IUI_PATH}/iui/#{image} #{RDOC_PATH}/#{image}"
  end
end
 
desc "Generate the RDoc for Rails"
task :rerdoc do
  system "cd #{RAILS_PATH} && rake rerdoc template=#{TEMPLATE_PATH}"
  Rake::Task[ "copy_images" ].execute
end