Skip to content

Commit

Permalink
added event id's
Browse files Browse the repository at this point in the history
  • Loading branch information
Wynn Netherland committed Dec 13, 2009
1 parent 841be65 commit 69585e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/octopussy/event.rb
Expand Up @@ -6,7 +6,8 @@ def self.load_from_atom(entry)

event = Hashie::Mash.new({:user => entry.author})
event.published = (entry.published.is_a?(String) ? DateTime.parse(entry.published) : entry.published)

event.id = entry.id.split("/").pop.to_i

case entry.id
when /CreateEvent/
case entry.title
Expand Down
1 change: 1 addition & 0 deletions test/test_octopussy.rb
Expand Up @@ -410,6 +410,7 @@ class TestOctopussy < Test::Unit::TestCase
event.user.should == 'pengwynn'
event.published.year.should == 2009
event.published.month.should == 12
event.id.should == 110645788
end

should "should create a create_repo event from an atom entry" do
Expand Down

0 comments on commit 69585e0

Please sign in to comment.