silverball 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/silverball/date_time.rb +14 -6
- data/silverball.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9e6a4721e936e9764964f09257c59f5da628509
|
4
|
+
data.tar.gz: 394dd4af29993e7abb68da6964598809422679f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d902cb6c6caf729acf920ae9200df488bb4e28558b6bd8d6cc0bd9e39cd3ce2804524ce1d493c8f47764b2d7ad0bcc2d81b6a1ca39e36a7ffcc4211458f0cd6
|
7
|
+
data.tar.gz: 59b75702917c38b1c4f3405646083c6884279e6c63554b9f8dfa8000a32785533633b408225df55cbdc9c1a1815ab6e564a7231ea41ea965d2b5e1053188b9c9
|
data/CHANGELOG.md
CHANGED
@@ -19,6 +19,14 @@ glance - what to expact from upgrading to a new version.
|
|
19
19
|
### Removed
|
20
20
|
|
21
21
|
|
22
|
+
## [0.1.2] - 2017-01-06
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
|
26
|
+
- Removes seconds part of output of `timespan_in_words` in single-unit mode due
|
27
|
+
to floating point inaccuracies.
|
28
|
+
|
29
|
+
|
22
30
|
## [0.1.1] - 2017-01-03
|
23
31
|
|
24
32
|
### Fixed
|
data/lib/silverball/date_time.rb
CHANGED
@@ -62,13 +62,21 @@ module Silverball
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
65
|
+
if unit == :days
|
66
|
+
"#{ days }d"
|
67
|
+
elsif unit == :hours
|
68
|
+
"#{ hours }h"
|
69
|
+
elsif unit == :minutes
|
70
|
+
"#{ minutes }m"
|
71
|
+
else
|
72
|
+
out = []
|
73
|
+
out << "#{ days }d" if days > 0
|
74
|
+
out << "#{ hours }h" if hours > 0
|
75
|
+
out << "#{ minutes }m" if minutes > 0
|
76
|
+
out << "#{ seconds }s" if seconds > 0 || (seconds == 0 && minutes == 0 && hours == 0 && days == 0)
|
70
77
|
|
71
|
-
|
78
|
+
out.join(' ')
|
79
|
+
end
|
72
80
|
end
|
73
81
|
end
|
74
82
|
end
|
data/silverball.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: silverball
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Senn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|