quelink-mg 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/quelink-mg/ack/base.rb +1 -1
- data/lib/quelink-mg/resp/base.rb +1 -1
- data/pkg/quelink-mg.gem +0 -0
- data/quelink-mg.gemspec +1 -1
- data/spec/quelink_mg/ack/gtbsi_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtcfg_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtcmd_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtfri_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtqss_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtrto_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtsri_spec.rb +1 -2
- data/spec/quelink_mg/ack/gtudf_spec.rb +1 -2
- data/spec/quelink_mg/resp/gtfri_spec.rb +2 -4
- data/spec/quelink_mg/resp/gtgsv_spec.rb +1 -2
- data/spec/quelink_mg/resp/gtinf_spec.rb +2 -4
- data/spec/quelink_mg/resp/gtsos_spec.rb +2 -4
- data/spec/quelink_mg/resp/gtstt_spec.rb +2 -4
- data/spec/quelink_mg/resp/gtupc_spec.rb +1 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ea5c2cf43ce12b5862a854e1cec5cc7149fa196f70cc6de57390d8ba4e4ef0b
|
4
|
+
data.tar.gz: ced81a168e9b4c4db172bcb205b16a1e4c981cb03ea3a565149b1524487c1c88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c27447f6092dcf66651a7cb7154fe85c8d491ee8945a111dad3f950ec4077f3d231425d468af84ab501ef525dad525b0a55726ec48158909c608a75a986ea4d9
|
7
|
+
data.tar.gz: 1772f49c7e43a6e2d47eafb541428f88bb1611dc0e7f5782a76d1957a57fff7067daad797d1d5ed9cb99643c250047570c5ae90b1d62ce6007fcd4ec48ba1f78
|
data/Gemfile.lock
CHANGED
data/lib/quelink-mg/ack/base.rb
CHANGED
data/lib/quelink-mg/resp/base.rb
CHANGED
data/pkg/quelink-mg.gem
ADDED
Binary file
|
data/quelink-mg.gemspec
CHANGED
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtbsi do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtcfg do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtcmd do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtfri do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtqss do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -9,7 +9,6 @@ RSpec.describe QuelinkMg::Ack::Gtrto do
|
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
11
|
expect(parsed_response['sub_command']).to eq 'READ'
|
12
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
13
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
12
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
14
13
|
end
|
15
14
|
end
|
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtsri do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -8,7 +8,6 @@ RSpec.describe QuelinkMg::Ack::Gtudf do
|
|
8
8
|
parsed_response = described_class.new(response:).hash
|
9
9
|
expect(parsed_response['protocol_version']).to eq 'D40102'
|
10
10
|
expect(parsed_response['unique_id']).to eq 868_239_051_011_356
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20210816045509') }.in_time_zone
|
13
12
|
end
|
14
13
|
end
|
@@ -8,10 +8,8 @@ RSpec.describe QuelinkMg::Resp::Gtfri do
|
|
8
8
|
|
9
9
|
parsed_response = described_class.new(response:).hash
|
10
10
|
expect(parsed_response).not_to eq({})
|
11
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
12
|
-
|
13
|
-
expect(parsed_response['gps_utc_time']).to eq Time.zone.strptime('20230813061232',
|
14
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
11
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230813061231') }.in_time_zone
|
12
|
+
expect(parsed_response['gps_utc_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230813061232') }.in_time_zone
|
15
13
|
expect(parsed_response['longitude']).to eq 21.012847
|
16
14
|
expect(parsed_response['latitude']).to eq 52.200338
|
17
15
|
expect(parsed_response['unique_id']).to eq 860_201_061_504_521
|
@@ -11,8 +11,7 @@ RSpec.describe QuelinkMg::Resp::Gtgsv do
|
|
11
11
|
expect(parsed_response['sv_count']).to eq 11
|
12
12
|
expect(parsed_response['sv_id_3']).to eq 5
|
13
13
|
expect(parsed_response['sv_power_3']).to eq 22
|
14
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
15
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
14
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230806094936') }.in_time_zone
|
16
15
|
expect(parsed_response['count_number']).to eq '3E2C$'
|
17
16
|
end
|
18
17
|
end
|
@@ -18,12 +18,10 @@ RSpec.describe QuelinkMg::Resp::Gtinf do
|
|
18
18
|
expect(parsed_response['charging']).to eq 1
|
19
19
|
expect(parsed_response['led_on']).to eq 1
|
20
20
|
expect(parsed_response['gps_on_need']).to eq 0
|
21
|
-
expect(parsed_response['last_gps_fix_utc_time']).to eq Time.zone.
|
22
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
21
|
+
expect(parsed_response['last_gps_fix_utc_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230811034659') }.in_time_zone
|
23
22
|
expect(parsed_response['battery_percentage']).to eq 100
|
24
23
|
expect(parsed_response['temperature']).to eq 36.7
|
25
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
26
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
24
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230811114700') }.in_time_zone
|
27
25
|
expect(parsed_response['count_number']).to eq '00A0$'
|
28
26
|
end
|
29
27
|
end
|
@@ -17,16 +17,14 @@ RSpec.describe QuelinkMg::Resp::Gtsos do
|
|
17
17
|
expect(parsed_response['altitude']).to eq 116.7
|
18
18
|
expect(parsed_response['longitude']).to eq 114.015807
|
19
19
|
expect(parsed_response['latitude']).to eq 22.53724
|
20
|
-
expect(parsed_response['gps_utc_time']).to eq Time.zone.
|
21
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
20
|
+
expect(parsed_response['gps_utc_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230806074855') }.in_time_zone
|
22
21
|
expect(parsed_response['mcc']).to eq 460
|
23
22
|
expect(parsed_response['mnc']).to eq 0
|
24
23
|
expect(parsed_response['lac']).to eq '27BD'
|
25
24
|
expect(parsed_response['cel_id']).to eq '0DFC'
|
26
25
|
expect(parsed_response['odo_mileage']).to eq ''
|
27
26
|
expect(parsed_response['battery_percentage']).to eq 100
|
28
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
29
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
27
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230806074855') }.in_time_zone
|
30
28
|
expect(parsed_response['count_number']).to eq '00F8$'
|
31
29
|
end
|
32
30
|
end
|
@@ -15,15 +15,13 @@ RSpec.describe QuelinkMg::Resp::Gtstt do
|
|
15
15
|
expect(parsed_response['altitude']).to eq 212.0
|
16
16
|
expect(parsed_response['last_longitude']).to eq 114.016205
|
17
17
|
expect(parsed_response['last_latitude']).to eq 22.539455
|
18
|
-
expect(parsed_response['gps_utc_time']).to eq Time.zone.
|
19
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
18
|
+
expect(parsed_response['gps_utc_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230811055755') }.in_time_zone
|
20
19
|
expect(parsed_response['mcc']).to eq 460
|
21
20
|
expect(parsed_response['mnc']).to eq 1
|
22
21
|
expect(parsed_response['lac']).to eq '253D'
|
23
22
|
expect(parsed_response['cell_id']).to eq 'AEC3'
|
24
23
|
expect(parsed_response['odo_mileage']).to eq 0.2
|
25
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
26
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
24
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230811135756') }.in_time_zone
|
27
25
|
expect(parsed_response['count_number']).to eq '012E$'
|
28
26
|
end
|
29
27
|
end
|
@@ -11,8 +11,7 @@ RSpec.describe QuelinkMg::Resp::Gtupc do
|
|
11
11
|
expect(parsed_response['command_id']).to eq 0
|
12
12
|
expect(parsed_response['result']).to eq 100
|
13
13
|
expect(parsed_response['download_url']).to eq 'https://www.example.com/UPC_1.ini'
|
14
|
-
expect(parsed_response['send_time']).to eq Time.zone.
|
15
|
-
QuelinkMg::Resp::Base::QUELINK_DATE_FORMAT)
|
14
|
+
expect(parsed_response['send_time']).to eq Time.use_zone('UTC') { Time.zone.parse('20230811142238') }.in_time_zone
|
16
15
|
expect(parsed_response['count_number']).to eq '0155$'
|
17
16
|
end
|
18
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quelink-mg
|
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
|
- Stanislaw Zawadzki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/quelink-mg/resp/gtstt.rb
|
119
119
|
- lib/quelink-mg/resp/gtupc.rb
|
120
120
|
- lib/quelink_mg.rb
|
121
|
+
- pkg/quelink-mg.gem
|
121
122
|
- quelink-mg.gemspec
|
122
123
|
- spec/quelink_mg/ack/gtbsi_spec.rb
|
123
124
|
- spec/quelink_mg/ack/gtcfg_spec.rb
|