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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2bb566d2096445a37f5328daab6bd9750c8fa75ce8740b7f2f858f56c9aa795
4
- data.tar.gz: 1f4ce2ee9e5255a0889c3019649a9a34802a3b4d7c7d4494ab3425d98566d471
3
+ metadata.gz: f0d93d95906ee868d8e29d6e6746b8812cc8ac97acc714c2be18c7f5e7e6af0c
4
+ data.tar.gz: 49870d35dbe9d9e0ef9d90cd639242408021e0a6a229de56baef7b3abbbc24c6
5
5
  SHA512:
6
- metadata.gz: 5e48b7a4787c335b9eefba80baa1b49d19e394b3a05ab1c43ed30fc176e5d0021a301ddbedcbf8d5a1e02649fadb41d8cd62d8668b3d0d62e030effffc667453
7
- data.tar.gz: 8fbb2770d5ffa95e3efed6fb24c5f15468b659392e40bb5532abe7e7d4a677678dd2705e354efb8f33e4622c7608dac21bd6f446145a342c6683ec47d6cff178
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
- result = { link: permalink,
35
- title: title,
36
- image: "#{permalink}/media/?size=l",
37
- description: Onebox::Helpers.truncate(description, 250)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.9.28.2"
4
+ VERSION = "1.9.28.3"
5
5
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  {{#image}}
4
4
  <div class="instagram-images">
5
- {{#video_link}} <a href="{{{video_link}}}" target="_blank" rel="noopener"> {{/video_link}}
5
+ <a href="{{{link}}}" target="_blank" rel="noopener">
6
6
  <img class="instagram-image" src="{{{image}}}"/>
7
- {{#video_link}} <span class="instagram-video-icon"></span></a> {{/video_link}}
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.2
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-26 00:00:00.000000000 Z
13
+ date: 2020-05-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable