Skip to content

Commit f875a09

Browse files
committed
stop modifying a shared hash
1 parent 8915c08 commit f875a09

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

lib/resources.rb

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -692,14 +692,10 @@ def text_html(response, status, head = {})
692692
]
693693
}
694694

695-
GIST_FILES = {
696-
"files" => {
697-
"ring.erl" => {
698-
"size" => 932,
699-
"filename" => "ring.erl",
700-
"raw_url" => "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
701-
}
702-
}
695+
GIST_FILE = {
696+
"size" => 932,
697+
"filename" => "ring.erl",
698+
"raw_url" => "https://gist.github.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
703699
}
704700

705701
GIST = {
@@ -708,16 +704,16 @@ def text_html(response, status, head = {})
708704
"description" => "description of gist",
709705
"public" => true,
710706
"user" => USER,
711-
"files" => GIST_FILES,
707+
"files" => { "ring.erl" => GIST_FILE },
712708
"comments" => 0,
713709
"html_url" => "https://gist.github.com/1",
714710
"git_pull_url" => "git://gist.github.com/1.git",
715711
"git_push_url" => "git@gist.github.com:1.git",
716712
"created_at" => "2010-04-14T02:15:15Z"
717713
}
718714

719-
FULL_GIST = GIST.merge(GIST_FORKS).merge(GIST_HISTORY).merge(GIST_FILES)
720-
FULL_GIST['files']['ring.erl']['content'] = 'contents of gist'
715+
FULL_GIST = GIST.merge(GIST_FORKS).merge(GIST_HISTORY)
716+
FULL_GIST['files'].merge('ring.erl' => GIST_FILE.merge('content' => 'contents of gist'))
721717

722718
GIST_COMMENT = {
723719
"id" => 1,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy