diff options
author | Parker Moore <parkrmoore@gmail.com> | 2013-03-05 14:37:08 -0800 |
---|---|---|
committer | Parker Moore <parkrmoore@gmail.com> | 2013-03-05 14:37:08 -0800 |
commit | 51905b6a90b55c5293d346667ebe16fadae99537 (patch) | |
tree | bbf7ace0d3dab69e994de457b0638345624d8d44 /plugins | |
parent | f4f42823f687e840c65fdeab0c35d26d442835f7 (diff) | |
parent | 7ebc0a0d8b0cf276d5de4b51c823a4ee82710484 (diff) | |
download | my_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 'plugins')
-rw-r--r-- | plugins/gist_tag.rb | 3 |
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 |