runby_pace 0.2.67 → 0.2.68
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_time.rb +9 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmI2OGI5NzcwY2E4NThkYjhjZWI3YzZiODQyYjcxOWI0NzBkMzdhOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzliNTc0MWU3NGUwNzE3ZGEyZWQ5ZWY1OGJjYjVhN2YyMzhmY2UwNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTJhNjIwNTIwMmI3OTI0MzYwNTQxZDc5NTQzOGU3MDU5NDU0NmM2ODdmNWRh
|
10
|
+
OTBmNjYyOWMxZDYxNzM2MmMxNzU3MGNkOTMxMDA2NThiOWNiMTdlM2E4NGE4
|
11
|
+
NmJkMGVjMTEzMDZlMTM4MzBlODA3MmI3YjkwOTgzOTljMzVjZjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzlmNzI1MzdjMTE1MmFkNTQxMzBlMjFjZDlkYWRiYjJlMWJlYTJjYTMzMDFk
|
14
|
+
NDI4ZmIxMzZjMWM4YzFjMjQ2MjViYzdkM2Y2NDE3MmM1MWRhZGQ3MTU0NDlm
|
15
|
+
YmU1NTFmZDg4ZDJiMjA4NTVlNjk0NjJkMzg4YjkzMGE2OTFmZmY=
|
data/lib/runby_pace/pace_time.rb
CHANGED
@@ -60,15 +60,21 @@ module RunbyPace
|
|
60
60
|
PaceTime.new({ :time_s => time_formatted, :minutes_part => minutes_part, :seconds_part => seconds_part })
|
61
61
|
end
|
62
62
|
|
63
|
-
def self.try_parse(str)
|
64
|
-
time, error_message = nil
|
63
|
+
def self.try_parse(str, is_five_k = false)
|
64
|
+
time, error_message, warning_message = nil
|
65
65
|
begin
|
66
66
|
time = self.parse str
|
67
67
|
rescue Exception => ex
|
68
68
|
error_message = "#{ex.message} (#{str})"
|
69
69
|
end
|
70
70
|
|
71
|
-
|
71
|
+
# Break out these sanity checks into their own class if we add any more.
|
72
|
+
if !time.nil? && is_five_k
|
73
|
+
if time.minutes_part < 14 then warning_message = '5K times of less than 14:00 are unlikely' end
|
74
|
+
if time.total_seconds > (42 * 60) then warning_message = '5K times of greater than 42:00 are not fully supported' end
|
75
|
+
end
|
76
|
+
|
77
|
+
{ time: time, error: error_message, warning: warning_message }
|
72
78
|
end
|
73
79
|
|
74
80
|
def to_s
|
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.
|
4
|
+
version: 0.2.68
|
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-07-
|
11
|
+
date: 2016-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -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: 717d8b66fcc5e17b4d91373ca3dd34ca0c980da1
|
100
100
|
post_install_message:
|
101
101
|
rdoc_options: []
|
102
102
|
require_paths:
|