lib/onebox/engine/soundcloud_onebox.rb in onebox-1.8.68 vs lib/onebox/engine/soundcloud_onebox.rb in onebox-1.8.69

- old
+ new

@@ -17,19 +17,19 @@ "<img src='#{escaped_src}' #{Helpers.title_attr(oembed_data)}>" end private - def oembed_data - @oembed_data ||= begin - oembed_url = "https://soundcloud.com/oembed.json?url=#{url}" - oembed_url << "&maxheight=166" unless url["/sets/"] - response = Onebox::Helpers.fetch_response(oembed_url) rescue "{}" - Onebox::Helpers.symbolize_keys(::MultiJson.load(response)) - rescue - {} - end + def oembed_data + @oembed_data ||= begin + oembed_url = "https://soundcloud.com/oembed.json?url=#{url}" + oembed_url << "&maxheight=166" unless url["/sets/"] + response = Onebox::Helpers.fetch_response(oembed_url) rescue "{}" + Onebox::Helpers.symbolize_keys(::MultiJson.load(response)) + rescue + {} end + end end end end