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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b7e6ac1cf48f79f8a8c6ae0cb5887c0ee9750d13c6eea7a43ce0e6fe3bbb984
4
- data.tar.gz: c1f63e7a58ec3fad7c42ac782207c7a9105e4e162692f4dee2e56421a11363cc
3
+ metadata.gz: 47ec1b31a8406efdfdb54baa19d1e58c10a510375a5e60b3a9ae4126231b0fd9
4
+ data.tar.gz: 956fba622e0595c37463a12f4101a8c9514e314de84ed5a1829d81666a8dbcd0
5
5
  SHA512:
6
- metadata.gz: cd292a010fdf4f9d127f15b691ea56fb338b79a1b9549dd484ebdbba7ade321f2a362f9250bf98004da333fd084bc5b41a147ffe60bc52ed50e9a3f529c4955b
7
- data.tar.gz: 2f1c8b5233c4085f965acd495e706a6ce0d0b3dda6caa4db2e8581a7da88c205d7955960e683a836774c085cbeb83c51bae6da9cff512cee6516163889b42cb6
6
+ metadata.gz: 42f471b30e82e46eb9c50d7fde5dc9908a57c70e5ee95a02f969c487cfe9deff6df7bc123e564def85db1e7e153f08154f7d1b0f13bb43a2884a5dcaddcaa660
7
+ data.tar.gz: a0f08a4c1929a74e8ce473915780adeec2019467e1e31303dd081dd27140df500e8c58cb00b70f3b670b9560e6874e7a0290256d5cba8774f9a8f212d0a476cb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onebox (1.9.1)
4
+ onebox (1.9.2)
5
5
  htmlentities (~> 4.3)
6
6
  moneta (~> 1.0)
7
7
  multi_json (~> 1.11)
@@ -23,7 +23,7 @@ module Onebox
23
23
  end
24
24
 
25
25
  def placeholder_html
26
- "<div class='onebox-placeholder-container'><span class='placeholder-icon audio'></span></div>"
26
+ ::Onebox::Helpers.audio_placeholder_html
27
27
  end
28
28
  end
29
29
  end
@@ -20,7 +20,7 @@ module Onebox
20
20
  end
21
21
 
22
22
  def placeholder_html
23
- "<div class='onebox-placeholder-container'><span class='placeholder-icon generic'></span></div>"
23
+ ::Onebox::Helpers.generic_placeholder_html
24
24
  end
25
25
 
26
26
  private
@@ -22,7 +22,7 @@ module Onebox
22
22
  end
23
23
 
24
24
  def placeholder_html
25
- "<div class='onebox-placeholder-container'><span class='placeholder-icon generic'></span></div>"
25
+ ::Onebox::Helpers.generic_placeholder_html
26
26
  end
27
27
 
28
28
  private
@@ -24,7 +24,7 @@ module Onebox
24
24
  end
25
25
 
26
26
  def placeholder_html
27
- "<div class='onebox-placeholder-container'><span class='placeholder-icon video'></span></div>"
27
+ ::Onebox::Helpers.video_placeholder_html
28
28
  end
29
29
  end
30
30
  end
@@ -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 if has_image? && (is_video? || is_image?)
194
- return article_html if has_text? && is_embedded?
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
 
@@ -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
@@ -20,7 +20,7 @@ module Onebox
20
20
  end
21
21
 
22
22
  def placeholder_html
23
- "<div class='onebox-placeholder-container'><span class='placeholder-icon video'></span></div>"
23
+ ::Onebox::Helpers.video_placeholder_html
24
24
  end
25
25
 
26
26
  def to_html
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.9.1"
4
+ VERSION = "1.9.2"
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: 1.9.1
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-09 00:00:00.000000000 Z
13
+ date: 2019-07-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json