mqttopia 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: e187ae43b2ef47585aa3e90f989bf95e4b6a5a2ce5435050b6197b1de69d5867
4
- data.tar.gz: f28d85e56435d9a70eff252b638c98d1506de4ca58678a09de79cf01bf6ed9e4
3
+ metadata.gz: c742f5f768390150ffadb94a8c47dc197f95e02c0ff137ba0fee384fbd8f8313
4
+ data.tar.gz: a8da45694aef218efa74d141979869c264252fba7a1c8fe736728933971c70c4
5
5
  SHA512:
6
- metadata.gz: 38e1e64174271e7df513c72fd8f2475cb35de740407e93c5ecadb6552ccd435d9e1c9a6c79436b1b5b9d20525180c6138abfb2584b0e46334e3ac6a2fdecbdd4
7
- data.tar.gz: 3052bd4fe4f365a2bc4e58894ef043df13f2ef43af3eb33ab110f72a4f1db2243bbd670eb9cafeafe2d658891e3c6076b0c98d2fd941af06cfaaf4ac4877ff52
6
+ metadata.gz: 62e6988922837919ecb0943033ceff222a43439fa7041569c76ecb83f6c26fa73c11d601b8bd288e2dd886bb0c20aac5a69ea7cb1a9afd8354f5580010297c5c
7
+ data.tar.gz: 7b9c96b9748df2ad82e2b17967070dc96afc21e2f9821b0c7ab64da4230328fd50aeefb9e9205c82f3c76497793612b0ce4b3678759cfd3f2b313ba61da17412
@@ -24,6 +24,7 @@ module Mqttopia
24
24
  longitude: point[:lon],
25
25
  accuracy: point[:acc],
26
26
  altitude: point[:alt],
27
+ action_type: action_type_mapper(point[:act]),
27
28
  current_trip_point_id: point[:ctp_id]
28
29
  }
29
30
  end
@@ -35,6 +36,13 @@ module Mqttopia
35
36
  def current_timestamp
36
37
  DateTime.now.strftime("%Q")
37
38
  end
39
+
40
+ def action_type_mapper(action_type)
41
+ {
42
+ "0" => "arrival",
43
+ "1" => "departure"
44
+ }.fetch(action_type&.to_s) { nil }
45
+ end
38
46
  end
39
47
  end
40
48
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mqttopia
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mqttopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Illa Tech
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-11 00:00:00.000000000 Z
11
+ date: 2025-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel