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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a22800f0fc86c622d9aed2347de3474493f11063afe93574722d9775d3e183a7
4
- data.tar.gz: 3e2d7da66ec9eec2a62b793016af6190b3682e23151599a0e5b92bf336b0ac51
3
+ metadata.gz: 767eed1d8880dfac1dcae338914a324ead075de7502f9899ab15088715757c78
4
+ data.tar.gz: 9709424f2953c6485e75c9b859db99b7ecba9ddc57600490c19e596c7a750276
5
5
  SHA512:
6
- metadata.gz: eff8065f139dbeefff931f0939b65ef5e1205e0d8d2869e5c6fecff3582b4f4c12182ff0084bbc3a40f8d9f702d31d382eda3585fe609c6509b7c8a7de6c3487
7
- data.tar.gz: 07c4520f7944ec3a6d5253af1416c78fb62419fe885cae49db5e9409ecb7ef7b208fb56e69e69abd6918d9e69d0151beae9b2105410566bf712b462d018fbb5e
6
+ metadata.gz: bedb840a9e1a83a21f635a3818fc4569168521bbec3f96e186262f3c107d8a04e402d9cf44eed52dd6d547ef17ed0f2cb018d59f4bea2166a77eb309e311ad27
7
+ data.tar.gz: 40eb31a36188f50aa05e6a8fdd0559f026a240c10eefb4aec560d3be49ce324832a28291719ce04289d03ad852023cb18efe0cb8efdf2840e0cc1d70ba529b7e
@@ -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 zabbix_api_request: -> { ZabbixApiRequest }
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'},
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Zabbix
4
4
  module Api
5
- VERSION = "0.1.6"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
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', "~> 1.8"
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.1.6
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-04 00:00:00.000000000 Z
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: '1.8'
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: '1.8'
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