onebox 1.6.0 → 1.6.1

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
  SHA1:
3
- metadata.gz: 0a56361faf38f5ef5c257e8deacb24b55918efa1
4
- data.tar.gz: b5a00d0b2b942a074e480cb20e314a5b9db31772
3
+ metadata.gz: 9568d4cc0a0bf144ffe61a5b97973f44e41c941f
4
+ data.tar.gz: 098b322abd9e0b5941124a22d14e83be9a29d2e6
5
5
  SHA512:
6
- metadata.gz: 1a50be5b46fcfc5025c58660b0dd6f319d5159fc873687b1854c4ac6cd8be2ff859d3b6161c94df1a816be8989258a81ae458866fc96db7c56f8930b2d227a75
7
- data.tar.gz: f0c1d152ba8896ad2d08beb261d114084222e99568c5a51fda330172e2fb740d85fa60a10be9760bec279980e28c156e6807ebe5b116a9df0bbaa74380ff494c
6
+ metadata.gz: 801755ee7531576bd9e006f06563d97d2540ed58be765668bef94d7c56a61e345a5579450089c86566cdb2fdd45c62a8c15732a9f5fdc14b8ebc4f27c939fb90
7
+ data.tar.gz: ed306b576710b9b63a792b8964b2a91ee3b822fc142dd75c71501f9db9216d3e14c5cbf554aa091248d59d1704eab05bf96684f691e1ed51b2cb9f3b7fe9f419
data/lib/onebox/engine.rb CHANGED
@@ -167,3 +167,4 @@ require_relative "engine/xkcd_onebox"
167
167
  require_relative "engine/giphy_onebox"
168
168
  require_relative "engine/gfycat_onebox"
169
169
  require_relative "engine/vimeo_onebox"
170
+ require_relative "engine/steam_store_onebox"
@@ -0,0 +1,36 @@
1
+ module Onebox
2
+ module Engine
3
+ class SteamStoreOnebox
4
+ include Engine
5
+ include StandardEmbed
6
+
7
+ always_https
8
+ matches_regexp(/^https?:\/\/store\.steampowered\.com\/app\/\d+/)
9
+
10
+ def placeholder_html
11
+ og = get_opengraph
12
+ <<-HTML
13
+ <div style='width:100%; height:190px; background-color:#262626; color:#9e9e9e; margin:15px 0;'>
14
+ <div style='padding:10px'>
15
+ <h3 style='color:#fff; margin:10px 0 10px 5px;'>#{og[:title]}</h3>
16
+ <img src='#{og[:image]}' style='float:left; max-width:184px; margin:5px 15px 0 5px'/>
17
+ <p>#{og[:description]}</p>
18
+ </div>
19
+ </div>
20
+ HTML
21
+ end
22
+
23
+ def to_html
24
+ iframe_url = @url.gsub('/app/', '/widget/')
25
+
26
+ <<-HTML
27
+ <iframe src='#{iframe_url}'
28
+ frameborder='0'
29
+ width='100%'
30
+ height='190'>
31
+ </iframe>
32
+ HTML
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,3 +1,3 @@
1
1
  module Onebox
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  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.6.0
4
+ version: 1.6.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: 2016-11-28 00:00:00.000000000 Z
13
+ date: 2016-11-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -324,6 +324,7 @@ files:
324
324
  - lib/onebox/engine/soundcloud_onebox.rb
325
325
  - lib/onebox/engine/stack_exchange_onebox.rb
326
326
  - lib/onebox/engine/standard_embed.rb
327
+ - lib/onebox/engine/steam_store_onebox.rb
327
328
  - lib/onebox/engine/twitter_status_onebox.rb
328
329
  - lib/onebox/engine/video_onebox.rb
329
330
  - lib/onebox/engine/vimeo_onebox.rb