<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,10 +24,10 @@ class HamlFormatter &lt; PlanetFormatter
     out['logo'] = string(f.logo) if f.logo
     out['message'] = string(f.message) if f.message
     out['name'] = string(f.name) if f.name
-    out['rights'] = string(f.rights) if f.rights
-    out['subtitle'] = string(f.subtitle) if f.subtitle
-    out['title'] = string(f.title) if f.title
-    out['title_plain'] = plain(f.title) if f.title
+    out['rights'] = string(f.rights) unless f.rights.size == 0
+    out['subtitle'] = string(f.subtitle) unless f.subtitle.size == 0
+    out['title'] = string(f.title) unless f.title.size == 0
+    out['title_plain'] = plain(f.title) unless f.title.size == 0
     out['url'] = string(f.url) if f.url
     return out
   end
@@ -77,7 +77,7 @@ class HamlFormatter &lt; PlanetFormatter
     out['published_822'] = rfc822(e.published) if e.published
     out['published_iso'] = rfc3399(e.published) if e.published
     out['rights'] = string(e.rights) unless e.rights.size == 0
-    out['source'] = string(e.source) if e.source
+    out['source'] = string(e.source.name) if e.source.name
     out['summary_language'] = string(e.summary_detail.language) if e.summary_detail.language rescue nil
     out['title'] = string(e.title) unless e.title.size == 0
     out['title_language'] = string(e.title_detail.language) if e.title_detail.language rescue nil
@@ -199,10 +199,10 @@ class HamlFormatter &lt; PlanetFormatter
     result &lt;&lt; &quot;logo: #{f['logo']}\n&quot; if f['logo']
     result &lt;&lt; &quot;message: #{f['message']}\n&quot; if f['message']
     result &lt;&lt; &quot;name: #{f['name']}\n&quot; if f['name']
-    result &lt;&lt; &quot;rights: #{f['rights']}\n&quot; if f['rights'].length &gt; 0
-    result &lt;&lt; &quot;subtitle: #{f['subtitle']}\n&quot; if f['subtitle'].length &gt; 0
-    result &lt;&lt; &quot;title: #{f['title']}\n&quot; if f['title'].length &gt; 0
-    result &lt;&lt; &quot;title_plain: #{f['title']}\n&quot; if f['title'].length &gt; 0
+    result &lt;&lt; &quot;rights: #{f['rights']}\n&quot; if f['rights']
+    result &lt;&lt; &quot;subtitle: #{f['subtitle']}\n&quot; if f['subtitle']
+    result &lt;&lt; &quot;title: #{f['title']}\n&quot; if f['title']
+    result &lt;&lt; &quot;title_plain: #{f['title']}\n&quot; if f['title']
     result &lt;&lt; &quot;................................\n\n&quot;
     return result
   end</diff>
      <filename>planet/hamlformatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,31 +9,33 @@ H_FILES.map! {|name| name.index('.') ? name : name+&quot;.xml&quot;}
 H_TESTS = H_FILES.map {|arg| Dir[File.join('test/data/filter',arg)]}
 
 # test cases are in Python syntax, convert to something that eval will accept
-def python2ruby(expr, source)
-  # unicode strings
-  expr.gsub! &quot; u'&quot;, &quot; '&quot;
-  expr.gsub! ' u&quot;', ' &quot;'
+class TestCaseConverter
+  def self.python2ruby(expr, source)
+    # unicode strings
+    expr.gsub! &quot; u'&quot;, &quot; '&quot;
+    expr.gsub! ' u&quot;', ' &quot;'
 
-  # triple strings
-  expr.gsub! /&quot;&quot;&quot;(.*?)&quot;&quot;&quot;/, '%q{\1}'
+    # triple strings
+    expr.gsub! /&quot;&quot;&quot;(.*?)&quot;&quot;&quot;/, '%q{\1}'
 
-  # dict to hash
-  expr.gsub! &quot;': '&quot;, &quot;' =&gt; '&quot;
+    # dict to hash
+    expr.gsub! &quot;': '&quot;, &quot;' =&gt; '&quot;
 
