22require 'yajl/json_gem'
33require 'stringio'
44require 'cgi'
5+ require 'securerandom'
56
67module GitHub
78module Resources
@@ -677,7 +678,7 @@ def text_html(response, status, head = {})
677678GIST_HISTORY = {
678679"history" => [
679680{
680- "url" => "https://api.github.com/gists/1/57a7f021a713b1c5a6a199b54cc514735d2d462f " ,
681+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } " ,
681682"version" => "57a7f021a713b1c5a6a199b54cc514735d2d462f" ,
682683"user" => USER ,
683684"change_status" => {
@@ -690,11 +691,12 @@ def text_html(response, status, head = {})
690691]
691692}
692693
694+
693695GIST_FORKS = {
694696"forks" => [
695697{
696698"user" => USER ,
697- "url" => "https://api.github.com/gists/5 " ,
699+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } " ,
698700"created_at" => "2011-04-14T16:00:49Z"
699701}
700702]
@@ -707,7 +709,7 @@ def text_html(response, status, head = {})
707709}
708710
709711GIST = {
710- "url" => "https://api.github.com/gists/1 " ,
712+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } " ,
711713"id" => "1" ,
712714"description" => "description of gist" ,
713715"public" => true ,
@@ -725,7 +727,7 @@ def text_html(response, status, head = {})
725727
726728GIST_COMMENT = {
727729"id" => 1 ,
728- "url" => "https://api.github.com/gists/comments/1" ,
730+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } / comments/1" ,
729731"body" => "Just commenting for the sake of commenting" ,
730732"user" => USER ,
731733"created_at" => "2011-04-18T23:23:56Z"