onebox 1.9.28.2 → 1.9.28.3
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/instagram_onebox.rb +5 -20
- data/lib/onebox/version.rb +1 -1
- data/templates/instagram.mustache +2 -2
- 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: f0d93d95906ee868d8e29d6e6746b8812cc8ac97acc714c2be18c7f5e7e6af0c
|
4
|
+
data.tar.gz: 49870d35dbe9d9e0ef9d90cd639242408021e0a6a229de56baef7b3abbbc24c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a2f5037e4d8311ba9c49b8b285dc94bed93619392786d9d6e272d7d0aee16f00f0ecc173edd6974dff8f22b771130e5913027c2d285949869998e1d3fa5d4cb
|
7
|
+
data.tar.gz: 0e6a74f1bd15bc4ff301e5c7c97525143df68c3910cc95657bfeef703bb3d98bd053e7af46f6b2c0cf68505448b7868ba80332d693483995dfebaba52d5dc2c8
|
@@ -17,27 +17,12 @@ module Onebox
|
|
17
17
|
def data
|
18
18
|
oembed = get_oembed
|
19
19
|
permalink = clean_url.gsub("/#{oembed.author_name}/", "/")
|
20
|
-
description = oembed.title
|
21
|
-
type = if description =~ /^Photos by/
|
22
|
-
"album"
|
23
|
-
elsif description =~ /^Video by/
|
24
|
-
"video"
|
25
|
-
else
|
26
|
-
"photo"
|
27
|
-
end
|
28
|
-
title = if type == "album"
|
29
|
-
"[Album] @#{oembed.author_name}"
|
30
|
-
else
|
31
|
-
"@#{oembed.author_name}"
|
32
|
-
end
|
33
20
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
result[:video_link] = permalink if type == "video"
|
40
|
-
result
|
21
|
+
{ link: permalink,
|
22
|
+
title: "@#{oembed.author_name}",
|
23
|
+
image: "#{permalink}/media/?size=l",
|
24
|
+
description: Onebox::Helpers.truncate(oembed.title, 250)
|
25
|
+
}
|
41
26
|
end
|
42
27
|
|
43
28
|
protected
|
data/lib/onebox/version.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
{{#image}}
|
4
4
|
<div class="instagram-images">
|
5
|
-
|
5
|
+
<a href="{{{link}}}" target="_blank" rel="noopener">
|
6
6
|
<img class="instagram-image" src="{{{image}}}"/>
|
7
|
-
|
7
|
+
</a>
|
8
8
|
</div>
|
9
9
|
{{/image}}
|
10
10
|
|
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: 1.9.28.
|
4
|
+
version: 1.9.28.3
|
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-05-
|
13
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|