onebox 1.9.25 → 1.9.26

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: 6261462665816f1ed15b3da351e0fa160342038955023b1548be3af10ebd3a96
4
- data.tar.gz: 70174996ce5669ff406f2970bec253112dadcfababe3caeaa4f35f615379629c
3
+ metadata.gz: 84aac5ae01b5513e3f3f24ab5dcef3ea04fce6f760acd88439cbab7aa0155232
4
+ data.tar.gz: 48e36383d31afec9d40ac32194756107c911de597596a9b3231967c6a22b8462
5
5
  SHA512:
6
- metadata.gz: e120c498fc253c6863a6437282d5d922c6a89e6c23b59144441326c1c2f4bcf1ab33a215873e07a6d7bd2a6b51d32ac6b7ad592e58b3bb6798e44e1cf07c30cd
7
- data.tar.gz: d245616280be4f55c0a245a7466aef9a7290cd48b7abec83a2120c664dc8ed1e117cbd02226fa4c0c6bb49ccb5250dd5e3e5e6161cbb4c78fb41858a37961438
6
+ metadata.gz: 275d1316c48338b60eab191e076117619fd9ecb0f944cc88429151316df7fab10fd2251035ddbda5a0dd711700d75aa9c19490d42ad41c295e799c7a38168625
7
+ data.tar.gz: d89cbca0ea276ed3c6c7d6b96e72763e42cbbd3c14e249c6516601b78e6239b78c24136dbaa628de9b42c246dc0ecfb576eb6a57eee7473b0991ea67d0b6778d
@@ -5,6 +5,8 @@ on:
5
5
  push:
6
6
  branches:
7
7
  - master
8
+ tags:
9
+ - v*
8
10
 
9
11
  jobs:
10
12
  build:
@@ -37,3 +39,16 @@ jobs:
37
39
 
38
40
  - name: RSpec
39
41
  run: bundle exec rspec
42
+
43
+ publish:
44
+ if: contains(github.ref, 'refs/tags/v')
45
+ needs: build
46
+ runs-on: ubuntu-latest
47
+
48
+ steps:
49
+ - uses: actions/checkout@v2
50
+
51
+ - name: Release Gem
52
+ uses: cadwallion/publish-rubygems-action@5dfdb61
53
+ env:
54
+ RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
data/lib/onebox/engine.rb CHANGED
@@ -141,7 +141,6 @@ require_relative "engine/wikimedia_onebox"
141
141
  require_relative "engine/wikipedia_onebox"
142
142
  require_relative "engine/youtube_onebox"
143
143
  require_relative "engine/youku_onebox"
144
- require_relative "engine/douban_onebox"
145
144
  require_relative "engine/whitelisted_generic_onebox"
146
145
  require_relative "engine/pubmed_onebox"
147
146
  require_relative "engine/soundcloud_onebox"
@@ -54,9 +54,7 @@ module Onebox
54
54
  end
55
55
 
56
56
  def placeholder_html
57
- width = @placeholder_width || 690
58
- height = @placeholder_height || 400
59
- "<img src='#{@placeholder}' width='#{width}' height='#{height}'/>"
57
+ ::Onebox::Helpers.map_placeholder_html
60
58
  end
61
59
 
62
60
  private
@@ -224,6 +224,10 @@ module Onebox
224
224
  "<div class='onebox-placeholder-container'><span class='placeholder-icon audio'></span></div>"
225
225
  end
226
226
 
227
+ def self.map_placeholder_html
228
+ "<div class='onebox-placeholder-container'><span class='placeholder-icon map'></span></div>"
229
+ end
230
+
227
231
  def self.generic_placeholder_html
228
232
  "<div class='onebox-placeholder-container'><span class='placeholder-icon generic'></span></div>"
229
233
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.9.25"
4
+ VERSION = "1.9.26"
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.25
4
+ version: 1.9.26
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-01-13 00:00:00.000000000 Z
13
+ date: 2020-02-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable
@@ -321,7 +321,6 @@ files:
321
321
  - lib/onebox/engine/bandcamp_onebox.rb
322
322
  - lib/onebox/engine/cloudapp_onebox.rb
323
323
  - lib/onebox/engine/coub_onebox.rb
324
- - lib/onebox/engine/douban_onebox.rb
325
324
  - lib/onebox/engine/five_hundred_px_onebox.rb
326
325
  - lib/onebox/engine/flickr_onebox.rb
327
326
  - lib/onebox/engine/flickr_shortened_onebox.rb
@@ -395,7 +394,6 @@ files:
395
394
  - onebox.gemspec
396
395
  - templates/_layout.mustache
397
396
  - templates/amazon.mustache
398
- - templates/douban.mustache
399
397
  - templates/githubblob.mustache
400
398
  - templates/githubcommit.mustache
401
399
  - templates/githubgist.mustache
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Onebox
4
- module Engine
5
- class DoubanOnebox
6
- include Engine
7
- include LayoutSupport
8
- include HTML
9
-
10
- matches_regexp(/^(https?:\/\/)?([\da-z\.-]+)(douban.com\/)(.)+\/?$/)
11
-
12
- private
13
-
14
- def data
15
- {
16
- link: link,
17
- title: raw.css('title').text.gsub("\n", '').strip(),
18
- image: raw.css('img[rel*="v:"]').first['src'],
19
- description: raw.css('meta[name=description]').first['content'],
20
- }
21
- end
22
-
23
- end
24
- end
25
- end
@@ -1,5 +0,0 @@
1
- <img src="{{image}}" class="thumbnail"/>
2
-
3
- <h3><a href='{{link}}' target='_blank'>{{title}}</a></h3>
4
-
5
- <p>{{description}}</p>