lib/oembed_proxy/tableau.rb in oembed_proxy-0.1.4 vs lib/oembed_proxy/tableau.rb in oembed_proxy-0.2.0
- old
+ new
@@ -5,11 +5,11 @@
module OembedProxy
# Tableau Fauxembed
class Tableau
using InactiveSupport
- TABLEAU_REGEX = %r{\Ahttps://public\.tableau\.com/(?:profile/[^/]+/vizhome|views)/([^?]+)}
+ TABLEAU_REGEX = %r{\Ahttps://public\.tableau\.com/(?:profile/[^/]+/vizhome|views)/([^?]+)}.freeze
def handles_url?(url)
!TABLEAU_REGEX.match(url).nil?
end
@@ -24,10 +24,10 @@
'version' => '1.0',
'provider_name' => 'Tableau',
'provider_url' => 'https://tableau.com/',
'width' => 500,
'height' => 500,
- 'html' => <<~HTML
+ 'html' => <<~HTML,
<div id="#{div_id}"></div>
<script type="text/javascript" src="https://public.tableau.com/javascripts/api/tableau-2.min.js"></script>
<script type="text/javascript">
(function() {
var container = document.getElementById('#{div_id}');