zabbix-api-simple 0.1.0 → 0.1.1

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: 145656e58234b5023b8a15965919b2bbd0710aa2017982853a9dfb8d839d5d38
4
- data.tar.gz: b3510b1c067cea088f1941924049d0b776019f55388884f1e49b72977db9319a
3
+ metadata.gz: 6e4b7542ca901c9a7b69721322dfa5cac8294a10c5af3c55fb1e3064f19df156
4
+ data.tar.gz: 076dd443693be95e728b601cda49dbc34a93191b62b9b14ea07b351c3cb6158a
5
5
  SHA512:
6
- metadata.gz: 6688d815a3c0e48b7cfb44fada47f15c5058f9c81b2397cf6829b4c5a95eb129028bf043051ba4250e83b96990534aac5cceb6fdadc31d7c46504fbd4797079d
7
- data.tar.gz: 4cde20d69dd48841abdf02faa92a259474866e67314fd93fa060b0aa47816c398970d00c91f12121009a2f734616d52ecda3169323d41e673704a707978b312b
6
+ metadata.gz: 45debfd58a35cc793df8fedf2eded4886f4c085bfdff418c35f3f35b8b2ba10973a1305eecef0650f81b4a991e3687efb86a7a1a35aa16695369a219ccd1b484
7
+ data.tar.gz: 0aebc9edd72680f02eca0b7373b2fea2877019cacf39bca631c308cb5639ea711476bba2acc332d20bfc1051a36bc1ff4636606e59cb60a10adbf89c080c7b00
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zabbix-api (0.1.0)
4
+ zabbix-api-simple (0.1.1)
5
5
  amazing_print
6
6
  faraday
7
7
  optimist
@@ -41,7 +41,7 @@ DEPENDENCIES
41
41
  irb
42
42
  pry
43
43
  rake (~> 13.0)
44
- zabbix-api!
44
+ zabbix-api-simple!
45
45
 
46
46
  BUNDLED WITH
47
47
  2.2.16
data/README.md CHANGED
@@ -15,7 +15,7 @@ It accomplishes these goals primarily by deferring (via Faraday) to the Zabbix A
15
15
  Add this line to your application's Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'zabbix-api'
18
+ gem 'zabbix-api-simple'
19
19
  ```
20
20
 
21
21
  And then execute:
@@ -24,7 +24,7 @@ And then execute:
24
24
 
25
25
  Or install it yourself as:
26
26
 
27
- $ gem install zabbix-api
27
+ $ gem install zabbix-api-simple
28
28
 
29
29
  ## Usage
30
30
 
@@ -35,6 +35,11 @@ module Zabbix
35
35
 
36
36
 
37
37
  class Client
38
+
39
+ class << self
40
+ attr_accessor :last
41
+ end
42
+
38
43
 
39
44
  @@apiurl = 'api_jsonrpc.php'
40
45
 
@@ -50,7 +55,7 @@ module Zabbix
50
55
  :usermacro,:valuemap,:httptest].to_set
51
56
 
52
57
 
53
- attr_reader :conn,:token,:last
58
+ attr_reader :conn,:token
54
59
  attr_accessor :zabobject
55
60
 
56
61
 
@@ -66,7 +71,9 @@ module Zabbix
66
71
 
67
72
  def post(args)
68
73
  args[:params] = [] if not args.has_key?(:params) or args[:params].nil?
69
- @last = @conn.post(@@apiurl, args)
74
+ last = @conn.post(@@apiurl, args)
75
+ Client.last = last
76
+ return last
70
77
  end
71
78
 
72
79
  def login(user: nil,pass: nil)
@@ -103,6 +110,10 @@ module Zabbix
103
110
  end
104
111
  end
105
112
 
113
+ def last
114
+ Client.last
115
+ end
116
+
106
117
  end
107
118
 
108
119
  end # module Api
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Zabbix
4
4
  module Api
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix-api-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Parker
@@ -100,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubyforge_project:
104
- rubygems_version: 2.7.6
103
+ rubygems_version: 3.1.2
105
104
  signing_key:
106
105
  specification_version: 4
107
106
  summary: Zabbix API wrapper