url_scrubber 0.8.8 → 0.8.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.
- checksums.yaml +8 -8
- data/lib/url_scrubber/version.rb +1 -1
- data/lib/url_scrubber.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTkxZGQ1NmRjZDMxMjNmOWViNzlhNzc3Yzg4N2Q1YjRmMmQzY2Y0Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mzc1NmFhOTMxZjg5YjdjZjc4OTRiMWEyYWU4OWEwNzVhYTIxZjZlYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWRjNzU4YjM4OWE3NzE5MjIxOWNlMjMxMTg3YmY1OGM5NTlhMzdjMTUwN2Vl
|
10
|
+
MmNmZjk1ODMzZWY1MGJlYTYwNWEzZDVjZjAwMGFiZjIyY2I0ZWI0Y2VlYjc5
|
11
|
+
OTgyOGYzZmU0ZTEwNWY2YTFlYzQwN2IyZWQ2MDBkN2M0Y2NmOTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGY0ZDRiNGQ1NjM4ZTc5NmIxMTZkNWQyZmVkY2YyNTE0MWU4Y2VlZmQ2MmJj
|
14
|
+
MzY4ODYzM2I2MGE3ZjliZmY3ZGZiZGFlODE3Y2JhZjZlZTM3NDMwZTlkNTU3
|
15
|
+
ODg3MjczYmVjOWUxMDhiMWNlODJmMTRkZGM2NjQ4NWE4NWIyZDA=
|
data/lib/url_scrubber/version.rb
CHANGED
data/lib/url_scrubber.rb
CHANGED
@@ -280,10 +280,10 @@ module UrlScrubber
|
|
280
280
|
|
281
281
|
def self.sc_facebook(url)
|
282
282
|
#puts "sc_facebook: #{url}"
|
283
|
-
regex1 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/(pages\/)*(?<uname>.*)[\/-](?<uid>[0-9]+))($|\/|\/(about|timeline|info|app_)?)/i
|
283
|
+
regex1 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/((pages|pg)\/)*(?<uname>.*)[\/-](?<uid>[0-9]+))($|\/|\/(about|timeline|info|app_)?)/i
|
284
284
|
regex2 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/profile.php\?id=(?<uid>[0-9]+))($|\/|\/.*|&.*)/i
|
285
285
|
regex2a = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/profile.php\?_rdr=p&id=(?<uid>[0-9]+))($|\/|\/.*|&.*)/i
|
286
|
-
regex3 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/(?<uname>[^\?\/]*))($|\/$|\/(about|timeline|info|app_.*)?)/i
|
286
|
+
regex3 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/(pg\/)*(?<uname>[^\?\/]*))($|\/$|\/(about|timeline|info|app_.*)?)/i
|
287
287
|
regex4 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/)(?<php>home.php\?([#!]+\/)*)(?<uname>.*)/i
|
288
288
|
|
289
289
|
# If the user gives us a path to a Post, "http://facebook.com/LoansByJanet/posts/1691075027771418"
|
@@ -322,8 +322,9 @@ module UrlScrubber
|
|
322
322
|
elsif mdata = url.match(regex3)
|
323
323
|
# puts "regex3"
|
324
324
|
# "http://facebook.com/TonyMollHomeLoans/timeline"
|
325
|
-
|
326
|
-
|
325
|
+
# "http://facebook.com/pg/TonyMollHomeLoans/timeline"
|
326
|
+
if ["pages", "pg"].exclude?(mdata[:uname])
|
327
|
+
url = "http://facebook.com/" + mdata[:uname]
|
327
328
|
uname = mdata[:uname]
|
328
329
|
end
|
329
330
|
url = drop_url_query!(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.8.
|
4
|
+
version: 0.8.9
|
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:
|
14
|
+
date: 2018-01-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|