lib/onebox/engine/wikimedia_onebox.rb in onebox-2.2.12 vs lib/onebox/engine/wikimedia_onebox.rb in onebox-2.2.13
- old
+ new
@@ -5,11 +5,11 @@
class WikimediaOnebox
include Engine
include LayoutSupport
include JSON
- matches_regexp /^https?:\/\/commons\.wikimedia\.org\/wiki\/(File:.+)/
+ matches_regexp(/^https?:\/\/commons\.wikimedia\.org\/wiki\/(File:.+)/)
always_https
def self.priority
# Wikimedia links end in an image extension.
# E.g. https://commons.wikimedia.org/wiki/File:Stones_members_montage2.jpg
@@ -36,9 +36,8 @@
title: first_page['title'],
image: first_page['imageinfo'].first['url'],
thumbnail: first_page['imageinfo'].first['thumburl']
}
end
-
end
end
end