runby_pace 0.6.101 → 0.6.102

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWMxZjRiMDlkYmMzZmE4NjMzOGU4NzI4YTdjZGIwNWE2OWRjZjJhMg==
4
+ N2QxZDE1NTc3YTQ3NmY2ODgyN2NmN2ZjZjMzNzg3NWZhZGE2NzM0Nw==
5
5
  data.tar.gz: !binary |-
6
- YTYxYTY1ODg1ZTNmMjIzMWRhZjEyNDZmYTUyYzVjMTk5MWU1M2NmMQ==
6
+ ZTkwYWYyYjQ5Mzg0ZGYzZmNiZDQ1YzJmMjAxY2IxYmNiYjVkMTM3Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDYzZDdhOWYyZDhiZjFkMjBiZTExM2UyNjU0MGFmZTllZjkwZGVjMDllOTBi
10
- YWU5MTZkNmFjNjAxMDBlMGZmMDNiZGM3NmViMGU3YjU2MGZkNzBmZTVjZGEz
11
- YjlhZGEyMWI3YzUyNmZjZGY0YzI1YjY0OTI5MzEzNWUxYjUzYTY=
9
+ ZmEwYzMwODM0MTcwZGM3YWVhMTE5YmZhN2JiZDgyYTk5YjVhM2JlNzJiMGI3
10
+ M2U2ZmQ2NDdhZTJhMmQ3NTVkNWY0ZTgyNWM3OTliZWFkOTdhMDFhYmQyZGI2
11
+ YmI2ZjkwNTljMGJjYTY3ZWY2MDFkN2FkZTkxNjE3ZmFiZTgzMTk=
12
12
  data.tar.gz: !binary |-
13
- MzAyN2Y0ODE3OTVmOWEzMzEyYWUzN2FjNzAwYzhlZjQ3NjhkMDFlMDg5ZmUy
14
- MTQyNDNjMTRkMGVkYTMzMzc3OTI5YWE4NWIxNmEyN2Q3NzQ5MWY5NDZiMTA3
15
- MmJlNTA1YTFiMzc3MjQwNmI2ZWQ3YTQ4MDlkZDZhYzdkNjc4NDU=
13
+ YWU1ODBjNDM3MDM2OGFjYmE5MDhhOGE0NTk0Zjk3OWMzYTU1MjIxMDg5ZjVm
14
+ ZjU1YWYzZGI3M2ZhZGVlZmVlOTFmMWI4MWM4NGE0NjQ3NmY5ODJiZmFjOTIz
15
+ OGQ5M2I3OWY1ZGNjOTUzOGIyMTk0NjBkYjRjODE0N2EwODk5NTc=
@@ -31,7 +31,9 @@ module Runby
31
31
  end
32
32
 
33
33
  def almost_equals?(other_pace, tolerance_time = '00:01')
34
+ return @time.almost_equals?(other_pace, tolerance_time) if other_pace.is_a?(RunbyTime)
34
35
  if other_pace.is_a?(String)
36
+ # TODO: Get parsing working
35
37
  other_pace = Pace.parse(other_pace)
36
38
  end
37
39
  tolerance = RunbyTime.new(tolerance_time)
@@ -37,6 +37,7 @@ module Runby
37
37
  end
38
38
 
39
39
  # Calculate the prescribed pace for the given 5K time
40
+ # @return [Pace]
40
41
  def calc(five_k_time, distance_units = :km)
41
42
  five_k_time = Runby::RunbyTime.new five_k_time
42
43
  distance_units = Runby::DistanceUnit.new distance_units
@@ -21,7 +21,7 @@ module Runby
21
21
  five_k_time = Runby::RunbyTime.new(five_k.to_s)
22
22
  pace_data = Runby::PaceCalculator.new(golden_pace_set, candidate_divisor)
23
23
  calculated_pace = pace_data.calc(five_k_time)
24
- unless calculated_pace.time.almost_equals?(golden_pace.time, allowable_deviation)
24
+ unless calculated_pace.almost_equals?(golden_pace, allowable_deviation)
25
25
  viable_divisor = nil
26
26
  break
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runby_pace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.101
4
+ version: 0.6.102
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ty Walls
@@ -100,7 +100,7 @@ homepage: https://github.com/tygerbytes/runby-pace
100
100
  licenses:
101
101
  - MIT
102
102
  metadata:
103
- commit-hash: 7dfb3961a521aebbda3d8e5eb920ce054743d9dc
103
+ commit-hash: a9b87ccccb726fe5bab0c36f050a9c6f001bf4c7
104
104
  post_install_message:
105
105
  rdoc_options: []
106
106
  require_paths: