runby_pace 0.6.104 → 0.6.105
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/runby_pace/distance.rb +3 -3
- data/lib/runby_pace/distance_unit.rb +1 -1
- data/lib/runby_pace/pace.rb +2 -2
- data/lib/runby_pace/pace_range.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjZiMzBkMTU2ZGRkMmNkNjkyN2RlY2M5ZmJmNmQzMmZkNDc4YWNhNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGJlYjFlYzVhOWQyYTE5ZmU2Mjc4YTI0MzExMzQ1Yjk0MWM2M2YxMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmU1MDk2YzRkNWIyOGI0ZDVhMDAwNjdlNmYzMTdhMmJlOTllNDM3MGI2YTNk
|
10
|
+
ZGJjNTMxMTEyN2EyOTkyOWEwM2M5YmMyMTg0ODI2YzJiMWNlNzNhYTMyMmEz
|
11
|
+
ZWVjYjMzOWNiYmM2ODg2Yzk5NDdjOWZhZGFkNTYxN2I0YWIyMzA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Mjk5MmY2ZGNmMTMzNGNiNjNmZjM1N2NkNWY2OTkxYmJhMWMxYTE0ZGU3NTU0
|
14
|
+
NjhiYjk0OGQ5OTFiNmQyMWM5YzNjMWViN2MwZjg2NTdmNjNjMzUzMjNjYWYz
|
15
|
+
MmM4YTUwMThkNGY3YmJiYTU3ZTVmOWExZDBhYjRjYjI2NDlhMzg=
|
data/lib/runby_pace/distance.rb
CHANGED
@@ -53,11 +53,11 @@ module Runby
|
|
53
53
|
{ distance: distance, error: error_message }
|
54
54
|
end
|
55
55
|
|
56
|
-
def to_s(format
|
56
|
+
def to_s(format: :long)
|
57
57
|
formatted_multiplier = format('%g', @multiplier.round(2))
|
58
58
|
case format
|
59
|
-
when :short then "#{formatted_multiplier}#{@uom.to_s(format)}"
|
60
|
-
when :long then "#{formatted_multiplier} #{@uom.to_s(format,
|
59
|
+
when :short then "#{formatted_multiplier}#{@uom.to_s(format: format)}"
|
60
|
+
when :long then "#{formatted_multiplier} #{@uom.to_s(format: format, pluralize: (@multiplier > 1))}"
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -19,7 +19,7 @@ module Runby
|
|
19
19
|
@description = @@_uom_definitions[@symbol][:description]
|
20
20
|
end
|
21
21
|
|
22
|
-
def to_s(format
|
22
|
+
def to_s(format: :long, pluralize: false)
|
23
23
|
case format
|
24
24
|
when :short then @symbol.to_s
|
25
25
|
when :long then pluralize ? description_plural : @description
|
data/lib/runby_pace/pace.rb
CHANGED
@@ -14,8 +14,8 @@ module Runby
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def to_s(format
|
18
|
-
distance_s = @distance.to_s(format)
|
17
|
+
def to_s(format: :long)
|
18
|
+
distance_s = @distance.to_s(format: format)
|
19
19
|
leading_one_regex = /^1 ?/
|
20
20
|
distance_s.gsub!(leading_one_regex, '')
|
21
21
|
case format
|
@@ -22,11 +22,11 @@ module Runby
|
|
22
22
|
PaceRange.new fast, slow
|
23
23
|
end
|
24
24
|
|
25
|
-
def to_s(format
|
25
|
+
def to_s(format: :long)
|
26
26
|
if @fast == @slow
|
27
|
-
@fast.to_s(format)
|
27
|
+
@fast.to_s(format: format)
|
28
28
|
else
|
29
|
-
@fast.to_s(format).sub("#{@fast.time}", "#{@fast.time}-#{@slow.time}")
|
29
|
+
@fast.to_s(format: format).sub("#{@fast.time}", "#{@fast.time}-#{@slow.time}")
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
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.6.
|
4
|
+
version: 0.6.105
|
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-10-
|
11
|
+
date: 2016-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,7 +100,7 @@ homepage: https://github.com/tygerbytes/runby-pace
|
|
100
100
|
licenses:
|
101
101
|
- MIT
|
102
102
|
metadata:
|
103
|
-
commit-hash:
|
103
|
+
commit-hash: 8eded63ded4987b861242aef13fd0f4ab7399025
|
104
104
|
post_install_message:
|
105
105
|
rdoc_options: []
|
106
106
|
require_paths:
|