onebox 1.9.28.4 → 1.9.29

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: 2f0921bd8d91072c930eccee436ef05e362fbe20b0d4ec8d39cecb74580723c9
4
- data.tar.gz: 58ff915a7d3a7dcbf2a7a0bcaf66366ad6210ba17b84695695be9a067c54be92
3
+ metadata.gz: c996c2a3781e2a1d668b65673e7ac68ff530354a6290b83a135fc4e9994525b1
4
+ data.tar.gz: 3b2b00129314e9dcfc1cc4acaeb8b3455e675f5eeefae1d732c18cf9d80cbd7c
5
5
  SHA512:
6
- metadata.gz: 5eb93e33a7c8c4919d47d03975545d08be18038d83e6b763ab5e7fabb1fe9b9a1ddc35a688656234e37231dff9b131900e87d00d0363e5e6f3454d9dad2988ed
7
- data.tar.gz: 7097f982b53eb11d057f601af63e928941f086534a03ec7d92eb7794bf2981a9138d6891add442f52345b91a70f611397a86e4647a7302a12991d8560c5c96ba
6
+ metadata.gz: d99a41fe572876a523e9abec9319db2abb929745ed33570c814cdf7715378e75a1ad9e8f24d4ede3106a8b86b47dbccddef31e056b3f2561728eec5f6f3baa74
7
+ data.tar.gz: 7ea34a65e1424176cea0711ca4c2421e6e38ec4cd2b2d1830ca254e98cfb36d1039ba33cba169874ea83a0cde65171b4a7a6d75ceede019bbf11109c6cc74bd7
data/README.md CHANGED
@@ -46,6 +46,14 @@ preview = Onebox.preview(url)
46
46
  "#{preview}" == preview.to_s #=> true
47
47
  ```
48
48
 
49
+ ### Twitch Onebox
50
+
51
+ To be able to embed Twitch video and clips, pass `hostname` in the options to `Onebox.preview`
52
+
53
+ ```ruby
54
+ preview = Onebox.preview(url, hostname: 'www.example.com')
55
+ ```
56
+
49
57
  Ruby Support
50
58
  ------------
51
59
 
@@ -24,7 +24,9 @@ module Onebox
24
24
  end
25
25
 
26
26
  def to_html
27
- "<iframe src=\"//#{base_url}#{query_params}&autoplay=false\" width=\"620\" height=\"378\" frameborder=\"0\" style=\"overflow: hidden;\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"></iframe>"
27
+ <<~HTML
28
+ <iframe src="//#{base_url}#{query_params}&parent=#{options[:hostname]}&autoplay=false" width="620" height="378" frameborder="0" style="overflow: hidden;" scrolling="no" allowfullscreen="allowfullscreen"></iframe>
29
+ HTML
28
30
  end
29
31
  end
30
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.9.28.4"
4
+ VERSION = "1.9.29"
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.28.4
4
+ version: 1.9.29
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-06-11 00:00:00.000000000 Z
13
+ date: 2020-06-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable