Browse Source

Raise RuntimeError when gist is unavailable

unreleased_contents
Roman Yepishev 13 years ago
parent
commit
ef8392e267
  1. 3
      plugins/gist_tag.rb

3
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

Loading…
Cancel
Save