url_scrubber 0.7.8 → 0.7.9

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.
@@ -1,3 +1,3 @@
1
1
  module UrlScrubber
2
- VERSION = "0.7.8"
2
+ VERSION = "0.7.9"
3
3
  end
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_scrubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.8
4
+ version: 0.7.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: