<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,38 +6,35 @@ require 'rss/maker'
 require 'net/http'
 require 'rack'
 
-class HackerNews
-  def call(env)
-    blog = Hpricot.parse(Net::HTTP.get(URI.parse('http://news.ycombinator.com')))
-    main_table = (blog / 'td').find {|td| td.attributes['class'] == 'title' }.parent.parent
-    
-    feed = RSS::Maker.make('1.0') do |rss|
-      rss.channel.about         = &quot;Hacker News&quot;
-      rss.channel.title         = &quot;Hacker News&quot;
-      rss.channel.description   = &quot;Hacker News&quot;
-      rss.channel.link          = &quot;http://news.ycombinator.com&quot;
-      (main_table / 'tr td.title a').each do |link|
-        next if link.attributes['rel'] == 'nofollow'
-        item              = rss.items.new_item
-        item.author       = (link.parent.parent.next_sibling / 'td a').first.inner_text
-        comments_link     = (link.parent.parent.next_sibling / 'td a').last.attributes['href']
-        comments_number   = (link.parent.parent.next_sibling / 'td a').last.inner_text.split.first
-        item.title        = link.inner_text
-        item.link         = link.attributes['href'] =~ /^http/ ? link.attributes['href'] : &quot;http://news.ycombinator.com/#{link.attributes['href']}&quot;
-        article_cache     = File.join(File.dirname(__FILE__), 'cache', item.link.gsub(/:|\/|=|&amp;|\[|\]|\?/, '_'))
-        if File.exist?(article_cache)
-          article = File.read(article_cache)
-        else
-          article = `links -dump #{item.link}`
-          File.open(article_cache, 'w') {|f| f.write article }
-        end
-        item.description  = &quot; &lt;pre&gt;#{article} &lt;/pre&gt;&lt;p&gt;&lt;a href='#{comments_link}'&gt;#{comments_number} Comments&lt;/a&gt;&lt;/p&gt;&quot;
+news = lambda do |env|
+  blog = Hpricot.parse(Net::HTTP.get(URI.parse('http://news.ycombinator.com')))
+  main_table = (blog / 'td').find {|td| td.attributes['class'] == 'title' }.parent.parent
+  
+  feed = RSS::Maker.make('1.0') do |rss|
+    rss.channel.about         = &quot;Hacker News&quot;
+    rss.channel.title         = &quot;Hacker News&quot;
+    rss.channel.description   = &quot;Hacker News&quot;
+    rss.channel.link          = &quot;http://news.ycombinator.com&quot;
+    (main_table / 'tr td.title a').each do |link|
+      next if link.attributes['rel'] == 'nofollow'
+      item              = rss.items.new_item
+      item.author       = (link.parent.parent.next_sibling / 'td a').first.inner_text
+      comments_link     = (link.parent.parent.next_sibling / 'td a').last.attributes['href']
+      comments_number   = (link.parent.parent.next_sibling / 'td a').last.inner_text.split.first
+      item.title        = link.inner_text
+      item.link         = link.attributes['href'] =~ /^http/ ? link.attributes['href'] : &quot;http://news.ycombinator.com/#{link.attributes['href']}&quot;
+      article_cache     = File.join(File.dirname(__FILE__), 'cache', item.link.gsub(/:|\/|=|&amp;|\[|\]|\?/, '_'))
+      if File.exist?(article_cache)
+        article = File.read(article_cache)
+      else
+        article = `links -dump #{item.link}`
+        File.open(article_cache, 'w') {|f| f.write article }
       end
-    end.to_s
-
-    [200, {&quot;Content-Type&quot;=&gt;&quot;text/xml&quot;}, feed]
-  end
+      item.description  = &quot; &lt;pre&gt;#{article} &lt;/pre&gt;&lt;p&gt;&lt;a href='#{comments_link}'&gt;#{comments_number} Comments&lt;/a&gt;&lt;/p&gt;&quot;
+    end
+  end.to_s
 
+  [200, {&quot;Content-Type&quot;=&gt;&quot;text/xml&quot;}, feed]
 end
 
-Rack::Handler::Mongrel.run(HackerNews.new, {:Host =&gt; &quot;127.0.0.1&quot;, :Port =&gt; 7025})
+Rack::Handler::Mongrel.run(news, {:Host =&gt; &quot;127.0.0.1&quot;, :Port =&gt; 7025})</diff>
      <filename>hackernews.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>65adb49daed40bd7138798310780c2e51ba79d79</id>
    </parent>
  </parents>
  <author>
    <name>Jack Danger Canty</name>
    <email>git@6brand.com</email>
  </author>
  <url>http://github.com/JackDanger/hacker_news/commit/bdfaf91fbc087c36e0dea0a6fbc430634ddcaa6a</url>
  <id>bdfaf91fbc087c36e0dea0a6fbc430634ddcaa6a</id>
  <committed-date>2008-04-21T14:18:06-07:00</committed-date>
  <authored-date>2008-04-21T14:18:06-07:00</authored-date>
  <message>Returning to the bare-lambda version</message>
  <tree>c8fa362ddbd15d9d2e36fe7d105f0832d959dcf5</tree>
  <committer>
    <name>Jack Danger Canty</name>
    <email>git@6brand.com</email>
  </committer>
</commit>
