lita-diabetter 0.1.1.alpha.21 → 0.1.1.alpha.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/diabetter.rb +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a4f2ebfab7985c2de70434e631b3cf28d7cf91
|
4
|
+
data.tar.gz: d86bd40e0c90648a13d420ad86e14a1689d958dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76c38ed7c2a3fd6647e388e85a57878c59ae4ebc79d6d552e370f9424e1ab144f7093409f38807854b922378b95e3021be2772c9ede1c3bf0a913e272f385a3b
|
7
|
+
data.tar.gz: c8b4a81f50486db36e53e20ae3ed55c3a3883d617d2d513ff86abf94e38bd8792ac80e2d7c29d62bb7894f5502a9fb4c50fd2faac3b5ab53b5ba9f24ed8a92dd
|
@@ -50,8 +50,13 @@ module Lita
|
|
50
50
|
|
51
51
|
type = 'mmol'
|
52
52
|
elsif input.to_f >= @@lower && input.to_f < @@upper
|
53
|
-
mmol =
|
54
|
-
|
53
|
+
mmol = input.to_f.round(1)
|
54
|
+
mgdl_from_mmol = mmol_to_mgdl(input.to_f)
|
55
|
+
mgdl = input.to_f
|
56
|
+
|
57
|
+
dcct_alt = mgdl_to_dcct(mgdl_from_mmol)
|
58
|
+
ifcc_alt = dcct_to_ifcc(dcct_alt).round(0).to_s
|
59
|
+
dcct_alt = dcct.round(1).to_s
|
55
60
|
|
56
61
|
type = 'unknown'
|
57
62
|
else
|
@@ -68,7 +73,7 @@ module Lita
|
|
68
73
|
|
69
74
|
if type == 'unknown'
|
70
75
|
reply = "*I'm not sure if you entered mmol/L or mg/dL, so I'll give you both*\n"
|
71
|
-
reply += make_average_sentence('mmol', mmol,
|
76
|
+
reply += make_average_sentence('mmol', mmol, dcct_alt, ifcc_alt) + "\n"
|
72
77
|
reply += make_average_sentence('mgdl', mgdl, dcct, ifcc)
|
73
78
|
elsif type=='mmol'
|
74
79
|
reply = make_average_sentence('mmol', mmol, dcct, ifcc)
|