onebox 1.5.64 → 1.5.65
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.rb +1 -0
- data/lib/onebox/engine/gfycat_onebox.rb +34 -0
- data/lib/onebox/engine/giphy_onebox.rb +2 -1
- data/lib/onebox/engine/slides_onebox.rb +1 -1
- data/lib/onebox/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1dd682c72681a17c69e363766f587a4097c04db
|
4
|
+
data.tar.gz: 75f051379112a175c15a2e5ecda7f70a28ffbd0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd8f90b47a506d77485ba827adec451b599ce69de29bd9ebb9731085422eebbb8edb73adff841f94a28006734343b9c8161fd0c4e28ef30ea6bd9fc4e191373
|
7
|
+
data.tar.gz: 4e9c9f3afb625ff29cdae3c6959199796377f04cb48aa3f9a20282a57308be9fcb3e8c4c20a8ba8e16151982548ae8fa50ba3a5cbdac0e7120a60fc8314993aa
|
data/lib/onebox/engine.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
module Onebox
|
2
|
+
module Engine
|
3
|
+
class GfycatOnebox
|
4
|
+
include Engine
|
5
|
+
include StandardEmbed
|
6
|
+
|
7
|
+
matches_regexp(/^https?:\/\/gfycat\.com\//)
|
8
|
+
|
9
|
+
def to_html
|
10
|
+
oembed = get_oembed
|
11
|
+
src = Nokogiri::HTML::fragment(oembed[:html]).at_css("iframe")["src"]
|
12
|
+
|
13
|
+
<<-HTML
|
14
|
+
<iframe src="#{src}"
|
15
|
+
width="#{oembed[:width]}"
|
16
|
+
height="#{oembed[:height]}"
|
17
|
+
scrolling="no"
|
18
|
+
frameborder="0"
|
19
|
+
allowfullscreen>
|
20
|
+
</iframe>
|
21
|
+
HTML
|
22
|
+
end
|
23
|
+
|
24
|
+
def placeholder_html
|
25
|
+
opengraph = get_opengraph
|
26
|
+
|
27
|
+
<<-HTML
|
28
|
+
<img src="#{opengraph[:image]}" width=""#{opengraph[:image_width]}" height=""#{opengraph[:image_height]}">
|
29
|
+
HTML
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -4,7 +4,7 @@ module Onebox
|
|
4
4
|
include Engine
|
5
5
|
include StandardEmbed
|
6
6
|
|
7
|
-
matches_regexp(/^https?:\/\/giphy\.com\/gifs\//)
|
7
|
+
matches_regexp(/^https?:\/\/(giphy\.com\/gifs|gph\.is)\//)
|
8
8
|
|
9
9
|
def to_html
|
10
10
|
oembed = get_oembed
|
@@ -15,6 +15,7 @@ module Onebox
|
|
15
15
|
</a>
|
16
16
|
HTML
|
17
17
|
end
|
18
|
+
|
18
19
|
end
|
19
20
|
end
|
20
21
|
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: 1.5.
|
4
|
+
version: 1.5.65
|
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: 2016-11-
|
13
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- lib/onebox/engine/amazon_onebox.rb
|
304
304
|
- lib/onebox/engine/audio_onebox.rb
|
305
305
|
- lib/onebox/engine/douban_onebox.rb
|
306
|
+
- lib/onebox/engine/gfycat_onebox.rb
|
306
307
|
- lib/onebox/engine/giphy_onebox.rb
|
307
308
|
- lib/onebox/engine/github_blob_onebox.rb
|
308
309
|
- lib/onebox/engine/github_commit_onebox.rb
|
@@ -445,7 +446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
445
446
|
version: '0'
|
446
447
|
requirements: []
|
447
448
|
rubyforge_project:
|
448
|
-
rubygems_version: 2.
|
449
|
+
rubygems_version: 2.5.1
|
449
450
|
signing_key:
|
450
451
|
specification_version: 4
|
451
452
|
summary: A gem for turning URLs into previews.
|