calcpace 1.9.3 → 1.9.4
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 +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/calcpace/cameron_predictor.rb +1 -1
- data/lib/calcpace/pace_calculator.rb +6 -5
- data/lib/calcpace/race_predictor.rb +1 -1
- data/lib/calcpace/race_splits.rb +2 -2
- data/lib/calcpace/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad0a05f7bb09cab7b54e4c01ec1fd36c274d87369d6991893372845765e8b525
|
|
4
|
+
data.tar.gz: b51863dbd58e508ba47bcdd8cf9f60f52c43dd78099e39591021753aeffac01e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1e69f141956c85101541603d622ca3a667f1d8cf0dbe4d71f7410d4beaa6404f809125754854087ee737d0651029185493ce9b09f755f559b99aa53bd3068cd
|
|
7
|
+
data.tar.gz: c9218b303fb0c9288c904500998a86d81f48dc388b05c62a42c52f93829c03f3d43f14f7b60b88bd9b7046b41b0089100ca7f9e748a37f2021e29cfd5e464da3
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.4] - 2026-04-18
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Standard race distance support for **100K** (100.0 km)
|
|
12
|
+
- Supported in `PaceCalculator`, `RacePredictor`, `CameronPredictor`, and `RaceSplits`
|
|
13
|
+
- Updated `list_races` to include 100K
|
|
14
|
+
- Added integration tests for 100K race distance across all modules
|
|
15
|
+
|
|
16
|
+
## [1.9.3] - 2026-04-05
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- VO2max Estimator module (`Vo2maxEstimator`)
|
|
20
|
+
- Daniels & Gilbert (1979) formula for VO2max estimation from race results
|
|
21
|
+
- Performance level labels (Elite, Excellent, etc.)
|
|
22
|
+
- Improved time validation using strict `check_time` and `convert_to_seconds`
|
|
23
|
+
- Updated YARD documentation for all calculation methods
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- Gemspec formatting and line length constraints
|
|
27
|
+
- README structure and documentation examples
|
|
28
|
+
|
|
29
|
+
## [1.9.2] - 2026-03-31
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- Track Calculator module (`TrackCalculator`)
|
|
33
|
+
- Haversine distance calculation for GPS coordinates
|
|
34
|
+
- Elevation gain and loss analysis
|
|
35
|
+
- Automated track splits based on GPS points
|
|
36
|
+
|
|
8
37
|
## [1.9.1] - 2026-03-30
|
|
9
38
|
|
|
10
39
|
### Changed
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -64,7 +64,7 @@ calc.pace_mi_to_km('08:00') # => "00:04:58"
|
|
|
64
64
|
```ruby
|
|
65
65
|
calc.race_time_clock('05:00', 'marathon') # => "03:30:58"
|
|
66
66
|
calc.race_pace_clock('04:00:00', 'marathon') # => "00:05:41"
|
|
67
|
-
calc.list_races # => { '5k' => 5.0, '10k' => 10.0, 'half_marathon' => 21.0975, ... }
|
|
67
|
+
calc.list_races # => { '5k' => 5.0, '10k' => 10.0, 'half_marathon' => 21.0975, 'marathon' => 42.195, '100k' => 100.0, ... }
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
---
|
|
@@ -24,7 +24,7 @@ module CameronPredictor
|
|
|
24
24
|
|
|
25
25
|
# Predicts race time using the Cameron formula
|
|
26
26
|
#
|
|
27
|
-
# @param from_race [String, Symbol] known race distance ('5k', '10k', 'half_marathon', 'marathon', etc.)
|
|
27
|
+
# @param from_race [String, Symbol] known race distance ('5k', '10k', 'half_marathon', 'marathon', '100k', etc.)
|
|
28
28
|
# @param from_time [String, Numeric] time achieved at known distance (HH:MM:SS or seconds)
|
|
29
29
|
# @param to_race [String, Symbol] target race distance to predict
|
|
30
30
|
# @return [Float] predicted time in seconds
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Module for calculating race times and paces for standard distances
|
|
4
4
|
#
|
|
5
5
|
# This module provides convenience methods for calculating finish times
|
|
6
|
-
# and paces for common race distances like 5K, 10K, half-marathon, and
|
|
6
|
+
# and paces for common race distances like 5K, 10K, half-marathon, marathon, and 100K.
|
|
7
7
|
module PaceCalculator
|
|
8
8
|
# Standard race distances in kilometers
|
|
9
9
|
RACE_DISTANCES = {
|
|
@@ -11,6 +11,7 @@ module PaceCalculator
|
|
|
11
11
|
'10k' => 10.0,
|
|
12
12
|
'half_marathon' => 21.0975,
|
|
13
13
|
'marathon' => 42.195,
|
|
14
|
+
'100k' => 100.0,
|
|
14
15
|
'1mile' => 1.60934,
|
|
15
16
|
'5mile' => 8.04672,
|
|
16
17
|
'10mile' => 16.0934
|
|
@@ -19,7 +20,7 @@ module PaceCalculator
|
|
|
19
20
|
# Calculates the finish time for a race given a pace per kilometer
|
|
20
21
|
#
|
|
21
22
|
# @param pace_per_km [Numeric, String] pace in seconds per km or time string (MM:SS)
|
|
22
|
-
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon')
|
|
23
|
+
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon', '100k')
|
|
23
24
|
# @return [Float] total time in seconds
|
|
24
25
|
# @raise [ArgumentError] if race distance is not recognized
|
|
25
26
|
#
|
|
@@ -36,7 +37,7 @@ module PaceCalculator
|
|
|
36
37
|
# Calculates the finish time for a race and returns it as a clock time string
|
|
37
38
|
#
|
|
38
39
|
# @param pace_per_km [Numeric, String] pace in seconds per km or time string (MM:SS)
|
|
39
|
-
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon')
|
|
40
|
+
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon', '100k')
|
|
40
41
|
# @return [String] finish time in HH:MM:SS format
|
|
41
42
|
#
|
|
42
43
|
# @example
|
|
@@ -49,7 +50,7 @@ module PaceCalculator
|
|
|
49
50
|
# Calculates the required pace per kilometer to finish a race in a target time
|
|
50
51
|
#
|
|
51
52
|
# @param target_time [Numeric, String] target finish time in seconds or time string (HH:MM:SS)
|
|
52
|
-
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon')
|
|
53
|
+
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon', '100k')
|
|
53
54
|
# @return [Float] required pace in seconds per kilometer
|
|
54
55
|
#
|
|
55
56
|
# @example
|
|
@@ -65,7 +66,7 @@ module PaceCalculator
|
|
|
65
66
|
# Calculates the required pace and returns it as a clock time string
|
|
66
67
|
#
|
|
67
68
|
# @param target_time [Numeric, String] target finish time in seconds or time string (HH:MM:SS)
|
|
68
|
-
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon')
|
|
69
|
+
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon', '100k')
|
|
69
70
|
# @return [String] required pace in MM:SS format
|
|
70
71
|
#
|
|
71
72
|
# @example
|
|
@@ -19,7 +19,7 @@ module RacePredictor
|
|
|
19
19
|
# - D2 = target distance
|
|
20
20
|
# - 1.06 = endurance/fatigue factor (longer races require proportionally more time)
|
|
21
21
|
#
|
|
22
|
-
# @param from_race [String, Symbol] known race distance ('5k', '10k', 'half_marathon', 'marathon', etc.)
|
|
22
|
+
# @param from_race [String, Symbol] known race distance ('5k', '10k', 'half_marathon', 'marathon', '100k', etc.)
|
|
23
23
|
# @param from_time [String, Numeric] time achieved at known distance (HH:MM:SS or seconds)
|
|
24
24
|
# @param to_race [String, Symbol] target race distance to predict
|
|
25
25
|
# @return [Float] predicted time in seconds
|
data/lib/calcpace/race_splits.rb
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
module RaceSplits
|
|
8
8
|
# Calculates split times for a race
|
|
9
9
|
#
|
|
10
|
-
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon', etc.)
|
|
10
|
+
# @param race [String, Symbol] race distance ('5k', '10k', 'half_marathon', 'marathon', '100k', etc.)
|
|
11
11
|
# @param target_time [String] target finish time in HH:MM:SS or MM:SS format
|
|
12
12
|
# @param split_distance [String, Numeric] distance for each split ('5k', '1k', '1mile', or numeric in km)
|
|
13
13
|
# @param strategy [Symbol] pacing strategy - :even (default), :negative, or :positive
|
|
@@ -42,7 +42,7 @@ module RaceSplits
|
|
|
42
42
|
if split_distance.is_a?(Numeric)
|
|
43
43
|
split_distance.to_f
|
|
44
44
|
elsif split_distance.is_a?(String)
|
|
45
|
-
# Try to get from RACE_DISTANCES first (includes standard distances like '5k', '1mile', etc.)
|
|
45
|
+
# Try to get from RACE_DISTANCES first (includes standard distances like '5k', '100k', '1mile', etc.)
|
|
46
46
|
distance_key = split_distance.to_s.downcase
|
|
47
47
|
|
|
48
48
|
# Check if it's a standard race distance
|
data/lib/calcpace/version.rb
CHANGED