timepiece 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cffcf03a2b5b2bc7a97ae5d4efce3eba8dce7064
4
- data.tar.gz: b56e96e36cebba51284288a3cda1a5324b7f054a
3
+ metadata.gz: 00d04eb51d95ea9b19d0d02120678ffbf08c4300
4
+ data.tar.gz: 61315b891b0976f674463dde577b35cdd44527ac
5
5
  SHA512:
6
- metadata.gz: 1c5d907b73e131e18bc293dd54369367e06a40d458ea6010045068f5050720cd89db7d6184ed2995c56b4941a3e76dd87f739fbc3c24574f406c3a45677eff94
7
- data.tar.gz: ff1df9a38af7bd9a094aa97ef07acd9204471e387d9c5c209eb41e50ea200555972caf3401795115ded59dbe0dad2b22c506039a9c7c96ab08243f9ef60eca27
6
+ metadata.gz: f983ed67e5c5690690965cc7cd3948f98d87e26871590cba02841287766a9105c1bfab2579f2d3d076eacf468c92dfdf0d1ee1ad7e25510eb478e200188c14dc
7
+ data.tar.gz: ec3842e177315b3e1d6871f3c4afa80785057caea92cc6bfb5b961399d6882483779b5fa23ce3f80a4f0b530ba0886ab2e130e060621d1ac125a0fe393330fb5
@@ -24,30 +24,30 @@ Timepiece is a Rails plugin providing a simple digital clock, accurate to your s
24
24
 
25
25
  <%= timepiece('London') %>
26
26
 
27
- * Show a 12 hour clock by specifying it explicitly
27
+ * Show a 12 hour clock by specifying its `type:` explicitly
28
28
 
29
- <%= timepiece('London', '12') %>
29
+ <%= timepiece('London', type: '12') %>
30
30
 
31
- By default the 12 hour clock displays time without any leading character, in the format '1:23pm'. You can add either a zero, as present on the 24 hour clock, or a leading space character the size of a numerical digit - useful for keeping your clocks aligned.
31
+ By default the 12 hour clock displays time without any leading character, in the format '1:23pm'. You can add either a zero, as present on the 24 hour clock, or a leading space character the size of a numerical digit - useful for keeping your clocks aligned. To achieve this, set the Timepiece's `lead:`
32
32
 
33
33
  * To add a leading zero to hour values less than ten
34
34
 
35
- <%= timepiece('London', '12', '0') %>
35
+ <%= timepiece('London', lead: '0') %>
36
36
 
37
37
  or
38
38
 
39
- <%= timepiece('London', '12', 'zero') %>
39
+ <%= timepiece('London', lead: 'zero') %>
40
40
 
41
41
  * To add a space character
42
42
 
43
- <%= timepiece('London', '12', '_') %>
43
+ <%= timepiece('London', lead: '_') %>
44
44
 
45
45
  or
46
46
 
47
- <%= timepiece('London', '12', 'space') %>
47
+ <%= timepiece('London', lead: 'space') %>
48
48
 
49
- You can apply your own styles to any part of the Timepiece clock. For instance, you can capitalize the AM/PM abbreviation by targeting the span with class 'timepiece-abbr'. By default, the abbreviations are displayed without punctuation. To add punctuation, you can specify it in the options.
49
+ You can apply your own styles to any part of the Timepiece clock. For instance, you can capitalize the AM/PM abbreviation by targeting the span with class 'timepiece-abbr'. By default, the abbreviations are displayed without punctuation. To add punctuation, you can specify it with the `abbr_sep:` option.
50
50
 
51
51
  * Add punctuation to am/pm abbreviation
52
52
 
53
- <%= timepiece('London', '12', '0', '.') %>
53
+ <%= timepiece('London', abbr_sep: '.') %>
@@ -1,5 +1,5 @@
1
1
  module TimepieceHelper
2
- def timepiece(location = 'UTC', type = '24', lead = 'none', abbr_sep = 'none')
2
+ def timepiece(location = 'UTC', type: '24', lead: 'none', abbr_sep: 'none')
3
3
  Time.zone = location
4
4
  hours = Time.now.in_time_zone.strftime('%H')
5
5
  minutes = Time.now.in_time_zone.strftime('%M')
@@ -1,3 +1,3 @@
1
1
  module Timepiece
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timepiece
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom Bruce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-07 00:00:00.000000000 Z
11
+ date: 2014-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails