blackstack_commons 1.1.20 → 1.1.21

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/functions.rb +3 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b41be51c4ae04da7529f5ef2cfcf6b89addf4236
4
- data.tar.gz: 5600d485e1834ad752d417235514128130cf1743
3
+ metadata.gz: 33db41aa5cfe363ecbe0e717e953177118b5d809
4
+ data.tar.gz: e182e9b8d8b744fe74101346cdbac4a6f4c49c9c
5
5
  SHA512:
6
- metadata.gz: 5b3abb0f802c4e35bfdc9afbd797dc70d2282adc0af43c366f3ae42242fc6ce1ab8158f2ee055952eebab19517ad0d6f82a7850568db4fd37fc65553a1bbb275
7
- data.tar.gz: 230af29c06076101b23ddb372a3c8dffcbd0ab7e2c13b1f1d7b7a8f11c2baed9a9e83a8b259bca9ab2227b040453f4e7c03b016f8a5a76fc0f1118eb1ac2d624
6
+ metadata.gz: addc2c6437dceab39acca80eb24b9694d4c83d6d5ccd37b6a30843cec5b3b95f01a4d281f32d04003e0d77c99924de448b28ce728dc7999edecf8c92714fe3f1
7
+ data.tar.gz: b46fa3ce44d53e01d43d9df23ed5d3c4e2e8e49bfa008fbaf7f52661b675ccc7162ab70f59d3f852ae43aed4649c5d57379768df4ed03d1bbe47feb5ce5a8a20
data/lib/functions.rb CHANGED
@@ -506,7 +506,7 @@ module BlackStack
506
506
  # ssl_verify_mode: you can disabele SSL verification here.
507
507
  # 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.
508
508
  # TODO: setup max_simultaneus_calls in the configurtion file.
509
- def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, use_lockfile=true)
509
+ def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, use_lockfile=true, allow_redirection=true)
510
510
  # build the lockfile name
511
511
  puts ''
512
512
  puts "call_post.url:#{url}:."
@@ -532,7 +532,8 @@ puts "call_post.url.2:."
532
532
  res = http.request req
533
533
  case res
534
534
  when Net::HTTPSuccess then res
535
- when Net::HTTPRedirection then BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false)
535
+ when Net::HTTPRedirection then
536
+ BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false, false) if allow_redirection
536
537
  else
537
538
  res.error!
538
539
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.20
4
+ version: 1.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi