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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28e30904785f029ad0c680c09b73ba17f347dd4fd554092b80fd91ead1be13fa
4
- data.tar.gz: af26160711971a9fe39d0e3154dfc7ae0bd0bd6ef203bf675e2ed652f2e0e9f7
3
+ metadata.gz: cba7774ebf124a2d110630be26869977c6acf71d1a07603e890d3a1231430834
4
+ data.tar.gz: fe5de86e2abdc20fee6139c596da13e1249a6d38d9c40a7759adbbaa5065c8f0
5
5
  SHA512:
6
- metadata.gz: 157ff74bdfd086e3b52ad216a7009b2b9c706dc5fdf4cf7c9591a62b8af3e3dceea77f46bf2e31493fd0e2f496b2d6263fba756a992190ed82d868a85772713a
7
- data.tar.gz: d75b64388c883d406655c32b8990852bf3c10e8e1e8cb06335eb6b9ea482f6da2491fa41e2700528200b5fdf062f2f9a70e6ab650e4605c3e1ec2b97fcd99d9c
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' height='#{og.image_height}' width='#{og.image_width}'>
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
- oembed = get_oembed
19
- permalink = clean_url.gsub("/#{oembed.author_name}/", "/")
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: "@#{oembed.author_name}",
23
+ title: "@#{author_name}",
23
24
  image: "#{permalink}/media/?size=l",
24
- description: Onebox::Helpers.truncate(oembed.title, 250)
25
+ description: Onebox::Helpers.truncate(og.title, 250)
25
26
  }
26
27
  end
27
28
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "2.1.3"
4
+ VERSION = "2.1.4"
5
5
  end
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.3
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-09-15 00:00:00.000000000 Z
13
+ date: 2020-10-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable