2
2
require 'yajl/json_gem'
3
3
require 'stringio'
4
4
require 'cgi'
5
+ require 'securerandom'
5
6
6
7
module GitHub
7
8
module Resources
@@ -677,7 +678,7 @@ def text_html(response, status, head = {})
677
678
GIST_HISTORY = {
678
679
"history" => [
679
680
{
680
- "url" => "https://api.github.com/gists/1/57a7f021a713b1c5a6a199b54cc514735d2d462f " ,
681
+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } " ,
681
682
"version" => "57a7f021a713b1c5a6a199b54cc514735d2d462f" ,
682
683
"user" => USER ,
683
684
"change_status" => {
@@ -690,11 +691,12 @@ def text_html(response, status, head = {})
690
691
]
691
692
}
692
693
694
+
693
695
GIST_FORKS = {
694
696
"forks" => [
695
697
{
696
698
"user" => USER ,
697
- "url" => "https://api.github.com/gists/5 " ,
699
+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } " ,
698
700
"created_at" => "2011-04-14T16:00:49Z"
699
701
}
700
702
]
@@ -707,7 +709,7 @@ def text_html(response, status, head = {})
707
709
}
708
710
709
711
GIST = {
710
- "url" => "https://api.github.com/gists/1 " ,
712
+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } " ,
711
713
"id" => "1" ,
712
714
"description" => "description of gist" ,
713
715
"public" => true ,
@@ -725,7 +727,7 @@ def text_html(response, status, head = {})
725
727
726
728
GIST_COMMENT = {
727
729
"id" => 1 ,
728
- "url" => "https://api.github.com/gists/comments/1" ,
730
+ "url" => "https://api.github.com/gists/#{ SecureRandom . hex ( 10 ) } / comments/1" ,
729
731
"body" => "Just commenting for the sake of commenting" ,
730
732
"user" => USER ,
731
733
"created_at" => "2011-04-18T23:23:56Z"