rnnr 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9e3d92fcc6de1ab8c49b90ea5c95e14def6957e
4
- data.tar.gz: 7fc201c4dd51ae57f34c0d3ed82607f04278aac6
3
+ metadata.gz: 856f3f9a1ed27d01c8153523f379b1719f50d5e1
4
+ data.tar.gz: 7d3fafa2c6fc80efb01f4369bf3009ca6a105e45
5
5
  SHA512:
6
- metadata.gz: f9ac1e98d75d43cf19bb2a11519888269575b607791600f0c210a964b52e3b3bf755852ed3bfbe26bcbc712bb24c675b9e047a5c4e013d1704ab3407af767274
7
- data.tar.gz: e26c219bfb11c1bf609453123bf3e0317d99c9875b3b2dd162e83e99e1afb3894f84fc44f717dd6b132f71baa644b71a64f7c3131a17bbd2ee836e819638e2ca
6
+ metadata.gz: dbe261523a4c8c100fb3c2a17dc829ddb38443121c13bb5ad9f877bb5c94789a975a9bfbd1b2b52442bb709b25b23c54cbc9515ea4ae127d387efff5fca39cb9
7
+ data.tar.gz: c1552bbf735a96acd77383cbdb50bfbfb6f54f41c39fc29a3bee5cc4046b6a71d3162e26f75e0f236f143a7c98bb314f15f979a0d3f4e4c13a53e2917020317d
@@ -20,10 +20,12 @@ module Rnnr
20
20
  c.description = 'Send email of year-to-date running total'
21
21
  c.option '--offset INTEGER', Integer, 'Offset for days in year'
22
22
  c.option '--email <true/false>', String, 'Send an email'
23
+ c.option '--disp <true/false>', String, 'Print results to screen'
23
24
  c.option '--config_dir directory', String, 'Directory where your .rnnr_config.yml file lives'
24
25
  c.action do |args, options|
25
26
  options.default :offset => 0,
26
27
  :email => 'false',
28
+ :disp => 'true',
27
29
  :config_dir => "~/"
28
30
  Rnnr.send options
29
31
  end
@@ -1,3 +1,3 @@
1
1
  module Rnnr
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -41,15 +41,12 @@ module Rnnr
41
41
  weekly_distance = weekly_distance.to_miles.round(2)
42
42
  milesperday = (yearly_distance / (Date.today.yday - options.offset)).round(2)
43
43
 
44
- rslt_str = "Yearly: #{yearly_distance}"\
45
- "\nWeekly: #{weekly_distance}"\
44
+ rslt_str = "Yearly: #{yearly_distance}"\
45
+ "\nWeekly: #{weekly_distance}"\
46
46
  "\nMiles/Day: #{milesperday}"\
47
47
 
48
- if options.email == 'true'
49
- send_email rslt_str
50
- else
51
- puts rslt_str
52
- end
48
+ send_email rslt_str if options.email == 'true'
49
+ puts rslt_str if options.disp == 'true'
53
50
  else
54
51
  raise "Unable to retrieve workout data"
55
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rnnr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Merritt