expanding the web site
[augment.git] / Rakefile
blob8b9a995d456a13044c8893b2600408559549121f
1 # -*- ruby -*-
3 require 'rubygems'
4 require 'hoe'
5 require 'erb'
6 require 'spec/rake/spectask'
7 require './lib/augment.rb'
9 Hoe.new('augment', Augment::VERSION) do |p|
10   p.rubyforge_name = 'augment'
11   p.author = 'Phil Hagelberg'
12   p.email = 'technomancy@gmail.com'
13   p.summary = 'Augment is a system for collecting and displaying code metadata.'
14   p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
15   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
16   p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
17   p.extra_deps << ['miniunit', '>= 1.0.1']
18   p.extra_deps << ['json', '>= 1.1.1']
19 end
21 task :publish_html do
22   system("scp html/* technomancy@rubyforge.org:/var/www/gforge-projects/augment/")
23 end
25 task :render_html do
26   FileUtils.cd(File.dirname(__FILE__) + '/html/src/')
27   TEMPLATE = File.read('html.erb')
28   Dir.glob('*html').each do |filename|
29     @title = filename.match(/(.*)\.html/)[1].gsub(/_/, ' ').capitalize
30     @title = "Augment" if @title == 'Index' # edge case!
31     @body = File.read(filename)
32     
33     html = ERB.new(TEMPLATE).result( binding )
34     File.open("../#{filename}", 'w') { |f| f.puts html }
35   end
36 end
38 Spec::Rake::SpecTask.new
40 # vim: syntax=Ruby