blackstack_commons 1.1.35 → 1.1.36

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 +6 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8162064b7ca165d7dfc2e916e105350788ff8ee
4
- data.tar.gz: be908cce3827d4442170fddd947b09bfbb2ca805
3
+ metadata.gz: 655f2f5de9ac34605dea9510a33abf62f0a92394
4
+ data.tar.gz: ea0ae62678e670306f23ddd19ff8a5fd1a9eb063
5
5
  SHA512:
6
- metadata.gz: 1ebe389a3dd4b8acf045956440ee5d5b896a37c1dba36623edef362c8ebc5bbc534c8ca40a7640cbedb97ecfda3abebebb580240f7e64c3c18be1b76960b2428
7
- data.tar.gz: a729018e8cd9325575c855ab2e86325ac1d2b71349c962cfb05170ccd75a3ac32306ecfa60234ddbd2b0866731bee285395b386d6c6c1e09308e35ba5fa74da5
6
+ metadata.gz: 8aaf3a174708159ca6779b349facb50da208004671d0806c27cf031963f7fdd5c9f1396eeed2cff32599e72adfe1cf380088a6e9dba740bf94c1968550108050
7
+ data.tar.gz: 04d07be65bb552f1247b836e0d71cc8df20a6fbf8bf8e00b0436c12839f3063f033a8d0cec58ccdbd9cd3bab64a3200edb75ed6d7c9c47c1aa31ea7c4c554e48
@@ -512,7 +512,7 @@ module BlackStack
512
512
  end
513
513
 
514
514
  # New call_get
515
- def self.call_get(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE)
515
+ def self.call_get(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, support_redirections=true)
516
516
  uri = URI(url)
517
517
  uri.query = URI.encode_www_form(params)
518
518
  Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https', :verify_mode => ssl_verify_mode) do |http|
@@ -521,7 +521,7 @@ module BlackStack
521
521
  res = http.request req
522
522
  case res
523
523
  when Net::HTTPSuccess then res
524
- when Net::HTTPRedirection then BlackStack::Netting::call_get(URI(res['location']), params)
524
+ when Net::HTTPRedirection then BlackStack::Netting::call_get(URI(res['location']), params, false) if support_redirections
525
525
  else
526
526
  res.error!
527
527
  end
@@ -534,7 +534,7 @@ module BlackStack
534
534
  # ssl_verify_mode: you can disabele SSL verification here.
535
535
  # 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.
536
536
  # TODO: setup max_simultaneus_calls in the configurtion file.
537
- def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, use_lockfile=true)
537
+ def self.call_post(url, params = {}, ssl_verify_mode=BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, support_redirections=true)
538
538
  =begin
539
539
  # build the lockfile name
540
540
  x = 0
@@ -546,8 +546,8 @@ module BlackStack
546
546
  end
547
547
  =end
548
548
  begin
549
- puts
550
- puts "call_post:#{url}:."
549
+ #puts
550
+ #puts "call_post:#{url}:."
551
551
  # do the call
552
552
  uri = URI(url)
553
553
  ret = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https', :verify_mode => ssl_verify_mode) do |http|
@@ -558,7 +558,7 @@ puts "call_post:#{url}:."
558
558
  res = http.request req
559
559
  case res
560
560
  when Net::HTTPSuccess then res
561
- when Net::HTTPRedirection then BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false) if use_lockfile
561
+ when Net::HTTPRedirection then BlackStack::Netting::call_post(URI(res['location']), params, BlackStack::Netting::DEFAULT_SSL_VERIFY_MODE, false) if support_redirections
562
562
  else
563
563
  res.error!
564
564
  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.35
4
+ version: 1.1.36
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: 2020-07-24 00:00:00.000000000 Z
11
+ date: 2020-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: content_spinning