runby_pace 0.2.71 → 0.2.72

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjhlYzg2MDU4ODg4Njg4MDM2ZjQ0ZjZmOTY3OGRmMDAxZmI0OGZhZg==
4
+ YTM2ZGQ2YmIyZmNkMGM0NGViOTdiZTQzMjY4YTBmNzA0ZjQ3NWNhZg==
5
5
  data.tar.gz: !binary |-
6
- OTkxZmY3YzNhMDI0OTNmZDUwNzdhMjhlYjAyZGM2YzY2MzczNjM0MQ==
6
+ N2I4M2M2MjRhY2IzMDkxZmEwN2NkOTIyMTUzNDc3ZTNkNmFmMDg5Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTIxN2Q1ODdlZDE3NDFkMThjYmIyZDQ4M2UxMGIzNjRkYWM3MWQ2ZjBhNzMw
10
- ZWY3ZjBkYTcwMzA4YmIwYjdjMTY1ZTE5NTUwYzNkOTcwZTU2NDZiMDQzZWVi
11
- MWY4MWI4M2JmNGViODI4OGM0ODNjZjU2MzVkMTY5ZjUyOTIwZjc=
9
+ YWFjOWY4MTU5ZDdmZTI4NWM0Njk5MDcxMTQ2YzdiN2Q0MDY0MTg4MGI3NjBj
10
+ OTZjZjExMmMxMGIxYzQ3ZTE1NjI5N2JkYTMxMjgwMWViZDU1MDNlNGZlNDYy
11
+ NGI3MjA1NTVmOGE5YTljOTA0MmE1NDExZDQ2NTU1MDc5NzExNTc=
12
12
  data.tar.gz: !binary |-
13
- MDM5NTkwMzgxOTUzMWE5ZjBlMGVmNWQ3YzYyNjE2ZWMzODRiOWIxNTNmNjZl
14
- ODE0YjdlMGZmZTE3MTUxOWY2MjJmOTU1YjZkOGRmYjA0YWFlOTRjZjhjODY3
15
- ZTFhODk4YjYwNjFlMzZmZTY2ZWM2ZmQwOGNkZjkwZDFhOGVhNGM=
13
+ NDRkYmFkN2UwNTg5ODI4MTgwYWUzOGJhNDEzYzJkYTEwZWJlY2Y1YzZiNzY1
14
+ ZGVkODcxYTg5ZDM0MTZkNzViZGYxMzFiYWE1MWE5YjI1ZDM0Zjg0MzM0NDEy
15
+ MDE4ZDUyYmIzNzkzMWQ1ZTA3ZmRlZmI4YTRiMWYwNTBjMjA2YzY=
data/lib/runby_pace.rb CHANGED
@@ -3,5 +3,6 @@ require 'runby_pace/version'
3
3
  Dir[File.dirname(__FILE__) + '/runby_pace/*.rb'].each { |file| require file }
4
4
  Dir[File.dirname(__FILE__) + '/runby_pace/run_types/*.rb'].each { |file| require file }
5
5
 
6
+ # The main module
6
7
  module RunbyPace
7
8
  end
@@ -1,4 +1,5 @@
1
1
  module RunbyPace
2
+ # Encapsulates the algorithms used to calculate target paces.
2
3
  class PaceData
3
4
  # The number of data points plotted on our line of 5K times.
4
5
  # We take 5K times from 14:00 to 42:00 with a sample rate
@@ -1,6 +1,7 @@
1
1
  require_relative 'runby_range'
2
2
 
3
3
  module RunbyPace
4
+ # Represents a range of paces, from fast to slow.
4
5
  class PaceRange < RunbyRange
5
6
  def initialize(fast, slow)
6
7
  @fast = RunbyPace::PaceTime.new(fast)
@@ -1,4 +1,5 @@
1
1
  module RunbyPace
2
+ # Represents a human-readable time in the format MM:ss
2
3
  class PaceTime
3
4
  attr_reader :time_s, :minutes_part, :seconds_part
4
5
 
@@ -16,7 +17,7 @@ module RunbyPace
16
17
  def self.from_seconds(total_seconds)
17
18
  minutes = total_seconds.abs.to_i / 60
18
19
  seconds = total_seconds.abs.to_i % 60
19
- PaceTime.new("#{'%02d' % minutes}:#{'%02d' % seconds}")
20
+ PaceTime.new format("#{'%02d'}:#{'%02d'}", minutes, seconds)
20
21
  end
21
22
 
22
23
  # @param [numeric] total_minutes
@@ -63,7 +64,7 @@ module RunbyPace
63
64
  time, error_message, warning_message = nil
64
65
  begin
65
66
  time = parse str
66
- rescue Exception => ex
67
+ rescue StandardError => ex
67
68
  error_message = "#{ex.message} (#{str})"
68
69
  end
69
70
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runby_pace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.71
4
+ version: 0.2.72
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ty Walls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-09 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ homepage: https://github.com/tygerbytes/runby-pace
97
97
  licenses:
98
98
  - MIT
99
99
  metadata:
100
- commit-hash: 0be7822d124d28b3fcd852ac12bc1019eba9fae2
100
+ commit-hash: 3bc041f857bfd2ebbfa92367f9f7ecd0a3502f4a
101
101
  post_install_message:
102
102
  rdoc_options: []
103
103
  require_paths: