insulin 0.0.12 → 0.0.13

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- insulin (0.0.11)
4
+ insulin (0.0.12)
5
5
  bson_ext
6
6
  ffi
7
7
  mongo
@@ -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{Doing stuff with my diabetes data}
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
 
@@ -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
@@ -59,8 +59,9 @@ module Insulin
59
59
  end
60
60
 
61
61
  def simple
62
- s = " %s %-10s %-10s %4.1f %s" % [
62
+ s = " %s %-10s %-10s %-10s %4.1f %s" % [
63
63
  self["time"],
64
+ self["tag"],
64
65
  self["type"],
65
66
  self["subtype"],
66
67
  self["value"],
@@ -1,5 +1,5 @@
1
1
  module Insulin
2
2
 
3
3
  # Current version
4
- VERSION = "0.0.12"
4
+ VERSION = "0.0.13"
5
5
  end
@@ -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.12
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-09 00:00:00.000000000 Z
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: Doing stuff with my diabetes data
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: