acts_as_duration 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3771d035041cb5885e03453189446c532924f60e
4
- data.tar.gz: 4c9dccb6ec69e80d6bc91573961237673e8e2e56
3
+ metadata.gz: c33854a951a6729e60c31761c2d55c32f73c6890
4
+ data.tar.gz: b23eaf3eb1c0c39ef0224cb9837755ae61923570
5
5
  SHA512:
6
- metadata.gz: 2f2766a2cf44d813dba84e0bd186a1d9a01fc307eac127c30df95fc17d51f3659e63bb91481805a336b1eb9c2ebde0447e654a24d838cccdcc84ded7defb4a48
7
- data.tar.gz: 45dc36ba246de60e58aba9119a10c675b63e8597b7831e2595b4d1d7ab4979474a9823f274a83c46e911c0a62679535fc3d1fae8b3868463e26a583bc6af01f5
6
+ metadata.gz: 7175d89e8f0309963eca7c0bca22f564347b01481191a490c1e2cb61744efe7683dee9df480b3952534db334828c0b161d4b72521e1c3588e27e86672db3fc18
7
+ data.tar.gz: 275a9b2196c305a45f64c3948e7eeabd847ac693ab8017d84b3d03645d4d219f40ba1a8c918aef73e44a4b777e1d9ca04f71b3be742623618ffafda27940f02f
@@ -26,11 +26,8 @@ ActiveSupport::Duration.class_eval do
26
26
  seconds = total_seconds % 60
27
27
  minutes = (total_seconds / 60) % 60
28
28
  hours = total_seconds / (60 * 60)
29
- if seconds.zero?
30
- format("%02d:%02d", hours, minutes)
31
- else
32
- format("%02d:%02d:%02d", hours, minutes, seconds)
33
- end
29
+
30
+ format("%02d:%02d:%02d", hours, minutes, seconds)
34
31
  end
35
32
 
36
33
  end
@@ -1,3 +1,3 @@
1
1
  module ActsAsDuration
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_duration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yonah Forst