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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 235226d726a9323c2c3ccd296f08ca7193001179
4
- data.tar.gz: 3602887c6d1d351785ce3c9249e88cf56ea25e90
3
+ metadata.gz: 2d9ae8b46b9a42db2037a2fa8982464bb9752af1
4
+ data.tar.gz: 9035bc787caaeb5d2ed80c2fca7bc4d59bcfebce
5
5
  SHA512:
6
- metadata.gz: 1b52de77fbcace7cc959ed9cf7534bd7348510b6464f39e3bf2006827e144c22e7a02f38365134b615baabefcdbcaf7b2043cc0e432246faaaf53152ad424dfe
7
- data.tar.gz: 191e3fbdd9abd4157cc98e6c057a19f55f56399af25c7b0177cac2b0f06a56887b68f11ad47df651c29d1620451d73540908bd67a4af151dfb7352a0739f4f89
6
+ metadata.gz: fb96d0297ecdde1cdd73c92ba9af09184cec57a558b50e7ab625abc32942c3dec8f0a5280eedbac23e12fbeb55f2ae813ea5096bf3e4c0abab0c37fe33133f4d
7
+ data.tar.gz: 8eb4548eee426a26c629cb3a9a19214c2efff3daab9d20f5976200bf959ba67cc8125da44e570e19d7be7ea6c184f2604d21583289de91a235248dd1920692a8
@@ -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: read data and listen does not add eui and port anymore if they are nil
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
  ------------------------------
@@ -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
- raise "Cannot process enqueued messages since status=#{enqueued_messages['status']}" unless enqueued_messages['status'] == 200
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
@@ -1,8 +1,8 @@
1
1
  module LoraRb
2
2
  def self.version
3
- "0.14.0"
3
+ "0.14.1"
4
4
  end
5
5
  def self.updated_at
6
- "2017-09-29"
6
+ "2017-10-20"
7
7
  end
8
8
  end
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.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Mastrodonato
8
- - Rudi Petazzi
8
+ - Rudi Pettazzi
9
9
  - Stefano Piras
10
+ - Andrea Longhi
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2017-09-29 00:00:00.000000000 Z
14
+ date: 2017-10-20 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: json