Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Update gist files hash to consistently key by filename #457

Merged
merged 1 commit into from
Mar 18, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions lib/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1226,11 +1226,12 @@ def text_html(response, status, head = {})
}

GIST_FILE = {
"size" => 932,
"filename" => "ring.erl",
"raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
"type" => "text/plain",
"language" => "Erlang"
"ring.erl" => {
"size" => 932,
"raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
"type" => "text/plain",
"language" => "Erlang"
}
}

GIST = {
Expand All @@ -1241,7 +1242,7 @@ def text_html(response, status, head = {})
"description" => "description of gist",
"public" => true,
"user" => USER,
"files" => { "ring.erl" => GIST_FILE },
"files" => GIST_FILE,
"comments" => 0,
"comments_url" => "https://api.github.com/gists/#{SecureRandom.hex(10)}/comments/",
"html_url" => "https://gist.github.com/1",
Expand All @@ -1252,7 +1253,7 @@ def text_html(response, status, head = {})
}

FULL_GIST = GIST.merge(GIST_FORKS).merge(GIST_HISTORY)
FULL_GIST["files"] = GIST_FILE.merge({'content' => 'contents of gist'})
FULL_GIST["files"] = {"ring.erl" => GIST_FILE["ring.erl"].merge({"content" => "contents of gist"})}

GIST_COMMENT = {
"id" => 1,
Expand Down
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