onebox 2.2.12 → 2.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +0 -4
- data/lib/onebox/engine.rb +7 -11
- data/lib/onebox/engine/allowlisted_generic_onebox.rb +11 -18
- data/lib/onebox/engine/amazon_onebox.rb +26 -17
- data/lib/onebox/engine/asciinema_onebox.rb +0 -1
- data/lib/onebox/engine/audioboom_onebox.rb +5 -2
- data/lib/onebox/engine/bandcamp_onebox.rb +8 -8
- data/lib/onebox/engine/cloudapp_onebox.rb +12 -12
- data/lib/onebox/engine/coub_onebox.rb +0 -1
- data/lib/onebox/engine/facebook_media_onebox.rb +8 -7
- data/lib/onebox/engine/five_hundred_px_onebox.rb +0 -1
- data/lib/onebox/engine/flickr_onebox.rb +14 -15
- data/lib/onebox/engine/gfycat_onebox.rb +26 -26
- data/lib/onebox/engine/giphy_onebox.rb +0 -1
- data/lib/onebox/engine/github_blob_onebox.rb +4 -0
- data/lib/onebox/engine/github_commit_onebox.rb +13 -16
- data/lib/onebox/engine/github_folder_onebox.rb +1 -1
- data/lib/onebox/engine/github_gist_onebox.rb +1 -2
- data/lib/onebox/engine/github_issue_onebox.rb +16 -18
- data/lib/onebox/engine/github_pullrequest_onebox.rb +7 -4
- data/lib/onebox/engine/gitlab_blob_onebox.rb +4 -0
- data/lib/onebox/engine/google_calendar_onebox.rb +1 -1
- data/lib/onebox/engine/google_docs_onebox.rb +23 -41
- data/lib/onebox/engine/google_drive_onebox.rb +7 -7
- data/lib/onebox/engine/google_maps_onebox.rb +10 -8
- data/lib/onebox/engine/google_photos_onebox.rb +18 -18
- data/lib/onebox/engine/google_play_app_onebox.rb +3 -7
- data/lib/onebox/engine/imgur_onebox.rb +2 -2
- data/lib/onebox/engine/instagram_onebox.rb +4 -5
- data/lib/onebox/engine/kaltura_onebox.rb +8 -6
- data/lib/onebox/engine/opengraph_image.rb +0 -1
- data/lib/onebox/engine/pastebin_onebox.rb +11 -15
- data/lib/onebox/engine/pdf_onebox.rb +7 -15
- data/lib/onebox/engine/pubmed_onebox.rb +17 -12
- data/lib/onebox/engine/replit_onebox.rb +0 -1
- data/lib/onebox/engine/sketchfab_onebox.rb +8 -8
- data/lib/onebox/engine/slides_onebox.rb +10 -10
- data/lib/onebox/engine/soundcloud_onebox.rb +0 -1
- data/lib/onebox/engine/stack_exchange_onebox.rb +3 -2
- data/lib/onebox/engine/standard_embed.rb +2 -5
- data/lib/onebox/engine/steam_store_onebox.rb +6 -5
- data/lib/onebox/engine/trello_onebox.rb +4 -7
- data/lib/onebox/engine/twitch_clips_onebox.rb +1 -3
- data/lib/onebox/engine/twitch_stream_onebox.rb +1 -2
- data/lib/onebox/engine/twitch_video_onebox.rb +0 -2
- data/lib/onebox/engine/typeform_onebox.rb +7 -6
- data/lib/onebox/engine/vimeo_onebox.rb +9 -7
- data/lib/onebox/engine/wikimedia_onebox.rb +1 -2
- data/lib/onebox/engine/wikipedia_onebox.rb +12 -8
- data/lib/onebox/engine/youku_onebox.rb +7 -13
- data/lib/onebox/engine/youtube_onebox.rb +14 -13
- data/lib/onebox/file_type_finder.rb +0 -1
- data/lib/onebox/helpers.rb +7 -24
- data/lib/onebox/layout.rb +2 -14
- data/lib/onebox/matcher.rb +10 -8
- data/lib/onebox/mixins/git_blob_onebox.rb +8 -8
- data/lib/onebox/mixins/github_body.rb +30 -0
- data/lib/onebox/mixins/twitch_onebox.rb +0 -1
- data/lib/onebox/open_graph.rb +4 -4
- data/lib/onebox/preview.rb +3 -4
- data/lib/onebox/version.rb +1 -1
- data/templates/_layout.mustache +6 -2
- data/templates/allowlistedgeneric.mustache +8 -9
- data/templates/amazon.mustache +5 -2
- data/templates/github/github_body.mustache +5 -0
- data/templates/githubblob.mustache +44 -34
- data/templates/githubcommit.mustache +2 -10
- data/templates/githubfolder.mustache +2 -2
- data/templates/githubgist.mustache +9 -6
- data/templates/githubissue.mustache +9 -11
- data/templates/githubpullrequest.mustache +6 -18
- data/templates/gitlabblob.mustache +11 -4
- data/templates/googledocs.mustache +2 -2
- data/templates/googledrive.mustache +2 -2
- data/templates/googleplayapp.mustache +2 -1
- data/templates/instagram.mustache +1 -1
- data/templates/pastebin.mustache +6 -2
- data/templates/pdf.mustache +6 -3
- data/templates/stackexchange.mustache +1 -0
- data/templates/twitterstatus.mustache +20 -5
- data/templates/wikimedia.mustache +2 -2
- data/templates/wikipedia.mustache +2 -2
- data/templates/xkcd.mustache +2 -2
- metadata +7 -5
data/templates/pdf.mustache
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
<a href=
|
2
|
-
<h3><a href='{{link}}' target="_blank" rel="noopener">{{title}}</a></h3>
|
1
|
+
<a href="{{link}}" target="_blank" rel="noopener"><span class="pdf-onebox-logo"></span></a>
|
3
2
|
|
4
|
-
{{
|
3
|
+
<h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
|
4
|
+
|
5
|
+
{{#filesize}}
|
6
|
+
<p class="filesize">{{filesize}}</p>
|
7
|
+
{{/filesize}}
|
@@ -1,23 +1,38 @@
|
|
1
1
|
{{#avatar}}<img src="{{avatar}}" class="thumbnail onebox-avatar">{{/avatar}}
|
2
2
|
|
3
|
-
<h4><a href=
|
3
|
+
<h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
|
4
4
|
|
5
|
-
<div class="tweet">
|
5
|
+
<div class="tweet">
|
6
|
+
{{{tweet}}}
|
7
|
+
{{#quoted_tweet}}
|
8
|
+
<div class="quoted">
|
9
|
+
<a class="quoted-link" href="{{quoted_link}}">
|
10
|
+
<p class="quoted-title">{{quoted_full_name}} <span>@{{quoted_screen_name}}</span></p>
|
11
|
+
</a>
|
6
12
|
|
7
|
-
<div
|
13
|
+
<div>{{quoted_tweet}}</div>
|
14
|
+
</div>
|
15
|
+
{{/quoted_tweet}}
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="date">
|
8
19
|
<a href="{{link}}" target="_blank" rel="noopener">{{timestamp}}</a>
|
20
|
+
|
9
21
|
{{#likes}}
|
10
22
|
<span class="like">
|
11
23
|
<svg viewBox="0 0 512 512" width="14px" height="16px" aria-hidden="true">
|
12
24
|
<path d="M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"></path>
|
13
|
-
</svg>
|
25
|
+
</svg>
|
26
|
+
{{likes}}
|
14
27
|
</span>
|
15
28
|
{{/likes}}
|
29
|
+
|
16
30
|
{{#retweets}}
|
17
31
|
<span class="retweet">
|
18
32
|
<svg viewBox="0 0 640 512" width="14px" height="16px" aria-hidden="true">
|
19
33
|
<path d="M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z"></path>
|
20
|
-
</svg>
|
34
|
+
</svg>
|
35
|
+
{{retweets}}
|
21
36
|
</span>
|
22
37
|
{{/retweets}}
|
23
38
|
</div>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
{{#image}}<img src="{{image}}" class="thumbnail"
|
1
|
+
{{#image}}<img src="{{image}}" class="thumbnail">{{/image}}
|
2
2
|
|
3
|
-
<h3><a href=
|
3
|
+
<h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
{{#image}}<img src="{{image}}" class="thumbnail"
|
1
|
+
{{#image}}<img src="{{image}}" class="thumbnail">{{/image}}
|
2
2
|
|
3
|
-
<h3><a href=
|
3
|
+
<h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
|
4
4
|
|
5
5
|
<p>{{description}}</p>
|
data/templates/xkcd.mustache
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
<h3><a href=
|
1
|
+
<h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
|
2
2
|
|
3
3
|
{{#image}}
|
4
|
-
<div class="xkcd-image"><img src="{{image}}"
|
4
|
+
<div class="xkcd-image"><img src="{{image}}"></div>
|
5
5
|
{{/image}}
|
6
6
|
|
7
7
|
<p>{{description}}</p>
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joanna Zeta
|
8
8
|
- Vyki Englert
|
9
9
|
- Robin Ward
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -367,6 +367,7 @@ files:
|
|
367
367
|
- lib/onebox/layout_support.rb
|
368
368
|
- lib/onebox/matcher.rb
|
369
369
|
- lib/onebox/mixins/git_blob_onebox.rb
|
370
|
+
- lib/onebox/mixins/github_body.rb
|
370
371
|
- lib/onebox/mixins/twitch_onebox.rb
|
371
372
|
- lib/onebox/oembed.rb
|
372
373
|
- lib/onebox/open_graph.rb
|
@@ -382,6 +383,7 @@ files:
|
|
382
383
|
- templates/_layout.mustache
|
383
384
|
- templates/allowlistedgeneric.mustache
|
384
385
|
- templates/amazon.mustache
|
386
|
+
- templates/github/github_body.mustache
|
385
387
|
- templates/githubblob.mustache
|
386
388
|
- templates/githubcommit.mustache
|
387
389
|
- templates/githubfolder.mustache
|
@@ -405,7 +407,7 @@ homepage: https://github.com/discourse/onebox
|
|
405
407
|
licenses:
|
406
408
|
- MIT
|
407
409
|
metadata: {}
|
408
|
-
post_install_message:
|
410
|
+
post_install_message:
|
409
411
|
rdoc_options: []
|
410
412
|
require_paths:
|
411
413
|
- lib
|
@@ -421,7 +423,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
421
423
|
version: '0'
|
422
424
|
requirements: []
|
423
425
|
rubygems_version: 3.0.3
|
424
|
-
signing_key:
|
426
|
+
signing_key:
|
425
427
|
specification_version: 4
|
426
428
|
summary: A gem for generating embeddable HTML previews from URLs.
|
427
429
|
test_files: []
|