• R/O
  • SSH
  • HTTPS

dietmemorer: Commit


Commit MetaInfo

Revision27 (tree)
Time2008-02-08 15:31:06
Authoryaggy

Log Message

細かい間違えを修正

Change Summary

Incremental Difference

--- trunk/src/graph_creator.rb (revision 26)
+++ trunk/src/graph_creator.rb (revision 27)
@@ -134,13 +134,13 @@
134134 if @@ModeGraphEnergy == mode then
135135 befenergy = henergy[day]
136136 else
137- befenergy = henergy[day] * 3.0 / 100.0;
137+ befenergy = henergy[day].to_f * 3.0 / 100.0
138138 end
139139 end
140140
141- aweight.push(befweight)
142- afat.push(beffat)
143- aenergy.push(befenergy)
141+ aweight.push(befweight.to_f)
142+ afat.push(beffat.to_f)
143+ aenergy.push(befenergy.to_f)
144144
145145 cnt += 1
146146 end
@@ -166,7 +166,7 @@
166166 g.data("体脂肪率", afat)
167167 elsif @@ModeGraphEnergy == mode then
168168 g.title = "メモらーグラフ kcal"
169- g.data("エネルギー(kcal)", aenergy)
169+ g.data("ENERGY(kcal)", aenergy)
170170 elsif @@ModeGraphALL == mode then
171171 g.title = "メモらーグラフ"
172172 g.data("体重", aweight)
--- trunk/src/mail_analizer.rb (revision 26)
+++ trunk/src/mail_analizer.rb (revision 27)
@@ -92,7 +92,7 @@
9292 @@repmail_reset = "mail/dmr_reset.txt"
9393
9494 # まとめ時メール返信文
95- @@repmail_memo = "mail/dmr_sum.txt"
95+ @@repmail_sum = "mail/dmr_sum.txt"
9696
9797 # 曜日配列
9898 @@wdays = ["日", "月", "火", "水", "木", "金", "土"]
@@ -271,15 +271,10 @@
271271 MailControl.sendmail(smtpserver, to, from, repsub, repbody)
272272 end
273273
274- # 返信文を送信(通常のとき用)
275- def send_detail(mailfrom, smtpserver, smtpfrom)
276- send_detail(@@ReplyModeNormal, mailfrom, smtpserver, smtpfrom)
277- end
278-
279274 # 返信文を送信
280275 def send_detail(mode, mailfrom, smtpserver, smtpfrom)
281276
282- detail = create_detail(mode)
277+ detail = create_detail(mode, mailfrom)
283278
284279 if "" != detail then
285280 if mode == @@ReplyModeNormal then
@@ -301,7 +296,7 @@
301296
302297 # 返信文を作成
303298 # Return :: 返信文
304- def create_detail(mode)
299+ def create_detail(mode, mailfrom)
305300
306301 detail = ""
307302
@@ -370,7 +365,8 @@
370365 tsth.fetch do |fat|
371366 detail.concat("体脂肪率 " + fat[0].to_s + "% ")
372367 if 0 != kg then
373- detail.concat("(体脂肪 " + (fat[0] * kg / 100).to_s + "kg)")
368+ fp = fat[0] * kg
369+ detail.concat("(体脂肪 " + (fp.round / 100.0).to_s + "kg)")
374370 end
375371 detail.concat("\n")
376372 end
@@ -642,7 +638,7 @@
642638 end
643639 }
644640
645- send_detail(mailfrom, smtpserver, smtpfrom)
641+ send_detail(@@ReplyModeNormal, mailfrom, smtpserver, smtpfrom)
646642
647643 else
648644 # ユーザ登録
Show on old repository browser