url_scrubber 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/url_scrubber/version.rb +1 -1
- data/lib/url_scrubber.rb +2 -1
- metadata +1 -1
data/lib/url_scrubber/version.rb
CHANGED
data/lib/url_scrubber.rb
CHANGED
@@ -7,6 +7,7 @@ USER_AGENT = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebK
|
|
7
7
|
module UrlScrubber
|
8
8
|
def self.scrub(url)
|
9
9
|
url = url.clone # don't modify the original argument
|
10
|
+
|
10
11
|
m = url.match(/(https?:\/\/\S*)/i)
|
11
12
|
return nil unless m
|
12
13
|
|
@@ -17,7 +18,7 @@ module UrlScrubber
|
|
17
18
|
url = downcase_domain(url)
|
18
19
|
remove_www!(url)
|
19
20
|
url = drop_anchor!(special_cases(url))
|
20
|
-
url.chomp
|
21
|
+
url.chomp(',')
|
21
22
|
end
|
22
23
|
|
23
24
|
def self.service_of(url)
|