onebox 2.2.14 → 2.2.15
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/lib/onebox/engine.rb +6 -10
- data/lib/onebox/engine/allowlisted_generic_onebox.rb +0 -9
- data/lib/onebox/engine/amazon_onebox.rb +23 -16
- data/lib/onebox/engine/flickr_onebox.rb +2 -2
- data/lib/onebox/engine/gfycat_onebox.rb +26 -26
- data/lib/onebox/engine/github_commit_onebox.rb +1 -1
- data/lib/onebox/engine/github_folder_onebox.rb +1 -1
- data/lib/onebox/engine/google_docs_onebox.rb +22 -40
- data/lib/onebox/engine/google_maps_onebox.rb +10 -6
- data/lib/onebox/engine/google_photos_onebox.rb +6 -6
- data/lib/onebox/engine/imgur_onebox.rb +2 -2
- data/lib/onebox/engine/instagram_onebox.rb +2 -3
- 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 +16 -12
- data/lib/onebox/engine/stack_exchange_onebox.rb +1 -1
- data/lib/onebox/engine/standard_embed.rb +0 -3
- data/lib/onebox/engine/trello_onebox.rb +3 -6
- data/lib/onebox/engine/youku_onebox.rb +0 -6
- data/lib/onebox/helpers.rb +2 -1
- data/lib/onebox/layout.rb +2 -14
- data/lib/onebox/matcher.rb +10 -8
- data/lib/onebox/mixins/git_blob_onebox.rb +3 -5
- data/lib/onebox/open_graph.rb +4 -4
- data/lib/onebox/preview.rb +2 -2
- 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/githubblob.mustache +44 -34
- data/templates/githubcommit.mustache +1 -3
- data/templates/githubfolder.mustache +2 -2
- data/templates/githubgist.mustache +9 -6
- data/templates/githubissue.mustache +3 -3
- data/templates/githubpullrequest.mustache +1 -1
- 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 +2 -2
data/templates/amazon.mustache
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
{{#image}}<img src="{{image}}" class="thumbnail"
|
1
|
+
{{#image}}<img src="{{image}}" class="thumbnail">{{/image}}
|
2
|
+
|
3
|
+
<h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
|
2
4
|
|
3
|
-
<h3><a href='{{link}}' target='_blank' rel='noopener'>{{title}}</a></h3>
|
4
5
|
{{#by_info}}<b>{{by_info}}</b>{{/by_info}}
|
6
|
+
|
5
7
|
<p>{{description}}</p>
|
8
|
+
|
6
9
|
<p>
|
7
10
|
{{#rating}}{{rating}}{{/rating}}
|
8
11
|
{{#isbn_asin}}{{isbn_asin_text}}: {{isbn_asin}}, {{/isbn_asin}}
|
@@ -1,42 +1,52 @@
|
|
1
1
|
<h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
|
2
|
+
|
2
3
|
{{^has_lines}}
|
3
|
-
{{#model_file}}
|
4
|
-
<iframe class="render-viewer" width="{{width}}" height="{{height}}" src="{{content}}" sandbox="allow-scripts allow-same-origin allow-top-navigation ">
|
5
|
-
Viewer requires iframe.
|
6
|
-
</iframe>
|
7
|
-
{{/model_file}}
|
8
|
-
|
9
|
-
|
10
|
-
{{
|
4
|
+
{{#model_file}}
|
5
|
+
<iframe class="render-viewer" width="{{width}}" height="{{height}}" src="{{content}}" sandbox="allow-scripts allow-same-origin allow-top-navigation ">
|
6
|
+
Viewer requires iframe.
|
7
|
+
</iframe>
|
8
|
+
{{/model_file}}
|
9
|
+
|
10
|
+
{{^model_file}}
|
11
|
+
<pre><code class="{{lang}}">{{content}}</code></pre>
|
12
|
+
{{/model_file}}
|
11
13
|
{{/has_lines}}
|
14
|
+
|
12
15
|
{{#has_lines}}
|
13
|
-
{{! This is a template comment | Sample rules for this box
|
14
|
-
<style>
|
15
|
-
pre.onebox code ol{
|
16
|
-
|
17
|
-
}
|
18
|
-
pre.onebox code ol .lines{
|
19
|
-
|
20
|
-
}
|
21
|
-
pre.onebox code ol.lines li {
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
pre.onebox code li{
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
16
|
+
{{! This is a template comment | Sample rules for this box
|
17
|
+
<style>
|
18
|
+
pre.onebox code ol{
|
19
|
+
margin-left:0px;
|
20
|
+
}
|
21
|
+
pre.onebox code ol .lines{
|
22
|
+
margin-left:30px;
|
23
|
+
}
|
24
|
+
pre.onebox code ol.lines li {
|
25
|
+
list-style-type: decimal;
|
26
|
+
margin-left:45px;
|
27
|
+
}
|
28
|
+
pre.onebox code li{
|
29
|
+
list-style-type: none;
|
30
|
+
background-color:#fff;
|
31
|
+
border-bottom:1px solid #F0F0F0;
|
32
|
+
padding-left:5px;
|
33
|
+
|
34
|
+
}
|
35
|
+
pre.onebox code li.selected{
|
36
|
+
background-color:#cfc
|
37
|
+
}
|
38
|
+
</style>
|
39
|
+
}}
|
30
40
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
</
|
36
|
-
}}
|
37
|
-
|
38
|
-
|
39
|
-
</
|
41
|
+
<pre class="onebox">
|
42
|
+
<code class="{{lang}}">
|
43
|
+
<ol class="start lines" start="{{cr_results.from}}" style="counter-reset: li-counter {{cr_results.from_minus_one}} ;">
|
44
|
+
{{#lines}}
|
45
|
+
<li{{#selected}} class="selected"{{/selected}}>{{data}}</li>
|
46
|
+
{{/lines}}
|
47
|
+
</ol>
|
48
|
+
</code>
|
49
|
+
</pre>
|
40
50
|
{{/has_lines}}
|
41
51
|
|
42
52
|
{{#truncated}}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<div class="github-info">
|
12
12
|
<div class="date">
|
13
|
-
committed <span class="discourse-local-date" data-format=
|
13
|
+
committed <span class="discourse-local-date" data-format="ll" data-date="{{committed_at_date}}" data-time="{{committed_at_time}}" data-timezone="UTC">{{committed_at}}</span>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div class="user">
|
@@ -18,7 +18,6 @@
|
|
18
18
|
<img alt="{{author.login}}" src="{{author.avatar_url}}" class="onebox-avatar-inline" width="20" height="20">
|
19
19
|
{{author.login}}
|
20
20
|
</a>
|
21
|
-
|
22
21
|
</div>
|
23
22
|
|
24
23
|
<div class="lines" title="changed {{files.length}} files with {{stats.additions}} additions and {{stats.deletions}} deletions">
|
@@ -28,7 +27,6 @@
|
|
28
27
|
</a>
|
29
28
|
</div>
|
30
29
|
</div>
|
31
|
-
|
32
30
|
</div>
|
33
31
|
</div>
|
34
32
|
|
@@ -1,9 +1,9 @@
|
|
1
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
|
{{#path}}
|
6
|
-
<p><a href=
|
6
|
+
<p><a href="{{link}}" target="_blank" rel="noopener">{{path}}</a></p>
|
7
7
|
{{/path}}
|
8
8
|
|
9
9
|
{{#description}}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
<h4><a href="{{link}}" target="_blank" rel="noopener">{{link}}</a></h4>
|
2
|
+
|
2
3
|
{{#gist_files}}
|
3
|
-
<h5>{{filename}}</h5>
|
4
|
-
<pre><code class=
|
5
|
-
{{#truncated?}}
|
4
|
+
<h5>{{filename}}</h5>
|
5
|
+
<pre><code class="{{language}}">{{content}}</code></pre>
|
6
|
+
{{#truncated?}}
|
7
|
+
This file has been truncated. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
|
8
|
+
{{/truncated?}}
|
6
9
|
{{/gist_files}}
|
7
10
|
|
8
11
|
<p>
|
9
|
-
{{#truncated_files?}}
|
10
|
-
|
11
|
-
{{/truncated_files?}}
|
12
|
+
{{#truncated_files?}}
|
13
|
+
There are more than three files. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
|
14
|
+
{{/truncated_files?}}
|
12
15
|
</p>
|
@@ -10,12 +10,12 @@
|
|
10
10
|
|
11
11
|
<div class="github-info">
|
12
12
|
<div class="date">
|
13
|
-
opened <span class="discourse-local-date" data-format=
|
13
|
+
opened <span class="discourse-local-date" data-format="ll" data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
{{#closed_at}}
|
17
17
|
<div class="date">
|
18
|
-
closed <span class="discourse-local-date" data-format=
|
18
|
+
closed <span class="discourse-local-date" data-format="ll" data-date="{{closed_at_date}}" data-time="{{closed_at_time}}" data-timezone="UTC">{{closed_at}}</span>
|
19
19
|
</div>
|
20
20
|
{{/closed_at}}
|
21
21
|
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
|
30
|
-
<div class=
|
30
|
+
<div class="labels">
|
31
31
|
{{#labels}}
|
32
32
|
<span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">{{name}}</span>
|
33
33
|
{{/labels}}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<div class="github-info">
|
16
16
|
<div class="date">
|
17
|
-
opened <span class="discourse-local-date" data-format=
|
17
|
+
opened <span class="discourse-local-date" data-format="ll" data-date="{{created_at_date}}" data-time="{{created_at_time}}" data-timezone="UTC">{{created_at}}</span>
|
18
18
|
</div>
|
19
19
|
|
20
20
|
<div class="user">
|
@@ -1,12 +1,19 @@
|
|
1
1
|
<h4><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h4>
|
2
|
+
|
2
3
|
{{^has_lines}}
|
3
|
-
<pre><code class=
|
4
|
+
<pre><code class="{{lang}}">{{content}}</code></pre>
|
4
5
|
{{/has_lines}}
|
5
6
|
|
6
7
|
{{#has_lines}}
|
7
|
-
<pre class=
|
8
|
-
|
9
|
-
|
8
|
+
<pre class="onebox">
|
9
|
+
<code class="{{lang}}">
|
10
|
+
<ol class="start lines" start="{{cr_results.from}}" style="counter-reset: li-counter {{cr_results.from_minus_one}} ;">
|
11
|
+
{{#lines}}
|
12
|
+
<li{{#selected}} class="selected"{{/selected}}>{{data}}</li>
|
13
|
+
{{/lines}}
|
14
|
+
</ol>
|
15
|
+
</code>
|
16
|
+
</pre>
|
10
17
|
{{/has_lines}}
|
11
18
|
|
12
19
|
{{#truncated}}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<a href=
|
1
|
+
<a href="{{link}}" target="_blank" rel="noopener"><span class="googledocs-onebox-logo g-{{type}}-logo"></span></a>
|
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>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{{^image}}
|
2
|
-
<a href=
|
2
|
+
<a href="{{link}}" target="_blank" rel="noopener"><span class="googledocs-onebox-logo g-drive-logo"></span></a>
|
3
3
|
{{/image}}
|
4
4
|
|
5
|
-
{{#image}}<img src="{{image}}" class="thumbnail"
|
5
|
+
{{#image}}<img src="{{image}}" class="thumbnail">{{/image}}
|
6
6
|
|
7
7
|
<h3><a href="{{link}}" target="_blank" rel="noopener">{{title}}</a></h3>
|
8
8
|
|
data/templates/pastebin.mustache
CHANGED
@@ -1,3 +1,7 @@
|
|
1
1
|
<h4><a href="{{link}}" target="_blank" rel="noopener">{{link}}</a></h4>
|
2
|
-
|
3
|
-
|
2
|
+
|
3
|
+
<pre><code class="lang-auto">{{content}}</code></pre>
|
4
|
+
|
5
|
+
{{#truncated?}}
|
6
|
+
This paste has been truncated. <a href="{{link}}" target="_blank" rel="noopener">show original</a>
|
7
|
+
{{/truncated?}}
|
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,7 +1,7 @@
|
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joanna Zeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-05-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|