<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/fixtures/github_commits_array.json</filename>
    </added>
    <added>
      <filename>spec/fixtures/github_commits_hash.json</filename>
    </added>
    <added>
      <filename>spec/github-campfire_spec.rb</filename>
    </added>
    <added>
      <filename>spec/spec_helper.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -19,7 +19,16 @@ class GithubCampfire
     @repo = payload[&quot;repository&quot;][&quot;name&quot;]
     
     @room = connect(@repo)
-    payload[&quot;commits&quot;].sort_by { |id,c| c[&quot;timestamp&quot;] }.each { |id,c| process_commit(c) }
+    commits = payload[&quot;commits&quot;]
+    if commits.is_a?(Hash)
+      # old-style github commits object, convert to array
+      commits = commits.map do |id,c|
+        c[&quot;id&quot;] = id
+        c
+      end
+    end
+    
+    commits.sort_by { |c| c[&quot;timestamp&quot;] }.each { |c| process_commit(c) }
   end
   
   def settings(repo=@repo)</diff>
      <filename>lib/github-campfire.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7f70dfb8682abb97183ed8400b75c2c3b142831c</id>
    </parent>
  </parents>
  <author>
    <name>Brian Donovan</name>
    <email>brian.donovan@gmail.com</email>
  </author>
  <url>http://github.com/jnewland/github-campfire/commit/7c141a6a2a7868c8c812ddc8332db16c056d4236</url>
  <id>7c141a6a2a7868c8c812ddc8332db16c056d4236</id>
  <committed-date>2008-07-24T10:44:30-07:00</committed-date>
  <authored-date>2008-07-24T10:44:30-07:00</authored-date>
  <message>Handle new-style github payloads with commits as an array.</message>
  <tree>7150bc873e8a56050d9bb436c55cad43e461d448</tree>
  <committer>
    <name>Brian Donovan</name>
    <email>brian.donovan@gmail.com</email>
  </committer>
</commit>
