makit 0.0.22 → 0.0.23
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/lib/makit/humanize.rb +2 -1
- data/lib/makit/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: 040d93224133103ca96b59baf375deef66d206bcc57f405aa39500fca51a2cda
|
4
|
+
data.tar.gz: ac66e34e4e24cf6f8ca45849c68d6b3bdf908518510c86f3f6e8efa5353d27b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebb6db4afa948d7a244006c31427068028f6ad50c56aedae766f2a8a8f00b66770dec56a1e02ab620336c27129c10c5bf0df268756962e2656d6b51e95cbbd15
|
7
|
+
data.tar.gz: 7439ccd3101f237e29fbcd9dca2aefc0618edbbb700ec22d2ee5f320cf9d3081126207e034693a121675de30fbef20e452d0a5d339cac522f0255ced98e9e515
|
data/lib/makit/humanize.rb
CHANGED
@@ -98,13 +98,14 @@ module Makit
|
|
98
98
|
minutes = minutes % 60
|
99
99
|
days = (hours / 24).to_i
|
100
100
|
hours = hours % 24
|
101
|
+
milliseconds = (seconds % 1 * 1000).to_i
|
101
102
|
|
102
103
|
parts = []
|
103
104
|
parts << "#{days} days" if days > 0
|
104
105
|
parts << "#{hours} hours" if hours > 0
|
105
106
|
parts << "#{minutes} minutes" if minutes > 0
|
106
107
|
parts << "#{seconds} seconds" if seconds > 0
|
107
|
-
|
108
|
+
parts << "#{milliseconds} milliseconds" if milliseconds > 0 && seconds < 1
|
108
109
|
parts.join(", ")
|
109
110
|
end
|
110
111
|
end
|
data/lib/makit/version.rb
CHANGED