zabbix_protocol 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: b24c8ba95636d6a46255007187c03a3092e14a8c
4
- data.tar.gz: 7482b470bee62de53a1af853ec0818e160627410
3
+ metadata.gz: 67c7b17dd4b63ade76364acfb3b28c210aca1982
4
+ data.tar.gz: c4b185dc8941064df32696c631fdc404cf5c963c
5
5
  SHA512:
6
- metadata.gz: b631c8bcaf4dda3dc6ff73e569973153761fbf46ffde4cdd6684f9a19d39a5612ba947f3b2b67045a55acc13a2ec7dad39e6b8f89f847178e36518f509abca77
7
- data.tar.gz: 9e45a2f07297fc37620c569a5b623f9c512d63060f649c8212b4f1cb6f0de858fb287655e615e14b5a6c128207869784580e419b74b23270171117ade7fce5ee
6
+ metadata.gz: fcd39d464d79479dcc0bfbb89adfe133d115fdb8544a3dc6a7842fa0004c7877c278e5ec4b63a3bf2f86f54cd17c2ee136c302f4d032c765fe2c2a1778016c65
7
+ data.tar.gz: f86b19d6b0fb50a391ab9fe9372129c5985b76ef1f5c212d42455507391fc578204e9230ebbaac58e4f70fc504dc121930ab0fd5cbb7d29738cdfbf751d10818
@@ -59,7 +59,7 @@ module ZabbixProtocol
59
59
  begin
60
60
  MultiJson.load(sliced)
61
61
  rescue MultiJson::ParseError
62
- data
62
+ sliced
63
63
  end
64
64
  end
65
65
  end
@@ -1,3 +1,3 @@
1
1
  module ZabbixProtocol
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -64,5 +64,11 @@ describe ZabbixProtocol do
64
64
  subject.load(res_data)
65
65
  }.to raise_error 'invalid payload length: expected=0, actual=8 (data: "ZBXD\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u00001.000000")'
66
66
  end
67
+
68
+ it "should parse error message" do
69
+ res_data = "ZBXD\x01*\x00\x00\x00\x00\x00\x00\x00ZBX_NOTSUPPORTED\x00Invalid second parameter."
70
+ data = subject.load(res_data)
71
+ expect(data).to eq "ZBX_NOTSUPPORTED\x00Invalid second parameter."
72
+ end
67
73
  end
68
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix_protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-08 00:00:00.000000000 Z
11
+ date: 2015-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json