lora-rb 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -1
- data/lib/lora-rb/mqtt/call.rb +10 -3
- data/lib/version.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d9ae8b46b9a42db2037a2fa8982464bb9752af1
|
4
|
+
data.tar.gz: 9035bc787caaeb5d2ed80c2fca7bc4d59bcfebce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb96d0297ecdde1cdd73c92ba9af09184cec57a558b50e7ab625abc32942c3dec8f0a5280eedbac23e12fbeb55f2ae813ea5096bf3e4c0abab0c37fe33133f4d
|
7
|
+
data.tar.gz: 8eb4548eee426a26c629cb3a9a19214c2efff3daab9d20f5976200bf959ba67cc8125da44e570e19d7be7ea6c184f2604d21583289de91a235248dd1920692a8
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
+
v0.14.1 October 20th, 2017
|
2
|
+
------------------------------
|
3
|
+
* Mqtt: method all_enqueued_downlink_id raise the custom exception EuiNotFound
|
4
|
+
if eui does not exists
|
5
|
+
|
1
6
|
v0.14.0 [☰](https://bitbucket.org/fractalgarden/loriot-rb/branches/compare/v0.13.0..v0.14.0) September 28th, 2017
|
2
7
|
------------------------------
|
3
|
-
* Mqtt:
|
8
|
+
* Mqtt:
|
9
|
+
* Read data and listen does not add eui and port anymore if they are nil
|
10
|
+
* Added new method get_enqueued_messages to get all the enqueued downlinks that will be sent to a eui
|
11
|
+
* Added new method delete_enqueued_messages to delete one or all the enqueued downlinks for a given a eui
|
12
|
+
* Now send cmd clean the device's enqueued messages before sending a new one
|
13
|
+
* Improved unit tests
|
4
14
|
|
5
15
|
v0.13.0 [☰](https://bitbucket.org/fractalgarden/loriot-rb/branches/compare/v0.12.0..v0.13.0) September 12th, 2017
|
6
16
|
------------------------------
|
data/lib/lora-rb/mqtt/call.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# LoraRb calling methods
|
2
2
|
module LoraRb
|
3
|
+
class EuiNotFound < StandardError; end
|
3
4
|
# It contains all the methods for selecting the items
|
4
5
|
module Call
|
5
|
-
|
6
6
|
attr_reader :client
|
7
7
|
|
8
8
|
private
|
@@ -269,7 +269,14 @@ module LoraRb
|
|
269
269
|
# [5034, 5035, 5036, 5037]
|
270
270
|
def all_enqueued_downlink_id(enqueued_messages:nil, eui:nil, request_id:nil, debug:false)
|
271
271
|
enqueued_messages ||= sub_get_enqueued_messages(eui: eui, request_id: request_id, debug: debug).last
|
272
|
-
|
272
|
+
if enqueued_messages['status'] != 200
|
273
|
+
error = "Cannot process enqueued messages since status=#{enqueued_messages['status']}"
|
274
|
+
if enqueued_messages['status'] == 404
|
275
|
+
raise EuiNotFound, error
|
276
|
+
else
|
277
|
+
raise error
|
278
|
+
end
|
279
|
+
end
|
273
280
|
return [] if enqueued_messages['reply'].nil?
|
274
281
|
raise "An array was expected not: #{enqueued_messages['reply']}" unless enqueued_messages['reply'].is_a?(Array)
|
275
282
|
res = enqueued_messages['reply'].map do |message|
|
@@ -280,4 +287,4 @@ module LoraRb
|
|
280
287
|
end
|
281
288
|
|
282
289
|
end
|
283
|
-
end
|
290
|
+
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lora-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Mastrodonato
|
8
|
-
- Rudi
|
8
|
+
- Rudi Pettazzi
|
9
9
|
- Stefano Piras
|
10
|
+
- Andrea Longhi
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date: 2017-
|
14
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: json
|