logstash-input-sensorpush 0.1.1 → 0.1.2

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: 93e14f3ab39ab1b2c9d8bf1c3003fc94b6c3b32d023697ecaa5f32ba1ee3e08b
4
- data.tar.gz: 0062dd8aa9bf3cfd75cbbc242ba4b8ae1e6413c419200615914b51eccd38be9e
3
+ metadata.gz: 785bb4ed39375724a4e99b05a6761df5d9c58e5d762f147e8afe04d7f727ebd1
4
+ data.tar.gz: 1deb26ccf20f24dfd09a9d3e2ada4050085e2777fbd82286ea95ae29695b0813
5
5
  SHA512:
6
- metadata.gz: 0fc2571df4b07d594fd1e36012b9f3c9d55f4e66d77432b90a8b3a2b817da41fbec44fbd6a72f7840674f643b7e09da89f6ef98c8155b8d639c2418eeff30ed4
7
- data.tar.gz: 2ef87c6f719618405dfa6bac52012f4c0636e809b7a7dc94c66cbe42abb78f2e5d482ca68a3fc7288f3d3700f1b915df491a52947c0a6c83f801ba5c62adec8a
6
+ metadata.gz: 5406541a85f399f6427be185fb3544ca68d6b3db90861e06e13a45d248c9aecb3ec3d6dda07c1feee9d2ad845c5950cad70f989f9036bacaecd0f6c2585c18ca
7
+ data.tar.gz: b259709aa64bdb3610feb242822c08652431c279ab6747c9c8ea0505ee35845d1e4689defe88e8302057bcefd5d9348bbdd728117276f6164534dd917ba0d0d9
@@ -105,7 +105,13 @@ class SensorPushApiConnection
105
105
  req.body = JSON.generate(body)
106
106
  resp = self.send_request(req)
107
107
 
108
- ret = resp["sensors"][sensor_id]
108
+ sensors = resp["sensors"]
109
+
110
+ if sensors.nil?
111
+ return []
112
+ end
113
+
114
+ ret = sensors[sensor_id]
109
115
 
110
116
  if ret.nil?
111
117
  return []
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-sensorpush'
3
- s.version = '0.1.1'
3
+ s.version = '0.1.2'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Connect to SensorPush API'
6
6
  s.description = 'Connect to SensorPush API'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-sensorpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Haugen