<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/fixtures/hatom_without_author.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -54,7 +54,13 @@ class HEntry &lt; Microformat
 
   def add_in_parent_hcard
     @properties &lt;&lt; 'author'
-    @author = self.class.find_in_parent_hcard
+    @author = in_parent_hcard
+  end
+
+  # Per spec: if the entry author is missing find the nearest in
+  # parent &lt;address&gt; element(s) with class name author
+  def in_parent_hcard
+    @in_parent_hcard ||= self.class.find_in_parent_hcard
   end
 
   class &lt;&lt; self
@@ -64,11 +70,10 @@ class HEntry &lt; Microformat
       hentry
     end
 
-    # Per spec: if the entry author is missing find the nearest in
-    # parent &lt;address&gt; element(s) with class name author
     def find_in_parent_hcard
-      @in_parent_hcard ||= prepare_value(HCard.find(
-        :text =&gt; (@doc/&quot;//.hentry/../address.vcard&quot;).to_s))
+      author = HCard.find(:text =&gt; (@doc/&quot;//.hentry/..//address.vcard&quot;).to_s)
+      raise InvalidMicroformat if @options[:strict] &amp;&amp; author.empty?
+      prepare_value(author)
     end
   end
 end</diff>
      <filename>lib/mofo/hentry.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,13 @@ context &quot;A parsed hEntry object&quot; do
                              :base =&gt; 'http://journal.redflavor.com')
     with_parent.author.should.be.an.instance_of HCard
     with_parent.author.fn.should.equal &quot;Eivind Uggedal&quot;
+    with_parent.author.url.should.equal &quot;http://redflavor.com&quot;
+  end
+
+  specify &quot;should be invalid without any author in strict mode&quot; do
+    proc { HEntry.find(:first =&gt; fixture(:hatom_without_author),
+                       :base =&gt; 'http://bogus.redflavor.com',
+                       :strict =&gt; true) }.should.raise InvalidMicroformat
   end
 
   specify &quot;should have content&quot; do</diff>
      <filename>test/hatom_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c25faa0e5f7fa7dbf5cc93fde9c20ec888ab0fb5</id>
    </parent>
  </parents>
  <author>
    <name>Eivind Uggedal</name>
    <email>eu@redflavor.com</email>
  </author>
  <url>http://github.com/uggedal/mofo/commit/70d22bd059e417b30b2f85e8575077febdee9dd5</url>
  <id>70d22bd059e417b30b2f85e8575077febdee9dd5</id>
  <committed-date>2008-01-27T05:30:50-08:00</committed-date>
  <authored-date>2008-01-27T05:27:33-08:00</authored-date>
  <message>hentry invalid without author. in_parent_hcard object instance instead of
class instance. address node need not be child of parent but can be descendant.</message>
  <tree>82530f6054dd4a9216e94f639eb27ee763418578</tree>
  <committer>
    <name>Eivind Uggedal</name>
    <email>eu@redflavor.com</email>
  </committer>
</commit>
