insulin 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/insulin.gemspec +1 -1
- data/lib/insulin/day.rb +15 -0
- data/lib/insulin/event.rb +2 -1
- data/lib/insulin/version.rb +1 -1
- data/spec/insulin_day_spec.rb +7 -1
- metadata +4 -3
data/Gemfile.lock
CHANGED
data/insulin.gemspec
CHANGED
@@ -4,7 +4,7 @@ require File.expand_path('../lib/insulin/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Sam"]
|
6
6
|
gem.email = ["sam@cruft.co"]
|
7
|
-
gem.description = %q{
|
7
|
+
gem.description = %q{Take exported CSV from the OnTrack diabetes app, put it into MongoDB, and do interesting stuff with it}
|
8
8
|
gem.summary = %q{Doing stuff with my diabetes data}
|
9
9
|
gem.homepage = "http://pikesley.github.com/insulin/"
|
10
10
|
|
data/lib/insulin/day.rb
CHANGED
@@ -56,5 +56,20 @@ module Insulin
|
|
56
56
|
]
|
57
57
|
s
|
58
58
|
end
|
59
|
+
|
60
|
+
def minimal
|
61
|
+
s = ""
|
62
|
+
s << @date
|
63
|
+
s << "\n"
|
64
|
+
|
65
|
+
self["all"].each do |e|
|
66
|
+
if ["breakfast", "lunch", "dinner", "bedtime"].include? e["tag"]
|
67
|
+
s << e.simple
|
68
|
+
s << "\n"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
s
|
73
|
+
end
|
59
74
|
end
|
60
75
|
end
|
data/lib/insulin/event.rb
CHANGED
data/lib/insulin/version.rb
CHANGED
data/spec/insulin_day_spec.rb
CHANGED
@@ -29,8 +29,14 @@ describe Insulin::Day do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it "should display correctly" do
|
32
|
-
d.to_s.should include "19:07:42 BST medication humalog 6.0 x10^-5 L"
|
32
|
+
d.to_s.should include "19:07:42 BST dinner medication humalog 6.0 x10^-5 L"
|
33
33
|
end
|
34
34
|
|
35
|
+
it "minimal display should be correct" do
|
36
|
+
d.minimal.should_not include "exercise"
|
37
|
+
end
|
38
|
+
|
39
|
+
puts d.minimal
|
40
|
+
|
35
41
|
drop_test_db
|
36
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: insulin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -139,7 +139,8 @@ dependencies:
|
|
139
139
|
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
|
-
description:
|
142
|
+
description: Take exported CSV from the OnTrack diabetes app, put it into MongoDB,
|
143
|
+
and do interesting stuff with it
|
143
144
|
email:
|
144
145
|
- sam@cruft.co
|
145
146
|
executables:
|