blackstack_commons 1.1.49 → 1.1.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/functions.rb +8 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45fcea23ea13ab5fc9627710b6a897a4a968c4a0
4
- data.tar.gz: 7f0247789b07cbf9b6219b9025449b6d954ffd16
3
+ metadata.gz: 7ec175d955b30420b67d76efa7c92a09e356310d
4
+ data.tar.gz: 948668ffae79fd5d4d0db020f1286e6b2b1b9e54
5
5
  SHA512:
6
- metadata.gz: e95048b8d7be59bc9505db7bf240ff315363fbe70ecec9d785c486f77c1b2bc8a574f92ec2cdb9954018dd9dbdb0e873796ef00ecd497e890f19b2acb615c218
7
- data.tar.gz: 2984efd37008697ec8c1d25054fb3e3df000b52ab9b60521a5b686faa248da5118aa480bdc1d1a4e5f55be64a3d77fd7741466a780f827a465a9f50e4edc6ab8
6
+ metadata.gz: d5645bda43346622b2be2d14c213e3e173844f4ce48860efeb47283f50bb30b59ede997f986225b6040a12ecd9483983e8ffbfcedfbac5cbdc961c0ed356b20b
7
+ data.tar.gz: 528e8322b7d41cb504c44175a95c6e1ad3ee3b99ef55caeddf8e000dd50bf67bc650cb38621f7f748aa1e28634da4c0fb245b5b56e92e44aeb5afcd5d1a10fe7
data/lib/functions.rb CHANGED
@@ -155,7 +155,13 @@ module BlackStack
155
155
  MATCH_DOMAIN = /(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,10}/
156
156
  MATCH_DATE_STANDARD = /\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])/
157
157
  MATCH_PHONE = /(?:\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/
158
+
159
+ # Note: MATCH_URL gets the URL up to '?', but it doesn't retrieves the parameters.
160
+ # Exmaple:
161
+ # https://foo.com/bar?param1=value1&param2=value2 --> https://foo.com/bar?
162
+ # https://foo.com/bar/?param1=value1&param2=value2 --> https://foo.com/bar/?
158
163
  MATCH_URL = /(https?:\/\/)?([\da-z\.-]+)([\.\:])([\da-z]{2,6})([\/[\da-z\.\-]+]*[\da-z])(\/)?(\?)?/i
164
+
159
165
  MATCH_LINKEDIN_COMPANY_URL = /(https?:\/\/)?(www\\.)?linkedin\.com\/company\//
160
166
  MATCH_FIXNUM = /[0-9]+/
161
167
  MATCH_CONTENT_SPINNING = /{[^}]+}/
@@ -567,6 +573,7 @@ module BlackStack
567
573
  # ssl_verify_mode: you can disabele SSL verification here.
568
574
  # max_channels: this method use lockfiles to prevent an excesive number of API calls from each datacenter. There is not allowed more simultaneous calls than max_channels.
569
575
  # TODO: setup max_simultaneus_calls in the configurtion file.
576
+ # TODO: parameter support_redirections has been deprecated.
570
577
  def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, support_redirections=true)
571
578
  =begin
572
579
  # build the lockfile name
@@ -591,7 +598,7 @@ module BlackStack
591
598
  res = http.request req
592
599
  case res
593
600
  when Net::HTTPSuccess then res
594
- when Net::HTTPRedirection then BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false) if support_redirections
601
+ #when Net::HTTPRedirection then BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false) if support_redirections
595
602
  else
596
603
  res.error!
597
604
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.49
4
+ version: 1.1.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-30 00:00:00.000000000 Z
11
+ date: 2022-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: content_spinning