nom 0.1.2 → 0.1.2.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/nom/nom.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b3afa581ea8fc93eaca6c7fc141c3dd9f9d7ae6
4
- data.tar.gz: ed8508f8e2386a7985ba38fafe1c7090c417dc2b
3
+ metadata.gz: 27efb0fe292fde361ec1639d1c71e70de981e652
4
+ data.tar.gz: 4d4868d744fd2cb5eb05d97a663c80875e539206
5
5
  SHA512:
6
- metadata.gz: a4b99e91c622dd061d28f0c8f2ed3753d25f6663723119aa21ed4e36e02b421499a5c5d3f0c1739dd5e1ac7fabb0de47f99a297c30def77862c122534772b07a
7
- data.tar.gz: 4882c4781deeb1c98f1926d2d6e338574368db5e7d42808b091b88f030f7564c69db1779052711ad65a9c04b1a71eca3f2d119e2dedba981702019e4ad9bf710
6
+ metadata.gz: 04e543295ede966eec801fdf18782749e0fe520e484a9a10c0fe118a8ca77043bc03e324db9aa6a32e35952dcaa992188f6fab6f25bdd22b4432aa52cfcf992b
7
+ data.tar.gz: d86519db8527317df7507cef31447fe40ba7f20130e8f8ed1cc2290fa03bec71f5ad79d5fb5132da03092ac7f977c4f58b855e5aa06d03000c8ea5f6b440cc14
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **nom** is a command line tool that helps you lose weight by tracking your energy intake and creating a negative feedback loop. It's inspired by John Walker's [The Hacker's Diet](https://www.fourmilab.ch/hackdiet/) and tries to automate things as much as possible.
4
4
 
5
- # Installation
5
+ ## Installation
6
6
 
7
7
  You'll need Ruby, Rubygems and gnuplot. On Windows, make sure that gnuplot's binary directory is added to your `PATH` during installation.
8
8
 
@@ -12,7 +12,7 @@ Then run this command:
12
12
 
13
13
  When you run `nom` for the first time, it will ask for your current and your desired weight.
14
14
 
15
- # Usage
15
+ ## Usage
16
16
 
17
17
  Call `nom` without arguments to get a summary of your current status:
18
18
 
@@ -89,7 +89,7 @@ Enter `nom help` if you're lost:
89
89
  start_date The first day that should be considered by nom [yyyy-mm-dd]
90
90
  balance_start The day from which on nom should keep track of a energy balance [yyyy-mm-dd]
91
91
 
92
- # Conventions
92
+ ## Conventions
93
93
 
94
94
  *nom* operates on three files in the directory `~/.nom/`: `config` contains configuration settings, `input` contains stuff you ate, `weight` contains weight measurements. You can edit them by hand.
95
95
 
data/lib/nom/nom.rb CHANGED
@@ -283,7 +283,7 @@ module Nom
283
283
  end
284
284
 
285
285
  def truncate_date
286
- if Date.today - @weights.last_real > 30
286
+ if @weights.empty or Date.today - @weights.last_real > 30
287
287
  return Date.today
288
288
  end
289
289
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Morr