onebox 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/engine/imgur_onebox.rb +1 -1
- data/lib/onebox/engine/instagram_onebox.rb +5 -4
- data/lib/onebox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba7774ebf124a2d110630be26869977c6acf71d1a07603e890d3a1231430834
|
4
|
+
data.tar.gz: fe5de86e2abdc20fee6139c596da13e1249a6d38d9c40a7759adbbaa5065c8f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9d0e1df1c6d14c4984b30c7b3392d519b0eeec63ee7a34656e3089d9c1bc81e1d7e801660ceb2d4da0ea89a779e64a0cb7cd332485b584a9d6873866dbe8819
|
7
|
+
data.tar.gz: 4c3587d5445c97480c3d5dd4ee514ea9df427d26fb1fed1ace681b95aa6012d79c84323bd915803c4409b21695f4f2f28a6baf6016a8f50dc0f76a65d79be04d
|
@@ -58,7 +58,7 @@ module Onebox
|
|
58
58
|
|
59
59
|
<<-HTML
|
60
60
|
<a href='#{escaped_url}' target='_blank' rel='noopener' class="onebox">
|
61
|
-
<img src='#{og.get_secure_image}' #{og.title_attr} alt='Imgur'
|
61
|
+
<img src='#{og.get_secure_image.chomp("?fb")}' #{og.title_attr} alt='Imgur'>
|
62
62
|
</a>
|
63
63
|
HTML
|
64
64
|
end
|
@@ -15,13 +15,14 @@ module Onebox
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def data
|
18
|
-
|
19
|
-
|
18
|
+
og = get_opengraph
|
19
|
+
author_name = og.description.match(/\(@(\w+)\) on Instagram/)[1]
|
20
|
+
permalink = clean_url.gsub("/#{author_name}/", "/")
|
20
21
|
|
21
22
|
{ link: permalink,
|
22
|
-
title: "@#{
|
23
|
+
title: "@#{author_name}",
|
23
24
|
image: "#{permalink}/media/?size=l",
|
24
|
-
description: Onebox::Helpers.truncate(
|
25
|
+
description: Onebox::Helpers.truncate(og.title, 250)
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
data/lib/onebox/version.rb
CHANGED
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.1.
|
4
|
+
version: 2.1.4
|
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: 2020-
|
13
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|