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 +4 -4
- data/lib/mqttopia/serializers/trip_point.rb +8 -0
- data/lib/mqttopia/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c742f5f768390150ffadb94a8c47dc197f95e02c0ff137ba0fee384fbd8f8313
|
4
|
+
data.tar.gz: a8da45694aef218efa74d141979869c264252fba7a1c8fe736728933971c70c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/mqttopia/version.rb
CHANGED
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.
|
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
|
+
date: 2025-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|