metainspector 1.9.5 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -75,7 +75,7 @@ module MetaInspector
75
75
  # TODO: We should trust the charset expressed on the Content-Type meta tag
76
76
  # and only guess it if none given
77
77
  def charset
78
- @data.charset ||= CharGuess.guess(document).downcase
78
+ @data.charset ||= CharGuess.guess(document)
79
79
  end
80
80
 
81
81
  # Returns all parsed data as a nested Hash
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module MetaInspector
4
- VERSION = "1.9.5"
4
+ VERSION = "1.9.6"
5
5
  end
@@ -259,14 +259,14 @@ describe MetaInspector do
259
259
 
260
260
  it "should detect utf-8 charset" do
261
261
  @m = MetaInspector.new('http://pagerankalert.com')
262
- @m.charset.should == "utf-8"
262
+ @m.charset.should == "UTF-8"
263
263
  end
264
264
  end
265
265
 
266
266
  describe 'to_hash' do
267
267
  it "should return a hash with all the values set" do
268
268
  @m = MetaInspector.new('http://pagerankalert.com')
269
- @m.to_hash.should == {"title"=>"PageRankAlert.com :: Track your PageRank changes", "url"=>"http://pagerankalert.com", "meta"=>{"name"=>{"robots"=>"all,follow", "csrf_param"=>"authenticity_token", "description"=>"Track your PageRank(TM) changes and receive alerts by email", "keywords"=>"pagerank, seo, optimization, google", "csrf_token"=>"iW1/w+R8zrtDkhOlivkLZ793BN04Kr3X/pS+ixObHsE="}, "property"=>{}}, "images"=>["http://pagerankalert.com/images/pagerank_alert.png?1305794559"], "charset"=>"utf-8", "feed"=>"http://feeds.feedburner.com/PageRankAlert", "links"=>["http://pagerankalert.com/", "http://pagerankalert.com/es?language=es", "http://pagerankalert.com/users/sign_up", "http://pagerankalert.com/users/sign_in", "mailto:pagerankalert@gmail.com", "http://pagerankalert.posterous.com", "http://twitter.com/pagerankalert", "http://twitter.com/share"]}
269
+ @m.to_hash.should == {"title"=>"PageRankAlert.com :: Track your PageRank changes", "url"=>"http://pagerankalert.com", "meta"=>{"name"=>{"robots"=>"all,follow", "csrf_param"=>"authenticity_token", "description"=>"Track your PageRank(TM) changes and receive alerts by email", "keywords"=>"pagerank, seo, optimization, google", "csrf_token"=>"iW1/w+R8zrtDkhOlivkLZ793BN04Kr3X/pS+ixObHsE="}, "property"=>{}}, "images"=>["http://pagerankalert.com/images/pagerank_alert.png?1305794559"], "charset"=>"UTF-8", "feed"=>"http://feeds.feedburner.com/PageRankAlert", "links"=>["http://pagerankalert.com/", "http://pagerankalert.com/es?language=es", "http://pagerankalert.com/users/sign_up", "http://pagerankalert.com/users/sign_in", "mailto:pagerankalert@gmail.com", "http://pagerankalert.posterous.com", "http://twitter.com/pagerankalert", "http://twitter.com/share"]}
270
270
  end
271
271
  end
272
272
 
@@ -301,7 +301,7 @@ describe MetaInspector do
301
301
 
302
302
  describe "parsed?" do
303
303
  it "should return true if we have a parsed document" do
304
- good = MetaInspector.new('http://w3clove.com')
304
+ good = MetaInspector.new('https://www.w3clove.com')
305
305
  title = good.title
306
306
 
307
307
  good.parsed?.should == true
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metainspector
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 9
9
- - 5
10
- version: 1.9.5
9
+ - 6
10
+ version: 1.9.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaime Iniesta
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-07-23 00:00:00 Z
18
+ date: 2012-07-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: nokogiri