daily_notices 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/daily_notices.rb +11 -8
- metadata +1 -1
- 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: aeecf3f95662e5b6d67724221adee4dc6e5932e5
|
4
|
+
data.tar.gz: cf4de21f806eca4a9addf53a3a712c892c1909d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6602e92ec6a2ac83f2dfd6f96d184017a8f20a50040d03d1e73218f1fdc15b00133977700706804ea40d776fab309771999d02b70d68acda32aaed2ac6c19bf
|
7
|
+
data.tar.gz: f7bf3ab18bd49308f6d2e763ba5deb9cfbf07141ca01ad3c8d1f9777923935a74e5129f9df7d1f84e0ee6c24f9c8e714a89ea90b72b02f55032aee8df4561b7e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/daily_notices.rb
CHANGED
@@ -12,14 +12,15 @@ class DailyNotices
|
|
12
12
|
|
13
13
|
attr_accessor :title, :description, :link, :dx_xslt, :rss_xslt
|
14
14
|
|
15
|
-
def initialize(filepath='', url_base: 'http:/127.0.0.1/', \
|
15
|
+
def initialize(filepath='', url_base: 'http:/127.0.0.1/', identifier: '', \
|
16
16
|
dx_xslt: '', rss_xslt: '', target_page: :recordset, target_xslt: '')
|
17
17
|
|
18
|
-
@filepath, @url_base, @dx_xslt, @rss_xslt, @target_page, @target_xslt
|
19
|
-
|
18
|
+
@filepath, @url_base, @dx_xslt, @rss_xslt, @target_page, @target_xslt, \
|
19
|
+
@identifier = filepath, url_base, dx_xslt, rss_xslt, target_page, \
|
20
|
+
target_xslt, identifier
|
20
21
|
|
21
22
|
|
22
|
-
@schema ||= 'items[title]/item(description, time)'
|
23
|
+
@schema ||= 'items[title, identifier]/item(description, time)'
|
23
24
|
@default_key ||= 'uid'
|
24
25
|
|
25
26
|
if dx_xslt.nil? then
|
@@ -49,7 +50,8 @@ class DailyNotices
|
|
49
50
|
end
|
50
51
|
|
51
52
|
@day = Time.now.day
|
52
|
-
|
53
|
+
@title = @identifier.capitalize + ' daily notices'
|
54
|
+
new_day()
|
53
55
|
|
54
56
|
# open the Dynarex file or create a new Dynarex file
|
55
57
|
|
@@ -60,7 +62,7 @@ class DailyNotices
|
|
60
62
|
else
|
61
63
|
@rss = RSScreator.new dx_xslt: @rss_xslt
|
62
64
|
@rss.xslt = @rss_xslt
|
63
|
-
@rss.title = title
|
65
|
+
@rss.title = @title
|
64
66
|
@rss.description = 'Generated using the daily_notices gem'
|
65
67
|
@rss.link = @url_base
|
66
68
|
end
|
@@ -164,7 +166,7 @@ class DailyNotices
|
|
164
166
|
|
165
167
|
# configures the target page (using a Dynarex document) for a new day
|
166
168
|
#
|
167
|
-
def new_day(
|
169
|
+
def new_day()
|
168
170
|
|
169
171
|
@archive_path = Time.now.strftime("%Y/%b/%d").downcase
|
170
172
|
|
@@ -179,7 +181,8 @@ class DailyNotices
|
|
179
181
|
@dx.order = 'descending'
|
180
182
|
@dx.default_key = @default_key
|
181
183
|
@dx.xslt = @dx_xslt
|
182
|
-
@dx.title = title
|
184
|
+
@dx.title = @title
|
185
|
+
@dx.identifier = @identifier
|
183
186
|
end
|
184
187
|
|
185
188
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|