panteras_api 0.0.19 → 0.0.20

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,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0ecb0cb2145821d5e1475c391ecc8b9787d78d44
4
- data.tar.gz: f4c98fb450089d984247f7239630857533815e26
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NTBjNmMzMzIzZjZkYmRkNzMxYTI5Y2ZhN2RjNGZlZTBkM2UxNzc5OA==
5
+ data.tar.gz: !binary |-
6
+ N2QxNWI2NjUyMzEzMWU0NTFmYTRmZTExMTU2YTM1OWI3ZDYyMWNhYw==
5
7
  SHA512:
6
- metadata.gz: 3f048a9e181e3acf0d3aa99cf7e636a44a377760c055f086f0d896bf4ece1bdb58bebfb08a819e2c7bc67b0066c290216917b1f44ea457fe7ca196e48d9333b6
7
- data.tar.gz: fc405609fa59fe7c4ac2edf0acf428ddfb32c4e039a43b26e2e459b4dd0297fcd739e531ef9c25fff25e7d361eade64df0a6c3bd63d5bcd9fa3a40bd7733ec92
8
+ metadata.gz: !binary |-
9
+ NzI1ZmY5NWI3NjFjM2VkODAzYmJlNjNkOTFhODUzOGRmMWZlZDhkNTRmMDJj
10
+ ZDhlM2VkNDBmNTY5ZGYxYTgzM2I4ZjU0ZWM2YmQ3OTU3OTBhMjk5YWZkMzk4
11
+ ZWQxZGJiYWYzNjZmYjM4MjU1MzJiYjExZDQyMzEwNTAzNDRmMGQ=
12
+ data.tar.gz: !binary |-
13
+ NzY3ZGE1ZmFjYWFlM2E4ZmU3MmViYmEwNjUxNTJlYzIxMGM5ZDc5Yjg4ZTE3
14
+ NzUxOGVmYjAzY2M0NjI4MWMxMjZlYzhkMzU3MzczNDMyZGM0YjFhYTVlYmZi
15
+ OGYwZDQxY2QxNmMwZTZiYzcyMGZkZTc2NGM4YjhhM2YzYWI3M2Q=
@@ -1,14 +1,23 @@
1
1
  require 'json'
2
2
  require 'net/http'
3
3
  require 'uri'
4
+ require 'zlib'
4
5
 
5
6
  module HTTPUtils
6
7
 
7
8
  def get_response_with_redirect(host, request_uri, port, user='', passwd='')
8
- http = Net::HTTP::new(host, port)
9
- req = Net::HTTP.const_get('Get').new(request_uri)
10
- req.basic_auth user,passwd
11
- response = http.request(req)
9
+ begin
10
+ retries ||= 0
11
+ http = Net::HTTP::new(host, port)
12
+ req = Net::HTTP.const_get('Get').new(request_uri)
13
+ req.basic_auth user,passwd
14
+ response = http.request(req)
15
+ rescue Zlib::DataError, Zlib::BufError
16
+ retry if (retries += 1) < 3
17
+ rescue Exception => e
18
+ raise e
19
+ end
20
+
12
21
  if response.is_a?(Net::HTTPRedirection)
13
22
  begin
14
23
  redirect_uri = URI.parse(response.header['location'])
@@ -1,3 +1,3 @@
1
1
  module PanterasApi
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panteras_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Colby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-03 00:00:00.000000000 Z
11
+ date: 2019-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.8'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: A convenient api for getting information from consul, mesos, marathon,
@@ -62,9 +62,9 @@ executables:
62
62
  extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
- - ".gitignore"
66
- - ".rspec"
67
- - ".travis.yml"
65
+ - .gitignore
66
+ - .rspec
67
+ - .travis.yml
68
68
  - Gemfile
69
69
  - License
70
70
  - README.md
@@ -90,19 +90,18 @@ require_paths:
90
90
  - lib
91
91
  required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ">="
93
+ - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - ">="
98
+ - - ! '>='
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.6
103
+ rubygems_version: 2.4.8
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Ruby API library for Panteras PaaS platform.
107
107
  test_files: []
108
- has_rdoc: