onebox 2.0.0 → 2.0.1

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: 2a487ded9a3811b625e50e77656011a13996919443570a91d4a409625388d9f1
4
- data.tar.gz: e3638c662cd35ecc7bb043c56a5d049931c17b250232dada802a75c37fe19dec
3
+ metadata.gz: 2132de40f05e4bd6496772472ed7ec52e544fa483889155948d6762af6fe5e61
4
+ data.tar.gz: 71a6c6229e9ebc26490113c1cdb9b607986d6f42f3888d0f95a87505ff613556
5
5
  SHA512:
6
- metadata.gz: 0bbc8c191618dbc0639eebc0c7c427bb461f565d14c85ea933837ed5765916a1d75ca948684de8a754bd8f4181363ad8da134f292966d841377024c952ddef51
7
- data.tar.gz: c31848cdf2735a4a3f5fa9873e90d5f89b13829c01381c7e78d5298f587fbba1035505bd33dba8b17cce4ad3a75d41a8ceea54bc4ba20f8fa7f63236fce41e51
6
+ metadata.gz: 38fe53b88a4143e27caab6127eb6151cad5f11edb02250fa4dffc737cf489c0ff5941783520323c3d5187f5cffae0333cbab3a17fe2db16f93c427d3071e9205
7
+ data.tar.gz: 12b0d504a89bad2511442f3222fc62c460eed218ec33250a0559623fde61702d9309a0209521a2c43c6fc1edb46a9d49a913bc047ec1fc8c5043eec11ae6333a
@@ -9,6 +9,10 @@ module Onebox
9
9
  include StandardEmbed
10
10
  include LayoutSupport
11
11
 
12
+ def self.priority
13
+ 200
14
+ end
15
+
12
16
  def self.allowed_domains=(list)
13
17
  @allowed_domains = list
14
18
  end
@@ -16,10 +16,7 @@ module Onebox
16
16
  uri = URI(@url)
17
17
  return unless uri.port.nil? || Onebox.options.allowed_ports.include?(uri.port)
18
18
  return unless uri.scheme.nil? || Onebox.options.allowed_schemes.include?(uri.scheme)
19
- ordered_engines
20
- .select { |engine| engine === uri }
21
- .sort_by { |engine| engine.to_s }
22
- .last
19
+ ordered_engines.find { |engine| engine === uri }
23
20
  rescue URI::InvalidURIError
24
21
  nil
25
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
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.0.0
4
+ version: 2.0.1
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-07-14 00:00:00.000000000 Z
13
+ date: 2020-07-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable