hlt 0.2.12 → 0.2.13

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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/hlt.rb +14 -1
  5. metadata +2 -2
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17284e7977559a7c9da65e198d595a39f5095dd9
4
- data.tar.gz: c9e3b76a59ac311cc4bb0635b3372e35a6880cd9
3
+ metadata.gz: ee038b077f53671940af4b7a23c9ff4d9822d00a
4
+ data.tar.gz: 8ff26ec951b501afaaf3e54734383fca39c2170c
5
5
  SHA512:
6
- metadata.gz: f19a937354e226e72c037f3d995f5c793fec6b9313ac84ae5ac7779df0c431af311d5ee2971f927f47d73dc27eaddea7e4204ea7da7d635dd6edce454abbb88a
7
- data.tar.gz: 4c78063c149d724479a6ae6bbd5c705a63095b99cd35c4495a3404367ecf6a9a5106cb64368d54883d8d3374c52bc029b8af3576976e89997b29b9fe821cbaa9
6
+ metadata.gz: 51c9f50b7b32a187301f0d873d0d06168874ae5cc2f73a4f13beb292bab47c39ab4e94abfce92baf463b3e5d2686f371de8e5ea32ab5e6ac1d6c337e65d6ff63
7
+ data.tar.gz: 961c4af7632a471f07b9b83e97285831a4a9699dff5c2bb68178fcde9663982fe938bbfe960fdea9aa9a2a7259f5f0a9cea55b5bb6fe525b691f03c76fb15c61
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/hlt.rb CHANGED
@@ -83,7 +83,14 @@ class Hlt
83
83
  end
84
84
 
85
85
 
86
- @to_html = doc.xml opt
86
+ html = doc.xml opt
87
+
88
+ time = Time.now
89
+ timestamp = time.strftime("#{ordinalize(time.day)} %B %Y @ %H:%M")
90
+ comment = "\n <!-- Generated by Hlt-site_builder on the %s -->\n" % timestamp
91
+
92
+ html.sub!(/(?=<\/html>)/, comment)
93
+ @to_html = html
87
94
 
88
95
  end
89
96
 
@@ -185,5 +192,11 @@ class Hlt
185
192
 
186
193
  [s2.join, markdown]
187
194
  end
195
+
196
+ def ordinalize(n)
197
+ n.to_s + ( (10...20).include?(n) ? 'th' :
198
+ %w{ th st nd rd th th th th th th }[n % 10] )
199
+ end
200
+
188
201
 
189
202
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hlt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  5IGsS5sdm4Kij1FAfaWjaheiPLOT6ZD3hDqkY+2utR6/Qt6eBqXnd4miH0BiZoIQ
32
32
  U5u7D4Sb66WO1A==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-10-23 00:00:00.000000000 Z
34
+ date: 2014-10-25 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: line-tree
metadata.gz.sig CHANGED
Binary file