require 'rubygems' require 'atchoum' require 'utils' class Code < Atchoum::Website include Utils COMMENTS = %Q(Hi and bienvenu to my top secret code repository. You'll find here a couple of projects I've created in the past years. You'll also find projects I've given to other bigger and better projects. All code provided here is under some open source license specified in the project doc, somewhere. Feel free to contact me at macournoyer_AT_yahoo.ca if you have any questions about my projects. I'm always pleased by some feedback, suggestions, comments, patch or talk! But, please, take off your shoes before entering, I just cleaned up!) def layout html do head do title "Marc-André Cournoyer's repo" tag! :link, :rel => "stylesheet", :href => "stylesheets/code.css", :type => "text/css" end body do self << yield stats end end end def index_page div.header! do h1 do code do a.string "%Q(Marc-André Cournoyer's)", :href => 'http://macournoyer.com' span ' => ' a.symbol ':repo', :href => 'http://code.macournoyer.com/svn/' end end div.container do code.comments do COMMENTS.split("\n").each do |line| text '# ' + line; br end end end end div.content! :class => :container do h2 'Active projects' ul.projects do project 'Thin', 'The fastest Ruby web server out there', :website => 'http://code.macournoyer.com/thin/', :group => 'http://groups.google.com/group/thin-ruby/', :git => 'http://github.com/macournoyer/thin/', :home => :website project 'RefactorMyCode', 'Community driven refactoring site', :about => 'http://macournoyer.wordpress.com/2007/09/26/refactor-my-code/', :website => 'http://refactormycode.com', :home => :website project 'Gravatar plugin', 'Rails plugin to cache "Gravatars":http://site.gravatar.com', :svn => 'http://code.macournoyer.com/svn/plugins/gravatar_cache/', :about => 'http://macournoyer.wordpress.com/2007/10/17/gravatar-caching-plugin/', :home => :about project 'Defensio plugin', 'Rails plugin to "Defensio":http://defensio.com API', :doc => 'http://code.macournoyer.com/defensio/', :svn => 'http://code.macournoyer.com/svn/plugins/defensio', :about => 'http://macournoyer.wordpress.com/2007/09/11/defensio-on-rails/', :home => :about project 'Linkr', '"reddit":http://reddit.com/ clone in 400 LOC', :svn => 'http://code.macournoyer.com/svn/linkr/trunk', :about => 'http://macournoyer.wordpress.com/2007/06/26/linkr-the-host-it-yourself-link-sharing-site/', :home => :about project 'Atchoum', 'Static website framework with ' + '"Markaby":http://markaby.rubyforge.org ' + 'and integrated web server support', :website => 'http://code.macournoyer.com/atchoum/', :svn => 'http://code.macournoyer.com/svn/atchoum/trunk/', :doc => 'http://code.macournoyer.com/atchoum/rdoc/', :home => :website end h2 'Not so active projects' ul.projects do project 'InactiveRecord', 'Mocking framework for ActiveRecord', :svn => 'http://code.macournoyer.com/svn/plugins/inactive_record', :readme => 'http://code.macournoyer.com/svn/plugins/inactive_record/README', :home => :readme project 'Donebox', 'The best to-do list manager *ever*', :website => 'http://donebox.com/', :svn => 'http://code.macournoyer.com/svn/donebox/trunk', :about => 'http://macournoyer.wordpress.com/2007/07/30/me-rain-sleep-girlfriend-donebox/', :home => :website project 'Scout', '"Campfire":http://campfirenow.com chat bot', :svn => 'http://code.macournoyer.com/svn/scout/trunk/', :home => :svn project 'OpenKiwi', 'Web chat service', :website => 'http://openkiwi.com/', :home => :website project 'Migrator', 'Database migration for .NET. Based on ActiveRecord ' + '"Migration":http://www.rubyonrails.org/' + 'api/classes/ActiveRecord/Migration.html ' + 'now maintained by Nick Hemsley', :website => 'http://code.google.com/p/migratordotnet/', :home => :wiki project 'zurly', 'High speed link sharing', :website => 'http://zurly.com/', :home => :website project 'NProject', '"Trac-like":http://trac.edgewall.org/ ' + 'project and content management system', :svn => 'http://nproject.svn.sourceforge.net/viewvc/' + 'nproject/NProject/trunk/', :wiki => 'http://nproject.castleproject.org', :feed => 'http://sourceforge.net/export/' + 'rss2_projnews.php?group_id=165296', :home => :wiki project 'Generator', 'The ultimate code generator. Now part of the ' + '"Castle project":http://www.castleproject.org', :svn => 'http://svn.castleproject.org:8080/svn/' + 'castle/trunk/Tools/Generator', :wiki => 'http://wiki.castleproject.org/index.php/Generator', :forum => 'http://forum.castleproject.org/viewforum.php?f=13', :issues => 'http://support.castleproject.org/secure/' + 'IssueNavigator.jspa?reset=true&mode=hide&pid=10030' + '&sorter/order=DESC&sorter/field=priority&' + 'resolution=-1&component=10070', :home => :wiki project 'WebAccept', 'An XML based testing framework', :svn => 'http://webaccept.cvs.sourceforge.net/webaccept/', :website => 'http://webaccept.sourceforge.net/', :feed => 'http://sourceforge.net/export/' + 'rss2_projnews.php?group_id=153671', :home => :website project 'ASP Commenter', 'A comment extractor NAnt task for ASP code', :svn => 'http://code.macournoyer.com/svn/asp_commenter/', :home => :svn end end div.footer! do text 'Copyright © 2007 ' a 'Marc-André Cournoyer', :href => 'mailto:macournoyer@yahoo.ca' end end private def project(name, desc, links={}) links.each do |title, href| links[title] = links[href] if href.is_a? Symbol end li.project do div.logo do a :href => links[:home] do img :src => "images/#{name.downcase.gsub(' ', '_')}.gif" end end h3 { a name, :href => links[:home] } red desc ul.links do c = 'first' links.each do |title, href| li(:class => c) { a title.to_s, :href => href } if href && title != :home c = '' end end end end end