From cb4e5fca00fef6afc3f5de1c59a00c2abcce0a69 Mon Sep 17 00:00:00 2001 From: Juanje Ojeda Date: Mon, 25 Jul 2011 06:00:40 +0200 Subject: [PATCH] fix: removed the nested commit object at the single commit --- lib/ruby-github.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ruby-github.rb b/lib/ruby-github.rb index 90bb1ef..2f7cb45 100644 --- a/lib/ruby-github.rb +++ b/lib/ruby-github.rb @@ -28,7 +28,8 @@ def self.repository(user,repository) # Fetches a single commit for a repository. def self.commit(user,repository,commit) url = BASE_URL + "/#{user}/#{repository}/commit/#{commit}" - GitHub::Commit.new(JSON.parse(open(url).read).merge(:user => user, :repository => repository)) + commit = JSON.parse(open(url).read)["commit"] + GitHub::Commit.new(commit.merge(:user => user, :repository => repository)) end end