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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a260094a29aa888a4f1d5fe743931f9ed595cb2e
4
- data.tar.gz: c1eb4fb27495ed74397779adf6d2ed88b04168a2
3
+ metadata.gz: aeecf3f95662e5b6d67724221adee4dc6e5932e5
4
+ data.tar.gz: cf4de21f806eca4a9addf53a3a712c892c1909d6
5
5
  SHA512:
6
- metadata.gz: f5b2016162b0a148c829dbb2abb5716f3c387c45e02766182e3780fbb52f567902d91325b021286660ea2e3693bff7e8d002cb50bfe6de81416638588af9a4ce
7
- data.tar.gz: efdee87748c89998439b8e20ff24e0049f37cda9a734af554869a6edeb45d8ed33c8801dcaf9c1582957f889324ab62010eb57013a814fff54284e375d51a2fc
6
+ metadata.gz: f6602e92ec6a2ac83f2dfd6f96d184017a8f20a50040d03d1e73218f1fdc15b00133977700706804ea40d776fab309771999d02b70d68acda32aaed2ac6c19bf
7
+ data.tar.gz: f7bf3ab18bd49308f6d2e763ba5deb9cfbf07141ca01ad3c8d1f9777923935a74e5129f9df7d1f84e0ee6c24f9c8e714a89ea90b72b02f55032aee8df4561b7e
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
- filepath, url_base, dx_xslt, rss_xslt, target_page, target_xslt
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
- new_day(title = 'Daily notices')
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(title)
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
@@ -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.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file