mirror of https://github.com/mastodon/goldfinger
Catch XML syntax errors
This commit is contained in:
parent
868cfbe0d8
commit
3fae9826cf
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
goldfinger (1.0.4)
|
||||
goldfinger (1.0.5)
|
||||
addressable (~> 2.4)
|
||||
http (~> 2.0)
|
||||
nokogiri (~> 1.6)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Gem::Specification.new do |s|
|
||||
s.name = 'goldfinger'
|
||||
s.version = '1.0.4'
|
||||
s.version = '1.0.5'
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.required_ruby_version = '>= 2.0.0'
|
||||
s.date = '2016-02-17'
|
||||
|
|
|
@ -47,6 +47,8 @@ module Goldfinger
|
|||
raise Goldfinger::NotFoundError if links.empty?
|
||||
|
||||
links.first.attribute('template').value.gsub('{uri}', @uri)
|
||||
rescue Nokogiri::XML::XPath::SyntaxError
|
||||
raise Goldfinger::Error, 'Bad XML'
|
||||
end
|
||||
|
||||
def domain
|
||||
|
|
Loading…
Reference in New Issue