url_scrubber 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/url_scrubber.rb +4 -2
- data/lib/url_scrubber/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzRlZTdlZWY1OTRiMWZlMDY0NDI1MWNjNmM4ZmNlZjRhYjYxYWZkMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTBjYjQ4NjBjYjllZGM2Y2I2NjgwY2U1ODliYWM5NjNiNTc4YTFjYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTFhMDdiZjhjNGZmY2RmODczYmIyNTYxNWM0YzM0MmEwYWIzNTUwYTFkMzM3
|
10
|
+
ZDMwOGYxNmZhMDYwMWIyOTNhODQ3MjdiNGE5NzY3Nzk0NGJhNTNiOGIwZTA2
|
11
|
+
YWJkZjAxOTQ1ODk3ODE4YmQ4MTUyMDJlYWY5NTc1MTIxNjBmMjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmQ2ZmUxZDViNWE4MjIyNmIzYzY0ODMwN2ZkNTBjYTFkOGFmOWVjNjAzZGVj
|
14
|
+
NjFiMDlhZTdhNTA2Yzg3NDJhZjhmZjY1ZTA1YWNkY2IzNDQ0YmZkNzlhZDZj
|
15
|
+
Y2YzZDQyZDM3ZDFkOGJmOGEyOTYzZWJlMzUwYTFlYTYzNGZiZWI=
|
data/lib/url_scrubber.rb
CHANGED
@@ -20,7 +20,7 @@ module UrlScrubber
|
|
20
20
|
url.sub!('#!/', '')
|
21
21
|
url.sub!('%27', '\'')
|
22
22
|
url = downcase_domain(url)
|
23
|
-
|
23
|
+
remove_subdomain!(url)
|
24
24
|
remove_html_tags!(url)
|
25
25
|
url = drop_anchor!(special_cases(url))
|
26
26
|
url.sub!(/,+$/, "") # remove one or more trailing commas at the end of the URL
|
@@ -200,11 +200,13 @@ module UrlScrubber
|
|
200
200
|
end
|
201
201
|
|
202
202
|
|
203
|
-
def self.
|
203
|
+
def self.remove_subdomain!(url)
|
204
204
|
# url.sub!(%r{://www\d*\.}, '://')
|
205
205
|
url.sub!(%r{^https?://www?w?\d*\.}i, 'http://')
|
206
206
|
url.sub!(%r{^https?://m\d*\.}i, 'http://')
|
207
207
|
url.sub!(%r{^https?://mobile\d*\.}i, 'http://')
|
208
|
+
url.sub!(%r{^https?://touch\d*\.}i, 'http://')
|
209
|
+
url.sub!(%r{^https?://mbasic\.facebook\.com}i, 'http://facebook.com')
|
208
210
|
url
|
209
211
|
end
|
210
212
|
|
data/lib/url_scrubber/version.rb
CHANGED
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.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin Langton
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-12-
|
14
|
+
date: 2016-12-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|