metainspector 4.4.1 → 4.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,6 +42,12 @@ describe MetaInspector do
42
42
  expect(page.best_title).to be(nil)
43
43
  end
44
44
 
45
+ it "should use the og:title for youtube in preference to h1" do
46
+ #youtube has a h1 value of 'This video is unavailable.' which is unhelpful
47
+ page = MetaInspector.new('http://www.youtube.com/watch?v=short_title')
48
+ expect(page.best_title).to eq('Angular 2 Forms')
49
+ end
50
+
45
51
  end
46
52
 
47
53
  describe '#description' do
@@ -48,6 +48,8 @@ FakeWeb.register_uri(:get, "http://example.com/title_in_h1", :response => fixtur
48
48
  FakeWeb.register_uri(:get, "http://example.com/title_best_choice", :response => fixture_file("title_best_choice.response"))
49
49
  FakeWeb.register_uri(:get, "http://example.com/title_in_head_with_whitespace", :response => fixture_file("title_in_head_with_whitespace.response"))
50
50
  FakeWeb.register_uri(:get, "http://example.com/title_not_present", :response => fixture_file("title_not_present.response"))
51
+ # best_title now has specific logic for youtube
52
+ FakeWeb.register_uri(:get, "http://www.youtube.com/watch?v=short_title", :response => fixture_file("youtube_short_title.response"))
51
53
 
52
54
  # These are older fixtures
53
55
  FakeWeb.register_uri(:get, "http://pagerankalert.com", :response => fixture_file("pagerankalert.com.response"))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metainspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.1
4
+ version: 4.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaime Iniesta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -304,6 +304,7 @@ files:
304
304
  - spec/fixtures/unsafe_https.facebook.com.response
305
305
  - spec/fixtures/wordpress_site.response
306
306
  - spec/fixtures/youtube.response
307
+ - spec/fixtures/youtube_short_title.response
307
308
  - spec/meta_inspector/images_spec.rb
308
309
  - spec/meta_inspector/links_spec.rb
309
310
  - spec/meta_inspector/meta_inspector_spec.rb