module Onebox module Engine class GfycatOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/gfycat\.com\//) always_https def to_html oembed = get_oembed src = Nokogiri::HTML::fragment(oembed[:html]).at_css("iframe")["src"] escaped_src = ::Onebox::Helpers.normalize_url_for_output(src) <<-HTML HTML end def placeholder_html og = get_opengraph escaped_src = ::Onebox::Helpers.normalize_url_for_output(og[:image]) <<-HTML HTML end end end end