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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ee49b6b99023d43bef8396cb0c1ab9ba4ef99e6c96285b4c4405eb3d163807d
4
- data.tar.gz: 442169e5414c141390261da86e5cc312eda98c685bbc64530ca7692d39773119
3
+ metadata.gz: ad0a05f7bb09cab7b54e4c01ec1fd36c274d87369d6991893372845765e8b525
4
+ data.tar.gz: b51863dbd58e508ba47bcdd8cf9f60f52c43dd78099e39591021753aeffac01e
5
5
  SHA512:
6
- metadata.gz: ae31a9047296eb8848030d08d35af80bd9af22f5ae5ac65de727e99b7448155918198caa2467edb5a3371c92d6f3f4b4c54adef1d0d8da51bc19b4b9cafb680d
7
- data.tar.gz: 57b06d49de20b1415ec230c1d2bfd3ac495dc4c8c3ed25e684fcdf3072fef142728394942706aa39892b69eea3ce9b1b1e9f8c2fdb3efea7fbd3bd7e90016fa3
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
@@ -1,7 +1,7 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- addressable (2.8.9)
4
+ addressable (2.9.0)
5
5
  public_suffix (>= 2.0.2, < 8.0)
6
6
  ast (2.4.3)
7
7
  bigdecimal (4.1.0)
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 marathon.
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
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Calcpace
4
- VERSION = '1.9.3'
4
+ VERSION = '1.9.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calcpace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Gilberto Saraiva