blackstack_commons 1.1.35 → 1.1.36
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 +4 -4
- data/lib/functions.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 655f2f5de9ac34605dea9510a33abf62f0a92394
|
4
|
+
data.tar.gz: ea0ae62678e670306f23ddd19ff8a5fd1a9eb063
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aaf3a174708159ca6779b349facb50da208004671d0806c27cf031963f7fdd5c9f1396eeed2cff32599e72adfe1cf380088a6e9dba740bf94c1968550108050
|
7
|
+
data.tar.gz: 04d07be65bb552f1247b836e0d71cc8df20a6fbf8bf8e00b0436c12839f3063f033a8d0cec58ccdbd9cd3bab64a3200edb75ed6d7c9c47c1aa31ea7c4c554e48
|
data/lib/functions.rb
CHANGED
@@ -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,
|
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
|
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.
|
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-
|
11
|
+
date: 2020-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: content_spinning
|