zabbix_manager 5.0.2 → 5.0.3

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: baddfe1c19c7d70234e9faaf1327b7fb5a440083229dfc417dd2bc3b34ecdf75
4
- data.tar.gz: 19e8933f296db4a00f48df300d3684f5c11fdae8f1f4f0921e41a357ade03466
3
+ metadata.gz: 664f103c4fd543aa59a65c9be717050d55731ac6656aa4f075b995f18bcba146
4
+ data.tar.gz: cd42e7fdc52e69725a1388e6212e507177f5ad08729aa9de1cb756adf7e9f2fb
5
5
  SHA512:
6
- metadata.gz: e7992694a2eaf74eb663c254e9143f1b1f054dba270bd856f9fce44466c54540f674e587cf76fc4924e7059acd301b04058ccea5ebbca69f538ef1facbc9e4f7
7
- data.tar.gz: 30ff7ca3f862f7db10361f46337a680a47a79fde932efe280ec756167d2b7de83aa7ea35c30229b756d68cd4492ac020ed4f2f7a3a1dbf832d1398a955c825e4
6
+ metadata.gz: 89cf16af0cbb46e61b2db1d695ed27329f6bf07ec5cea701b2f7f13afa06facb668e054a3e638cd485ee24e7a9351c6a9d2b309b57034adcb1f0c8067a1b9a27
7
+ data.tar.gz: dc2dcd6e47b3ea610e692068440525c306252398ac0fe03459b91689982c183b78fdf611095dc9b3332f11d0950f2dc85ab31f407288f156ddc3c6cb2b47fa5a
@@ -0,0 +1,56 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="9f25f96c-828f-4aea-8886-dcbae369ba60" name="变更" comment="">
8
+ <change beforePath="$PROJECT_DIR$/lib/zabbix_manager/client.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/zabbix_manager/client.rb" afterDir="false" />
9
+ </list>
10
+ <option name="SHOW_DIALOG" value="false" />
11
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
+ <option name="LAST_RESOLUTION" value="IGNORE" />
14
+ </component>
15
+ <component name="Git.Settings">
16
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
17
+ </component>
18
+ <component name="JsBowerSettings">
19
+ <bower-package value="" />
20
+ <bower.json value="" />
21
+ </component>
22
+ <component name="ProjectId" id="265x23SpJKPxcHuoXgA68nnhQDg" />
23
+ <component name="ProjectViewState">
24
+ <option name="hideEmptyMiddlePackages" value="true" />
25
+ <option name="showLibraryContents" value="true" />
26
+ </component>
27
+ <component name="PropertiesComponent">
28
+ <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
29
+ <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
30
+ <property name="WebServerToolWindowFactoryState" value="false" />
31
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
32
+ <property name="node.js.detected.package.eslint" value="true" />
33
+ <property name="node.js.selected.package.eslint" value="(autodetect)" />
34
+ <property name="node.js.selected.package.tslint" value="(autodetect)" />
35
+ <property name="nodejs_interpreter_path" value="node" />
36
+ <property name="nodejs_package_manager_path" value="yarn" />
37
+ <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
38
+ <property name="vue.rearranger.settings.migration" value="true" />
39
+ </component>
40
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
41
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
42
+ <component name="TaskManager">
43
+ <task active="true" id="Default" summary="默认任务">
44
+ <changelist id="9f25f96c-828f-4aea-8886-dcbae369ba60" name="变更" comment="" />
45
+ <created>1646727041577</created>
46
+ <option name="number" value="Default" />
47
+ <option name="presentableId" value="Default" />
48
+ <updated>1646727041577</updated>
49
+ <workItem from="1646727043249" duration="2883000" />
50
+ </task>
51
+ <servers />
52
+ </component>
53
+ <component name="TypeScriptGeneratedFilesManager">
54
+ <option name="version" value="3" />
55
+ </component>
56
+ </project>
@@ -10,20 +10,19 @@ class ZabbixManager
10
10
 
11
11
  # @return [Integer]
12
12
  def id
13
- rand(100_000)
13
+ rand(800_000)
14
14
  end
15
15
 
16
16
  # Returns the API version from the Zabbix Server
17
17
  #
18
- # @return [String]
18
+ # @return [String, Hash]
19
19
  def api_version
20
- @api_version ||= api_request(method: 'apiinfo.version', params: {})
21
- @api_version
20
+ api_request(method: 'apiinfo.version', params: {})
22
21
  end
23
22
 
24
23
  # Log in to the Zabbix Server and generate an auth token using the API
25
24
  #
26
- # @return [Hash]
25
+ # @return [Hash, String]
27
26
  def auth
28
27
  api_request(
29
28
  method: 'user.login',
@@ -38,7 +37,7 @@ class ZabbixManager
38
37
  #
39
38
  # @return [boolean]
40
39
  def debug?
41
- return !@options || @options[:debug]
40
+ !@options || @options[:debug]
42
41
  end
43
42
 
44
43
  # Initializes a new Client object
@@ -58,9 +57,10 @@ class ZabbixManager
58
57
  @proxy_uri = URI.parse(ENV['http_proxy'])
59
58
  @proxy_host = @proxy_uri.host
60
59
  @proxy_port = @proxy_uri.port
61
- @proxy_user, @proxy_pass = @proxy_uri.userinfo.split(/:/) if @proxy_uri.userinfo
60
+ @proxy_user, @proxy_pass = @proxy_uri.userinfo&.split(/:/) if @proxy_uri.userinfo
62
61
  end
63
- unless api_version =~ %r{^5.[0|2]\.\d+$}
62
+
63
+ if api_version.match? /^7\.\d+\.\d+$/
64
64
  message = "Zabbix API version: #{api_version} is not supported by this version of zabbixapi"
65
65
  if @options[:ignore_version]
66
66
  puts "[WARNING] #{message}" if @options[:debug]
@@ -1,3 +1,3 @@
1
1
  class ZabbixManager
2
- VERSION = '5.0.2'.freeze
2
+ VERSION = '5.0.3'.freeze
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - WENWU YAN
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-18 00:00:00.000000000 Z
11
+ date: 2022-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".idea/workspace.xml"
62
63
  - ".rubocop.yml"
63
64
  - CHANGELOG.md
64
65
  - CODE_OF_CONDUCT.md
@@ -103,6 +104,7 @@ files:
103
104
  - lib/zabbix_manager/client.rb
104
105
  - lib/zabbix_manager/version.rb
105
106
  - zabbix_manager-5.0.1.gem
107
+ - zabbix_manager-5.0.2.gem
106
108
  homepage: https://github.com/snmpd/zabbix_manager
107
109
  licenses:
108
110
  - MIT
@@ -126,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
128
  - !ruby/object:Gem::Version
127
129
  version: '0'
128
130
  requirements: []
129
- rubygems_version: 3.2.22
131
+ rubygems_version: 3.3.3
130
132
  signing_key:
131
133
  specification_version: 4
132
134
  summary: Write a short summary, because RubyGems requires one.