onebox 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,5 +47,22 @@ describe Onebox::Engine::WhitelistedGenericOnebox do
47
47
  end
48
48
  end
49
49
 
50
+ describe 'to_html' do
51
+
52
+ before do
53
+ described_class.whitelist = %w(dailymail.co.uk discourse.org)
54
+ original_link = "http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=479146&in_page_id=1770"
55
+ redirect_link = 'http://www.dailymail.co.uk/news/article-479146/Brutality-justice-The-truth-tarred-feathered-drug-dealer.html'
56
+ FakeWeb.register_uri(:get, original_link, status: ["301", "Moved Permanently"], location: '/news/article-479146/Brutality-justice-The-truth-tarred-feathered-drug-dealer.html')
57
+ fake(redirect_link, response('dailymail'))
58
+ onebox = described_class.new(original_link)
59
+ @html = onebox.to_html
60
+ end
61
+ let(:html) { @html }
62
+
63
+ it "includes summary" do
64
+ expect(html).to include("It was the most chilling image of the week")
65
+ end
66
+ end
50
67
 
51
68
  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.4.3
4
+ version: 1.4.4
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: 2014-08-06 00:00:00.000000000 Z
13
+ date: 2014-08-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -271,6 +271,7 @@ files:
271
271
  - lib/onebox/view.rb
272
272
  - onebox.gemspec
273
273
  - spec/fixtures/amazon.response
274
+ - spec/fixtures/dailymail.response
274
275
  - spec/fixtures/githubblob.response
275
276
  - spec/fixtures/githubcommit.response
276
277
  - spec/fixtures/githubpullrequest.response
@@ -341,12 +342,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
342
  version: '0'
342
343
  requirements: []
343
344
  rubyforge_project:
344
- rubygems_version: 2.2.2
345
+ rubygems_version: 2.1.11
345
346
  signing_key:
346
347
  specification_version: 4
347
348
  summary: A gem for turning URLs into previews.
348
349
  test_files:
349
350
  - spec/fixtures/amazon.response
351
+ - spec/fixtures/dailymail.response
350
352
  - spec/fixtures/githubblob.response
351
353
  - spec/fixtures/githubcommit.response
352
354
  - spec/fixtures/githubpullrequest.response