postrank-uri 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/lib/postrank-uri.rb CHANGED
@@ -134,7 +134,7 @@ module PostRank
134
134
  end
135
135
 
136
136
  def hash(uri, opts = {})
137
- Digest::MD5.hexdigest(opts[:clean] == false ? uri : clean(uri))
137
+ Digest::MD5.hexdigest(opts[:clean] == true ? clean(uri) : uri)
138
138
  end
139
139
 
140
140
  def normalize(uri)
@@ -47,4 +47,6 @@
47
47
  wsj.com:
48
48
  - mod
49
49
  allthingsd.com:
50
- - mod
50
+ - mod
51
+ waomarketing.com:
52
+ - nucrss
@@ -1,5 +1,5 @@
1
1
  module PostRank
2
2
  module URI
3
- VERSION = "1.0.10"
3
+ VERSION = "1.0.11"
4
4
  end
5
5
  end
data/spec/c18n_hosts.yml CHANGED
@@ -57,4 +57,7 @@
57
57
  - http://www.usatoday.com/life/television/news/2011-01-19-race19_ST_N.htm
58
58
 
59
59
  - - http://news.cnet.com/8301-17938_105-20029409-1.html?part=rss&subj=news&tag=2547-1_3-0-20
60
- - http://news.cnet.com/8301-17938_105-20029409-1.html
60
+ - http://news.cnet.com/8301-17938_105-20029409-1.html
61
+
62
+ - - http://www.waomarketing.com/blog/at-internet-white-paper-series/?nucrss=1
63
+ - http://www.waomarketing.com/blog/at-internet-white-paper-series
@@ -189,20 +189,20 @@ describe PostRank::URI do
189
189
  PostRank::URI.hash(uri, opts)
190
190
  end
191
191
 
192
- it "should compute MD5 hash of the normalized URI" do
192
+ it "should compute the MD5 hash without cleaning the URI" do
193
193
  hash = '55fae8910d312b7878a3201ed653b881'
194
194
 
195
- h('http://EverBurning.Com/feed/post/1').should == hash
196
- h('Everburning.com/feed/post/1').should == hash
197
- h('everburning.com/feed/post/1').should == hash
198
- h('everburning.com/feed/post/1/').should == hash
195
+ h('http://everburning.com/feed/post/1').should == hash
196
+ h('everburning.com/feed/post/1').should_not == hash
199
197
  end
200
198
 
201
- it "should not clean the URI if requested" do
199
+ it "should normalize the URI if requested and compute MD5 hash" do
202
200
  hash = '55fae8910d312b7878a3201ed653b881'
203
201
 
204
- h('http://everburning.com/feed/post/1', :clean => false).should == hash
205
- h('everburning.com/feed/post/1', :clean => false).should_not == hash
202
+ h('http://EverBurning.Com/feed/post/1', :clean => true).should == hash
203
+ h('Everburning.com/feed/post/1', :clean => true).should == hash
204
+ h('everburning.com/feed/post/1', :clean => true).should == hash
205
+ h('everburning.com/feed/post/1/', :clean => true).should == hash
206
206
  end
207
207
  end
208
208
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: postrank-uri
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.10
5
+ version: 1.0.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ilya Grigorik