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 +4 -4
- data/lib/onebox/engine/allowlisted_generic_onebox.rb +4 -0
- data/lib/onebox/matcher.rb +1 -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: 2132de40f05e4bd6496772472ed7ec52e544fa483889155948d6762af6fe5e61
|
4
|
+
data.tar.gz: 71a6c6229e9ebc26490113c1cdb9b607986d6f42f3888d0f95a87505ff613556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38fe53b88a4143e27caab6127eb6151cad5f11edb02250fa4dffc737cf489c0ff5941783520323c3d5187f5cffae0333cbab3a17fe2db16f93c427d3071e9205
|
7
|
+
data.tar.gz: 12b0d504a89bad2511442f3222fc62c460eed218ec33250a0559623fde61702d9309a0209521a2c43c6fc1edb46a9d49a913bc047ec1fc8c5043eec11ae6333a
|
data/lib/onebox/matcher.rb
CHANGED
@@ -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
|
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.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-
|
13
|
+
date: 2020-07-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|