Skip to content

Commit

Permalink
changed version check to a warning instead of an error. Also updated …
Browse files Browse the repository at this point in the history
…README
  • Loading branch information
Splyth committed May 27, 2019
1 parent 244e3f4 commit 70c0e60
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 26 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ Style/RaiseArgs:

Style/SymbolArray:
EnforcedStyle: brackets

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: 'comma'

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'comma'
65 changes: 44 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ PATH
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
coderay (1.1.1)
coderay (1.1.2)
coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
docile (1.3.1)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
hashdiff (0.3.9)
http (2.2.2)
addressable (~> 2.3)
http-cookie (~> 1.0)
Expand All @@ -25,17 +35,15 @@ GEM
http-form_data (1.0.3)
http_parser.rb (0.6.0)
jaro_winkler (1.5.2)
json (2.1.0)
method_source (0.8.2)
parallel (1.12.1)
parser (2.5.3.0)
json (2.2.0)
method_source (0.9.2)
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
powerpack (0.1.2)
pry (0.10.4)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (3.0.3)
method_source (~> 0.9.0)
public_suffix (3.1.0)
rainbow (3.0.0)
rake (11.3.0)
rspec (3.8.0)
Expand All @@ -44,28 +52,43 @@ GEM
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
rspec-expectations (3.8.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.62.0)
rubocop (0.70.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.0)
slop (3.6.0)
safe_yaml (1.0.5)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
term-ansicolor (1.7.1)
tins (~> 1.0)
thor (0.20.3)
timecop (0.9.1)
tins (1.20.2)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.4.1)
yard (0.9.8)
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
webmock (3.5.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
yard (0.9.19)
yardstick (0.9.9)
yard (~> 0.8, >= 0.8.7.2)

PLATFORMS
ruby
Expand All @@ -81,4 +104,4 @@ DEPENDENCIES
zabbixapi!

BUNDLED WITH
1.16.5
1.16.6
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Simple and lightweight ruby module for working with [Zabbix][Zabbix] via the [Za
[examples]: https://github.com/express42/zabbixapi/tree/master/examples

## Version Policy
We support only two last versions of zabbix (3.4 and 4.0), so you should consider all previous versions deprecated.
We support only two last versions of zabbix (4.0 and 4.2), so you should consider all previous versions deprecated.

* Zabbix 1.8.2 (api version 1.2) | zabbixapi 0.6.x | [branch zabbix1.8](https://github.com/express42/zabbixapi/tree/zabbix1.8)
* Zabbix 1.8.9 (api version 1.3) | zabbixapi 0.6.x | [branch zabbix1.8](https://github.com/express42/zabbixapi/tree/zabbix1.8)
Expand Down
2 changes: 1 addition & 1 deletion json-1.x.Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'

gem 'json', '~> 1.8'
gem 'json', '~> 2.0'
gem 'rspec'
5 changes: 2 additions & 3 deletions lib/zabbixapi/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ def initialize(options = {})
@proxy_port = @proxy_uri.port
@proxy_user, @proxy_pass = @proxy_uri.userinfo.split(/:/) if @proxy_uri.userinfo
end

unless api_version =~ /(2\.4|3\.[024]|4\.0)\.\d+/
raise ApiError.new("Zabbix API version: #{api_version} is not support by this version of zabbixapi")
unless api_version =~ %r{^4.[0|2]\.\d+$}
log "[WARN] Zabbix API version: #{api_version} is not supportted by this version of zabbixapi"
end

@auth_hash = auth
Expand Down

0 comments on commit 70c0e60

Please sign in to comment.