timepiece 0.1.6 → 0.1.7

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: 074f293bf77574c895a32e9eb6e2ff4f10f5d7b1
4
- data.tar.gz: 030b9447686b023fde32e90512a479456b856b20
3
+ metadata.gz: e997e4b727711f3f7d92b83031057177279b0a43
4
+ data.tar.gz: 8ceacee309c47761dace76374b0ba6fc4420ad3d
5
5
  SHA512:
6
- metadata.gz: 6ff01dcc468866c7b44808ae1221bf8cc0c020752986ceae3216a577220cfef285d4da908d6404cc472885722e370ca0a5601b5a3755cb2b96ba7b7326928ff9
7
- data.tar.gz: c0b2e7ff32a3e03085288e0ecd891b95e424e8005aea819bc2b26de33dcf4ea9de06a3420f70885eba1d0b061849316643b9cd3db5b995fbb90e82887347b99d
6
+ metadata.gz: ef1164269db5b52505477edc7050349823e71acca5b53773b48a81dfd349a2a9dd4801a6b5e67932165cf652225bb8f4752ff3f18b69f47586fa2f16b9a59730
7
+ data.tar.gz: f9fca8463aa8fe0a24bd9235e2219e50022c8d456d614d21e44815694f00ed9e64b6d3149883455cc3e55bdea3c2a5ba8566b7a61c7a46a562c3a68e047776cc
@@ -123,10 +123,10 @@ function show_timer(){
123
123
  }
124
124
  $(".timepiece-timer").each(function(i, e){
125
125
  $(e).html(function(){
126
- $('.timepiece-days', $(e)).html(( timer_days[i] < 10 ? "0" : "" ) + timer_days[i]);
127
- $('.timepiece-hours', $(e)).html(( timer_hours[i] < 10 ? "0" : "" ) + timer_hours[i]);
128
- $('.timepiece-minutes', $(e)).html(( timer_minutes[i] < 10 ? "0" : "" ) + timer_minutes[i]);
129
- $('.timepiece-seconds', $(e)).html(( timer_seconds[i] < 10 ? "0" : "" ) + timer_seconds[i]);
126
+ $('.timepiece-days', $(e)).html(timer_days[i]);
127
+ $('.timepiece-hours', $(e)).html(timer_hours[i]);
128
+ $('.timepiece-minutes', $(e)).html(timer_minutes[i]);
129
+ $('.timepiece-seconds', $(e)).html(timer_seconds[i]);
130
130
  })
131
131
  })
132
132
  }, 1000)
@@ -53,13 +53,15 @@ module TimepieceHelper
53
53
 
54
54
  seconds = seconds_diff
55
55
 
56
- time = "<span class='timepiece-days'>#{days.to_s.rjust(2, '0')}</span>"\
56
+ time = "<span class='timepiece-days'>#{days.to_s}</span>"\
57
57
  "<span class='timepiece-descriptor tp-descriptor-days'> days </span>"\
58
- "<span class='timepiece-hours'>#{hours.to_s.rjust(2, '0')}</span>"\
59
- "<span class='timepiece-separator tp-separator-1'>:</span>"\
60
- "<span class='timepiece-minutes'>#{minutes.to_s.rjust(2, '0')}</span>"\
61
- "<span class='timepiece-separator tp-separator-2'>:</span>"\
62
- "<span class='timepiece-seconds'>#{seconds.to_s.rjust(2, '0')}</span>"
58
+ "<span class='timepiece-hours'>#{hours.to_s}</span>"\
59
+ "<span class='timepiece-descriptor tp-descriptor-hours'> hours </span>"\
60
+ "<span class='timepiece-minutes'>#{minutes.to_s}</span>"\
61
+ "<span class='timepiece-descriptor tp-descriptor-minutes'> minutes </span>"\
62
+ "<span class='timepiece-seconds'>#{seconds.to_s}</span>"\
63
+ "<span class='timepiece-descriptor tp-descriptor-seconds'> seconds </span>"
64
+ # "<span class='timepiece-seconds'>#{seconds.to_s.rjust(2, '0')}</span>" # Note: rjust; it might be useful.
63
65
 
64
66
  content_tag(:span, time.html_safe, class: 'timepiece-timer', 'data-days' => days, 'data-hours' => hours, 'data-minutes' => minutes, 'data-seconds' => seconds)
65
67
  end
@@ -1,3 +1,3 @@
1
1
  module Timepiece
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timepiece
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom Bruce