Add new `max_width` feature for oneboxes. Allows vimeo oneboxes to not

look like total garbage.
This commit is contained in:
Robin Ward 2014-06-05 13:17:56 -04:00
parent c46b7f6181
commit 7bb33c28c2
2 changed files with 2 additions and 2 deletions

View File

@ -213,7 +213,7 @@ GEM
omniauth-twitter (1.0.1) omniauth-twitter (1.0.1)
multi_json (~> 1.3) multi_json (~> 1.3)
omniauth-oauth (~> 1.0) omniauth-oauth (~> 1.0)
onebox (1.3.4) onebox (1.3.5)
hexpress (~> 1.2) hexpress (~> 1.2)
moneta (~> 0.7) moneta (~> 0.7)
multi_json (~> 1.7) multi_json (~> 1.7)

View File

@ -122,7 +122,7 @@ module Oneboxer
# This might be able to move to whenever the SiteSetting changes? # This might be able to move to whenever the SiteSetting changes?
Oneboxer.add_discourse_whitelists Oneboxer.add_discourse_whitelists
r = Onebox.preview(url, cache: {}) r = Onebox.preview(url, cache: {}, max_width: 695)
{ {
onebox: r.to_s, onebox: r.to_s,
preview: r.try(:placeholder_html).to_s preview: r.try(:placeholder_html).to_s