Sha256: 0d3e5511a2f48de807f1ce8d53c80792a074338fb6ad192c9722b9dc8de6f90f

Contents?: true

Size: 882 Bytes

Versions: 5

Compression:

Stored size: 882 Bytes

Contents

AutoHtml.add_filter(:vimeo).with(:width => 440, :height => 248) do |text, options|
  text.gsub(/http:\/\/(www.)?vimeo\.com\/([A-Za-z0-9._%-]*)((\?|#)\S+)?/) do
    vimeo_id = $2
    %{<object width="#{options[:width]}" height="#{options[:height]}"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=#{vimeo_id}&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=#{vimeo_id}&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="#{options[:width]}" height="#{options[:height]}"></embed></object>}    
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
dejan-auto_html-1.1.0 lib/auto_html/filters/vimeo.rb
dejan-auto_html-1.1.1 lib/auto_html/filters/vimeo.rb
dejan-auto_html-1.1.2 lib/auto_html/filters/vimeo.rb
dejan-auto_html-1.2.0 lib/auto_html/filters/vimeo.rb
auto_html-1.2.0 lib/auto_html/filters/vimeo.rb