polyrex-calendar 0.5.2 → 0.5.3
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/polyrex-calendar.rb +10 -0
- data/lib/polyrex-calendar.rb~ +20 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1bd0817f0fbc853d16da717b545c705c75ea02d
|
4
|
+
data.tar.gz: 46674a89c7f16df0a64fbf2b74ff1184eb5ca1a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a25982a832f6e925270a0b5ed95d40ef7689fb5b419c2538f78d5a82fcaca9a12667c5d630c1ef6de68b549224a3df0607d647a5ba411e316dbb75c9ea00c63b
|
7
|
+
data.tar.gz: 5c906c9fcf4cdedbbc174e0961180753d5fae8bf72f60b8d035c6d1c53e062e8d5969deeef54e8be589f6802908b1a7502d6f0bab73ad6da600f2a43a7ddf83e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-calendar.rb
CHANGED
data/lib/polyrex-calendar.rb~
CHANGED
@@ -12,6 +12,25 @@ class PolyrexObjects
|
|
12
12
|
def wk(n)
|
13
13
|
self.records[n-1]
|
14
14
|
end
|
15
|
+
|
16
|
+
def to_webpage()
|
17
|
+
|
18
|
+
month_xsl = fetch_file self.xslt
|
19
|
+
month_layout_css = fetch_file self.css_layout
|
20
|
+
month_css = fetch_file self.css_style
|
21
|
+
|
22
|
+
# add a css selector for the current day
|
23
|
+
date = Time.now.strftime("%Y-%b-%d")
|
24
|
+
e = self.element("records/week/records/day/summary[sdate='#{date}']")
|
25
|
+
e.attributes[:class] = 'selected' if e
|
26
|
+
|
27
|
+
File.write 'self.xml', self.to_xml(pretty: true)
|
28
|
+
File.write 'month.xsl', month_xsl
|
29
|
+
|
30
|
+
html = generate_webpage self.to_xml, month_xsl
|
31
|
+
{self.title.downcase[0..2] + '_calendar.html' => html,
|
32
|
+
self.css_layout => month_layout_css, self.css_style => month_css}
|
33
|
+
end
|
15
34
|
end
|
16
35
|
|
17
36
|
class Week
|
@@ -140,7 +159,7 @@ class PolyrexCalendar < PolyrexCalendarBase
|
|
140
159
|
when 0 then a
|
141
160
|
|
142
161
|
# add a few placeholders before the 1st day
|
143
|
-
else Array.new(
|
162
|
+
else Array.new(8 - wday) + a
|
144
163
|
end
|
145
164
|
|
146
165
|
r
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex-calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
V2LbfuIuDVCUDR9ON1ozFySFLuTnZSmO6lR4UsFjHKwbtnnbapfQVvEJ1PLW/F13
|
32
32
|
1r3+lzIVNJhpdQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-01-
|
34
|
+
date: 2015-01-18 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: polyrex_calendarbase
|
metadata.gz.sig
CHANGED
Binary file
|