-  # const to variable
-  expr.gsub! &quot;Items[&quot;, &quot;items[&quot;
-  expr.gsub! &quot;Channels[&quot;, &quot;channels[&quot;
+    # const to variable
+    expr.gsub! &quot;Items[&quot;, &quot;items[&quot;
+    expr.gsub! &quot;Channels[&quot;, &quot;channels[&quot;
 
-  # true
-  expr = &quot;true&quot; if expr == &quot;1&quot;
+    # true
+    expr = &quot;true&quot; if expr == &quot;1&quot;
 
-  # differences in XML/URI serializations
-  name = source.split('/').last.split('.').first
-  expr.sub!('&amp;quot;','%22') if name == 'missing_quote_in_attr'
-  expr.sub! '&amp;gt;', '&gt;' if name == 'tag_in_attr'
-  expr.gsub!('&quot;', &quot;\\\\'&quot;).gsub!('&amp;quot;','&quot;') if name == 'quote_in_attr'
+    # differences in XML/URI serializations
+    name = source.split('/').last.split('.').first
+    expr.sub!('&amp;quot;','%22') if name == 'missing_quote_in_attr'
+    expr.sub! '&amp;gt;', '&gt;' if name == 'tag_in_attr'
+    expr.gsub!('&quot;', &quot;\\\\'&quot;).gsub!('&amp;quot;','&quot;') if name == 'quote_in_attr'
 
-  expr
+    expr
+  end
 end
 
 require 'planet/formatter'
@@ -59,7 +61,7 @@ class HamlTestCase &lt; Test::Unit::TestCase
       case testdata
         # for .xml files
         when /Description:\s*(.*?)\s*Expect:\s*(.*)\s*/
-          desc = python2ruby($2, file)
+          desc = TestCaseConverter.python2ruby($2, file)
           doc = Planet.harvest(file)
           output = HamlFormatter.new.haml_info(doc)
           channels = output['channels']
@@ -67,9 +69,9 @@ class HamlTestCase &lt; Test::Unit::TestCase
 
         # for .ini files... any xml will do
         when /Description:\s*(.*?)\s*; Expect:\s*(.*)\s*/
-          desc = python2ruby($2, file)
+          desc = TestCaseConverter.python2ruby($2, file)
           Planet.config.read file
-          doc = Planet.harvest('test/data/filter/haml/new_channel.xml')
+          doc = Planet.harvest('test/data/filter/haml/id.xml')
           output = HamlFormatter.new.haml_info(doc)
  
           # copy haml hash to environment</diff>
      <filename>test/haml.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,7 @@ feed_timeout = 30
 # items_per_page: How many items to put on each page
 template_files = index.html.haml validate.html.xslt atom.xml.xslt rss10.xml.haml
 items_per_page = 50
-date_format = &quot;%a %b $d $H:%M:%S %Y&quot;
+date_format = &quot;%a %b %d %H:%M:%S %Y&quot;
 new_date_format = &quot;%A, %d %B %Y&quot;
 filters = foo
 </diff>
      <filename>themes/intertwingly/basic.ini</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4a78accbadeaadb4f580f186baae6dc82e4ececb</id>
    </parent>
    <parent>
      <id>f09cbe485c4ded878a85ae29e47775468404c307</id>
    </parent>
  </parents>
  <author>
    <name>Sam Ruby</name>
    <email>rubys@intertwingly.net</email>
  </author>
  <url>http://github.com/rubys/mars/commit/6c3227414c1c3157eaf93ecf6edd7aff67b36fd5</url>
  <id>6c3227414c1c3157eaf93ecf6edd7aff67b36fd5</id>
  <committed-date>2008-09-28T17:36:29-07:00</committed-date>
  <authored-date>2008-09-28T17:36:29-07:00</authored-date>
  <message>Merge branch 'master' of git://github.com/joshu/mars</message>
  <tree>9c62e48fb58400a16f653999092cda2e8da5f6d5</tree>
  <committer>
    <name>Sam Ruby</name>
    <email>rubys@intertwingly.net</email>
  </committer>
</commit>
