postrank-uri 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/lib/postrank-uri.rb CHANGED
@@ -161,7 +161,7 @@ module PostRank
161
161
  u.path = $1
162
162
  end
163
163
 
164
- if u.host =~ /tumblr\.com$/
164
+ if u.host =~ /tumblr\.com$/ && u.path =~ /\/post\/\d+\//
165
165
  u.path = u.path.gsub(/[^\/]+$/, '')
166
166
  end
167
167
 
@@ -1,5 +1,5 @@
1
1
  module PostRank
2
2
  module URI
3
- VERSION = "1.0.11"
3
+ VERSION = "1.0.12"
4
4
  end
5
5
  end
@@ -135,6 +135,7 @@ describe PostRank::URI do
135
135
  context "tumblr" do
136
136
  it "should strip slug" do
137
137
  c('http://test.tumblr.com/post/4533459403/some-text').should == 'http://test.tumblr.com/post/4533459403/'
138
+ c('http://tumblr.com/xjl2evo3hh').should == 'http://tumblr.com/xjl2evo3hh'
138
139
  end
139
140
  end
140
141
 
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.11
5
+ version: 1.0.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ilya Grigorik
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-05 00:00:00 -04:00
13
+ date: 2011-05-06 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency