onebox 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/onebox/engine/audio_onebox.rb +1 -1
- data/lib/onebox/engine/trello_onebox.rb +1 -1
- data/lib/onebox/engine/typeform_onebox.rb +1 -1
- data/lib/onebox/engine/video_onebox.rb +1 -1
- data/lib/onebox/engine/whitelisted_generic_onebox.rb +3 -2
- data/lib/onebox/helpers.rb +12 -0
- data/lib/onebox/mixins/twitch_onebox.rb +1 -1
- 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: 47ec1b31a8406efdfdb54baa19d1e58c10a510375a5e60b3a9ae4126231b0fd9
|
4
|
+
data.tar.gz: 956fba622e0595c37463a12f4101a8c9514e314de84ed5a1829d81666a8dbcd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42f471b30e82e46eb9c50d7fde5dc9908a57c70e5ee95a02f969c487cfe9deff6df7bc123e564def85db1e7e153f08154f7d1b0f13bb43a2884a5dcaddcaa660
|
7
|
+
data.tar.gz: a0f08a4c1929a74e8ce473915780adeec2019467e1e31303dd081dd27140df500e8c58cb00b70f3b670b9560e6874e7a0290256d5cba8774f9a8f212d0a476cb
|
data/Gemfile.lock
CHANGED
@@ -190,8 +190,9 @@ module Onebox
|
|
190
190
|
|
191
191
|
def placeholder_html
|
192
192
|
return article_html if is_article?
|
193
|
-
return image_html
|
194
|
-
return
|
193
|
+
return image_html if is_image?
|
194
|
+
return Onebox::Helpers.video_placeholder_html if is_video? || is_card?
|
195
|
+
return Onebox::Helpers.generic_placeholder_html if is_embedded?
|
195
196
|
to_html
|
196
197
|
end
|
197
198
|
|
data/lib/onebox/helpers.rb
CHANGED
@@ -236,5 +236,17 @@ module Onebox
|
|
236
236
|
encoded += '#' + uri_query_encode(parts[:fragment]) unless parts[:fragment].nil?
|
237
237
|
encoded
|
238
238
|
end
|
239
|
+
|
240
|
+
def self.video_placeholder_html
|
241
|
+
"<div class='onebox-placeholder-container'><span class='placeholder-icon video'></span></div>"
|
242
|
+
end
|
243
|
+
|
244
|
+
def self.audio_placeholder_html
|
245
|
+
"<div class='onebox-placeholder-container'><span class='placeholder-icon audio'></span></div>"
|
246
|
+
end
|
247
|
+
|
248
|
+
def self.generic_placeholder_html
|
249
|
+
"<div class='onebox-placeholder-container'><span class='placeholder-icon generic'></span></div>"
|
250
|
+
end
|
239
251
|
end
|
240
252
|
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.9.
|
4
|
+
version: 1.9.2
|
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: 2019-07-
|
13
|
+
date: 2019-07-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|