url_scrubber 0.8.23 → 0.8.25

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4558673ef07349f4ae8fd577edfcf3b005ce6be12f022a6d52d008aacfd7cabd
4
- data.tar.gz: a0d715b3ec092791f73da84c9658ce030e1c71164e780b198c995bd7b04838fa
3
+ metadata.gz: 3606fb748c96a468d4840c451a0160e0e540f765f61ef93a2e8af8e312d3e34b
4
+ data.tar.gz: 854a06fc025e18aa5a1dadc2a39b35e0a9a182d6b156b364c88682396be3c644
5
5
  SHA512:
6
- metadata.gz: 6345f6aba2066b3d5a31f9b2be28f0fd84ccf9268c3782000a51a35495c99c970a458933503b699b237e909d879b00501bbf6cba3ed2be5f87570278de6e9f56
7
- data.tar.gz: 59e7fcb1077c9a5488b03553ea2df050ff063c1f10d83bffeb094d04b4d6fea3dcaed3ab3de426b0732590827ac3f3219d90c1dfd9ebd07dfbb000f740c79444
6
+ metadata.gz: abb1c3fecba0b7cb261ca78cccf9a486126cef9b865e6c1326b905dfade11b5f5871ed0482f389e4b9f7176bf888bb9e665daa350f2f9cc96b0c31dcabf7758d
7
+ data.tar.gz: 392faa88e343b1eaf00e9d5ed51ea1704b526b93a3d3cc539319daa6205d3da154d02a773b8722aa4f30e8beb5328e124a5914a60d3674cfe5faf0ed64eaffe6
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  .DS_Store
8
8
  .rspec
9
9
  .sass-cache
10
+ .tool-versions
10
11
  .yardoc
11
12
  /.bundle
12
13
  /coverage/
@@ -1,3 +1,3 @@
1
1
  module UrlScrubber
2
- VERSION = "0.8.23"
2
+ VERSION = "0.8.25"
3
3
  end
data/lib/url_scrubber.rb CHANGED
@@ -301,6 +301,7 @@ module UrlScrubber
301
301
  regex4 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/)(?<php>home.php\?([#!]+\/)*)(?<uname>.*)/i
302
302
  regex5 = /^(?<url>(https?:\/\/)((business|www)\.)?facebook\.com\/(?<uid>[0-9]+))($|\/|\/.*|&.*)/i
303
303
  regex6 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/home\/accounts\?business_id=(?<uid>[0-9]+))($|\/|\/.*|&.*)/i
304
+ regex7 = /^(?<url>(https?:\/\/)((www|business)\.)?facebook\.com\/latest\/settings\/business_info\?business_id=(?<uid>[0-9]+))($|\/|\/.*|&.*)/i
304
305
 
305
306
  # If the user gives us a path to a Post, "http://facebook.com/LoansByJanet/posts/1691075027771418"
306
307
  # then drop the post part, "/posts/1691075027771418" to get the base url, "http://facebook.com/LoansByJanet/"
@@ -321,16 +322,20 @@ module UrlScrubber
321
322
  uid = mdata[:uid]
322
323
  elsif mdata = url.match(regex4)
323
324
  # "http://facebook.com/home.php?#!/person.name"
324
- url = mdata[:url] + mdata[:uname]
325
- url = drop_url_query!(url)
326
- elsif mdata = url.match(regex5)
327
- # "https://www.facebook.com/100009574328879"
328
- url = "http://facebook.com/" + mdata[:uid]
329
- uid = mdata[:uid]
330
- elsif mdata = url.match(regex6)
331
- # "http://business.facebook.com/home/accounts?business_id=1145724702268347"
332
- url = mdata[:url]
333
- uid = mdata[:uid]
325
+ url = mdata[:url] + mdata[:uname]
326
+ url = drop_url_query!(url)
327
+ elsif mdata = url.match(regex5)
328
+ # "https://www.facebook.com/100009574328879"
329
+ url = "http://facebook.com/" + mdata[:uid]
330
+ uid = mdata[:uid]
331
+ elsif mdata = url.match(regex6)
332
+ # "http://business.facebook.com/home/accounts?business_id=1145724702268347"
333
+ url = mdata[:url]
334
+ uid = mdata[:uid]
335
+ elsif mdata = url.match(regex7)
336
+ # "http://business.facebook.com/home/accounts?business_id=1145724702268347"
337
+ url = mdata[:url]
338
+ uid = mdata[:uid]
334
339
  elsif mdata = url.match(regex3)
335
340
  # "http://facebook.com/TonyMollHomeLoans/timeline"
336
341
  # "http://facebook.com/pg/TonyMollHomeLoans/timeline"
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.23
4
+ version: 0.8.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin Langton
@@ -9,10 +9,10 @@ authors:
9
9
  - David Hillard
10
10
  - Edgar Abadines
11
11
  - Chip Roberson
12
- autorequire:
12
+ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-09-02 00:00:00.000000000 Z
15
+ date: 2025-08-17 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -110,7 +110,7 @@ homepage: http://brandle.net
110
110
  licenses:
111
111
  - MIT
112
112
  metadata: {}
113
- post_install_message:
113
+ post_install_message:
114
114
  rdoc_options: []
115
115
  require_paths:
116
116
  - lib
@@ -125,8 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.0.6
129
- signing_key:
128
+ rubygems_version: 3.1.6
129
+ signing_key:
130
130
  specification_version: 4
131
131
  summary: Clean up URLs.
132
132
  test_files: