runby_pace 0.2.65 → 0.2.66
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 +8 -8
- data/lib/runby_pace/pace_range.rb +6 -0
- data/lib/runby_pace/run_math.rb +5 -0
- data/lib/runby_pace/speed_range.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjRkNDNjMDBjN2EyMDY0MzgyOTMyYTgyZjlkNjExNTU5MGZjMTg0Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDQyYzJjMDhiMDI5NGUyZGE2MmMwNmFlZjE4MjIzYmQ0ODM4Mzg0Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjFhYmRjN2ZjYjYyNDgxYjUzYzUzMzIxOTFiMjcxM2NkZGI5NTJlMzg3OWVi
|
10
|
+
MzkyNzMzNmJjNDk3NTM3MDdjYTc4YWZiMjMzZjRiOWE0ZmFjZGFhNWRiYTkx
|
11
|
+
ZjM4NTkxNTNlMDA0MGUwNDUyMGJhMzM2MmQzNDY2NmFjZThjYmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGEwZWZkNzlmYTE3ZjA1NmYzMGNhOWFmNWE4MTYxZGNmZjkwNWNmMWJmNTgw
|
14
|
+
YThmNGY1ODgzMDJjZDNhZmRmYWZjZGY0NmM0NDc2OTc0MzRhMjU1NTYzZTM4
|
15
|
+
NjEyY2IxYWZmNzMwMWM1Mjk3N2NkOTlmZWIzMTMzMjA3ZTFhZDc=
|
@@ -7,5 +7,11 @@ module RunbyPace
|
|
7
7
|
@fast = RunbyPace::PaceTime.new(fast)
|
8
8
|
@slow = RunbyPace::PaceTime.new(slow)
|
9
9
|
end
|
10
|
+
|
11
|
+
def self.from_speed_range(speed_range)
|
12
|
+
fast = RunbyPace::RunMath.convert_speed_to_pace speed_range.fast
|
13
|
+
slow = RunbyPace::RunMath.convert_speed_to_pace speed_range.slow
|
14
|
+
PaceRange.new fast, slow
|
15
|
+
end
|
10
16
|
end
|
11
17
|
end
|
data/lib/runby_pace/run_math.rb
CHANGED
@@ -5,6 +5,11 @@ module RunbyPace
|
|
5
5
|
pace = RunbyPace::PaceTime.new(pace)
|
6
6
|
(60 / pace.total_minutes).round(2)
|
7
7
|
end
|
8
|
+
|
9
|
+
def self.convert_speed_to_pace(units_per_hour)
|
10
|
+
raise 'units_per_hour must be numeric' unless units_per_hour.is_a? Numeric
|
11
|
+
RunbyPace::PaceTime.from_minutes (60.0 / units_per_hour)
|
12
|
+
end
|
8
13
|
end
|
9
14
|
|
10
15
|
end
|
@@ -8,5 +8,11 @@ module RunbyPace
|
|
8
8
|
@fast = fast.round(2)
|
9
9
|
@slow = slow.round(2)
|
10
10
|
end
|
11
|
+
|
12
|
+
def self.from_pace_range(pace_range)
|
13
|
+
fast = RunbyPace::RunMath.convert_pace_to_speed pace_range.fast
|
14
|
+
slow = RunbyPace::RunMath.convert_pace_to_speed pace_range.slow
|
15
|
+
SpeedRange.new fast, slow
|
16
|
+
end
|
11
17
|
end
|
12
18
|
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.2.
|
4
|
+
version: 0.2.66
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ty Walls
|
@@ -96,7 +96,7 @@ homepage: https://github.com/tygerbytes/runby-pace
|
|
96
96
|
licenses:
|
97
97
|
- MIT
|
98
98
|
metadata:
|
99
|
-
commit-hash:
|
99
|
+
commit-hash: c08aeaeb42a5b2b04facd45cc98dcb9b566a8109
|
100
100
|
post_install_message:
|
101
101
|
rdoc_options: []
|
102
102
|
require_paths:
|