zabbix-api-simple 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zabbix/api/client.rb +3 -2
- data/lib/zabbix/api/version.rb +1 -1
- data/zabbix-api.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 767eed1d8880dfac1dcae338914a324ead075de7502f9899ab15088715757c78
|
4
|
+
data.tar.gz: 9709424f2953c6485e75c9b859db99b7ecba9ddc57600490c19e596c7a750276
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bedb840a9e1a83a21f635a3818fc4569168521bbec3f96e186262f3c107d8a04e402d9cf44eed52dd6d547ef17ed0f2cb018d59f4bea2166a77eb309e311ad27
|
7
|
+
data.tar.gz: 40eb31a36188f50aa05e6a8fdd0559f026a240c10eefb4aec560d3be49ce324832a28291719ce04289d03ad852023cb18efe0cb8efdf2840e0cc1d70ba529b7e
|
data/lib/zabbix/api/client.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Zabbix
|
2
2
|
module Api
|
3
3
|
|
4
|
-
require 'faraday'
|
4
|
+
require 'faraday/net_http'
|
5
5
|
require 'json'
|
6
6
|
require 'set'
|
7
7
|
require 'amazing_print'
|
@@ -36,7 +36,7 @@ module Zabbix
|
|
36
36
|
|
37
37
|
end
|
38
38
|
|
39
|
-
Faraday::Request.register_middleware
|
39
|
+
Faraday::Request.register_middleware(zabbix_api_request: ZabbixApiRequest)
|
40
40
|
|
41
41
|
end # module FaradayMiddleware
|
42
42
|
|
@@ -113,6 +113,7 @@ module Zabbix
|
|
113
113
|
# happen automagically. You can alter request timeout if needed by passing
|
114
114
|
# :timeout - the default is 60 secs
|
115
115
|
def initialize(url: nil,timeout: 60)
|
116
|
+
Faraday.default_adapter = :net_http
|
116
117
|
@conn = Faraday.new(
|
117
118
|
url: url,
|
118
119
|
headers: {'Content-Type' => 'application/json-rpc'},
|
data/lib/zabbix/api/version.rb
CHANGED
data/zabbix-api.gemspec
CHANGED
@@ -33,7 +33,8 @@ Gem::Specification.new do |spec|
|
|
33
33
|
|
34
34
|
# For more information and examples about making a new gem, checkout our
|
35
35
|
# guide at: https://bundler.io/guides/creating_gem.html
|
36
|
-
spec.add_dependency 'faraday', "~>
|
36
|
+
spec.add_dependency 'faraday', "~> 2.0"
|
37
|
+
spec.add_dependency 'faraday-net_http', "~> 2.0"
|
37
38
|
spec.add_dependency 'optimist'
|
38
39
|
spec.add_dependency 'amazing_print'
|
39
40
|
spec.add_dependency 'pry'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zabbix-api-simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Parker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday-net_http
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: optimist
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|