open_graph_reader 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -481,4 +481,19 @@ DESCRIPTION
481
481
  expect(object.og.url).to eq "http://taz.de/!159273"
482
482
  end
483
483
  end
484
+
485
+ describe "missing_content" do
486
+ it "parses" do
487
+ object = OpenGraphReader.parse! fixture_html "real_world/missing_content"
488
+
489
+ expect(object.og.site_name).to eq "Rudaw"
490
+ expect(object.og.type).to eq "article"
491
+ expect(object.og.url).to eq "http://rudaw.net/english/kurdistan/070520155"
492
+ expect(object.og.title).to eq "VIDEO: Scenes from Mahabad riots in Eastern (Iran) Kurdistan"
493
+ expect(object.og.image.url).to eq "http://rudaw.net/ContentFiles/126638Image1.jpg"
494
+ expect(object.og.image.width).to eq 486
495
+ expect(object.og.image.height).to eq 286
496
+ expect(object.og.description).to be_nil
497
+ end
498
+ end
484
499
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_graph_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonne Haß
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-04 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -171,6 +171,7 @@ files:
171
171
  - spec/fixtures/real_world/image_path_2.html
172
172
  - spec/fixtures/real_world/invalid_article_author.html
173
173
  - spec/fixtures/real_world/invalid_datetime.html
174
+ - spec/fixtures/real_world/missing_content.html
174
175
  - spec/fixtures/real_world/missing_image.html
175
176
  - spec/fixtures/real_world/missing_title.html
176
177
  - spec/fixtures/real_world/missing_url.html
@@ -263,6 +264,7 @@ test_files:
263
264
  - spec/fixtures/real_world/image_path_2.html
264
265
  - spec/fixtures/real_world/invalid_article_author.html
265
266
  - spec/fixtures/real_world/invalid_datetime.html
267
+ - spec/fixtures/real_world/missing_content.html
266
268
  - spec/fixtures/real_world/missing_image.html
267
269
  - spec/fixtures/real_world/missing_title.html
268
270
  - spec/fixtures/real_world/missing_url.html