aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Yepishev <roman.yepishev@ubuntu.com>2012-02-20 23:45:07 +0200
committerRoman Yepishev <roman.yepishev@ubuntu.com>2012-02-20 23:45:07 +0200
commitef8392e2670d5eeac535ba89267d4505dd23b1cb (patch)
treea88b9c0ae70802bba76148bddc16c54a37cfc3fa
parenta8c9fb8d7a8847c0752599aa611d5718ec901ccb (diff)
downloadmy_new_personal_website-ef8392e2670d5eeac535ba89267d4505dd23b1cb.tar.xz
my_new_personal_website-ef8392e2670d5eeac535ba89267d4505dd23b1cb.zip
Raise RuntimeError when gist is unavailable
-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 74dd3b37..f6ebbb30 100644
--- a/plugins/gist_tag.rb
+++ b/plugins/gist_tag.rb
@@ -82,6 +82,9 @@ module Jekyll
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new raw_uri.request_uri
data = https.request request
+ if 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