aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorParker Moore <parkrmoore@gmail.com>2013-03-05 14:37:08 -0800
committerParker Moore <parkrmoore@gmail.com>2013-03-05 14:37:08 -0800
commit51905b6a90b55c5293d346667ebe16fadae99537 (patch)
treebbf7ace0d3dab69e994de457b0638345624d8d44 /plugins
parentf4f42823f687e840c65fdeab0c35d26d442835f7 (diff)
parent7ebc0a0d8b0cf276d5de4b51c823a4ee82710484 (diff)
downloadmy_new_personal_website-51905b6a90b55c5293d346667ebe16fadae99537.tar.xz
my_new_personal_website-51905b6a90b55c5293d346667ebe16fadae99537.zip
Merge pull request #438 from roman-yepishev/gist_error
Raise RuntimeError when gist is unavailable - #437
Diffstat (limited to '')
-rw-r--r--plugins/gist_tag.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/gist_tag.rb b/plugins/gist_tag.rb
index 5f590e96..43e7eb0a 100644
--- a/plugins/gist_tag.rb
+++ b/plugins/gist_tag.rb
@@ -84,6 +84,9 @@ module Jekyll
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new raw_uri.request_uri
data = https.request request
+ if Integer(data.code) != 200
+ raise RuntimeError, "Gist replied with #{data.code} for #{gist_url}"
+ end
data = data.body
cache gist, file, data unless @cache_disabled
data