daily_notices 0.4.1 → 0.4.2
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 +3 -2
- data/lib/daily_notices.rb +13 -10
- metadata +18 -18
- 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: a260094a29aa888a4f1d5fe743931f9ed595cb2e
|
|
4
|
+
data.tar.gz: c1eb4fb27495ed74397779adf6d2ed88b04168a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5b2016162b0a148c829dbb2abb5716f3c387c45e02766182e3780fbb52f567902d91325b021286660ea2e3693bff7e8d002cb50bfe6de81416638588af9a4ce
|
|
7
|
+
data.tar.gz: efdee87748c89998439b8e20ff24e0049f37cda9a734af554869a6edeb45d8ed33c8801dcaf9c1582957f889324ab62010eb57013a814fff54284e375d51a2fc
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
�
|
|
1
|
+
^c�m>u#�nR���l4�=�7&H�m}��@̆{�d�4}q{���a��Y����j�θ��kǨ�Oi
|
|
2
|
+
�U����_�����II��wn0 ��՞0dɥ�-�|gե�oK��G�]��K@j���������璤�=SnQy��v��
|
|
3
|
+
<��)�ݹO���1?>lq
|
data/lib/daily_notices.rb
CHANGED
|
@@ -19,7 +19,7 @@ class DailyNotices
|
|
|
19
19
|
filepath, url_base, dx_xslt, rss_xslt, target_page, target_xslt
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
@schema ||= 'items/item(description, time)'
|
|
22
|
+
@schema ||= 'items[title]/item(description, time)'
|
|
23
23
|
@default_key ||= 'uid'
|
|
24
24
|
|
|
25
25
|
if dx_xslt.nil? then
|
|
@@ -49,7 +49,7 @@ class DailyNotices
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
@day = Time.now.day
|
|
52
|
-
new_day()
|
|
52
|
+
new_day(title = 'Daily notices')
|
|
53
53
|
|
|
54
54
|
# open the Dynarex file or create a new Dynarex file
|
|
55
55
|
|
|
@@ -60,7 +60,7 @@ class DailyNotices
|
|
|
60
60
|
else
|
|
61
61
|
@rss = RSScreator.new dx_xslt: @rss_xslt
|
|
62
62
|
@rss.xslt = @rss_xslt
|
|
63
|
-
@rss.title =
|
|
63
|
+
@rss.title = title
|
|
64
64
|
@rss.description = 'Generated using the daily_notices gem'
|
|
65
65
|
@rss.link = @url_base
|
|
66
66
|
end
|
|
@@ -69,8 +69,8 @@ class DailyNotices
|
|
|
69
69
|
@target_page = target_page
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
def create(x, time=Time.now, title: nil, \
|
|
73
|
-
|
|
72
|
+
def create(x, time=Time.now.strftime('%H:%M %p - %d %b %Y'), title: nil, \
|
|
73
|
+
id: Time.now.to_i.to_s, description: nil)
|
|
74
74
|
|
|
75
75
|
new_day() if @day != Time.now.day
|
|
76
76
|
|
|
@@ -89,22 +89,24 @@ class DailyNotices
|
|
|
89
89
|
|
|
90
90
|
if @target_page == :recordset then
|
|
91
91
|
File.write File.join(@filepath, @archive_path, 'index.html'), \
|
|
92
|
-
|
|
92
|
+
@dx.to_html(domain: @url_base)
|
|
93
93
|
else
|
|
94
94
|
|
|
95
95
|
target_path = File.join(@filepath, @archive_path, id, 'index.html')
|
|
96
96
|
FileUtils.mkdir_p File.dirname(target_path)
|
|
97
|
+
|
|
97
98
|
rx = @dx.find(id)
|
|
98
|
-
|
|
99
|
+
|
|
99
100
|
kvx = rx.to_kvx
|
|
100
101
|
yield kvx if block_given?
|
|
101
|
-
|
|
102
|
+
|
|
102
103
|
rxdoc = Rexle.new(kvx.to_xml)
|
|
103
104
|
rxdoc.instructions << ['xml-stylsheet',\
|
|
104
105
|
"title='XSL_formatting' type='text/xsl' href='#{@target_xslt}'"]
|
|
105
|
-
|
|
106
|
+
|
|
106
107
|
File.write target_path.sub(/\.html$/,'.xml', ), rxdoc.xml(pretty: true)
|
|
107
108
|
File.write target_path, rx.to_html(xslt: @target_xslt)
|
|
109
|
+
|
|
108
110
|
end
|
|
109
111
|
|
|
110
112
|
# Add it to the RSS document
|
|
@@ -162,7 +164,7 @@ class DailyNotices
|
|
|
162
164
|
|
|
163
165
|
# configures the target page (using a Dynarex document) for a new day
|
|
164
166
|
#
|
|
165
|
-
def new_day()
|
|
167
|
+
def new_day(title)
|
|
166
168
|
|
|
167
169
|
@archive_path = Time.now.strftime("%Y/%b/%d").downcase
|
|
168
170
|
|
|
@@ -177,6 +179,7 @@ class DailyNotices
|
|
|
177
179
|
@dx.order = 'descending'
|
|
178
180
|
@dx.default_key = @default_key
|
|
179
181
|
@dx.xslt = @dx_xslt
|
|
182
|
+
@dx.title = title
|
|
180
183
|
end
|
|
181
184
|
|
|
182
185
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: daily_notices
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
|
15
|
-
|
|
15
|
+
8ixkARkWAmV1MB4XDTE2MTExMjE4MjM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SJ9FG8/ogIcbBZ+1psc
|
|
28
|
+
p/ztWPercXClXMC5RKajkQA2fsBfhHAtKw7Kn8Jb3jQxF98R6c6/l3NKxTFheJHD
|
|
29
|
+
MAZ26TlLYXrNlKBoSHeSZeCuSdgn1haaUPgzePVmC41gX7+YRvrezwf0FakFtlNL
|
|
30
|
+
KpWSb1Kst6fM7s501Upx5VvOrlmPu3FOVSjO+JE1g0XL8NpOqDXYPS0GxubZAlI0
|
|
31
|
+
8he6uWzjGUd5dEdL/ASnQ9lBbvl0TStzNEnsGNBV94H/6fnjx7MHQ/CWQE/M877s
|
|
32
|
+
zcuMgGZau1C2mg==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date:
|
|
34
|
+
date: 2016-11-12 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rss_creator
|
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
120
|
version: '0'
|
|
121
121
|
requirements: []
|
|
122
122
|
rubyforge_project:
|
|
123
|
-
rubygems_version: 2.
|
|
123
|
+
rubygems_version: 2.5.1
|
|
124
124
|
signing_key:
|
|
125
125
|
specification_version: 4
|
|
126
126
|
summary: A public facing noticeboard which is centered around an RSS feed.
|
metadata.gz.sig
CHANGED
|
Binary file
|