daily_notices 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77ac8be7004a8351b5c23f165d0aa68acdb8ccaf
4
- data.tar.gz: 491fd545e733e3897ad6707b43c1fd59e23e9544
3
+ metadata.gz: 572ada7063f184cbd7a815549e3d7486cd4a0bc7
4
+ data.tar.gz: 862d04b11eafc219023b04db59c21ceecdb281d0
5
5
  SHA512:
6
- metadata.gz: 18b1ac50f3c5aec25a5941e9b23b9ad8cdbfea56b2f4b6e54e17a201afc08ce4ee93b25fffa4c5feac84aad0a62e99569b00e91e14a805f336e0e490f27e2710
7
- data.tar.gz: 0259e19a65d38ccf6c2cd7b3e4a57c269f891890ebf480adab8f4d86220b382041e6151e2482ca1035868132809284af95a5360271fb9469c481c7e74e6550d2
6
+ metadata.gz: 6fc9fab893e004d679760842ed7c419c2c89b4ab543b60d744cb5b5867997807bb24c5c38022a3b5ad627dd497b27ac80d0c8542303964fbe7453033f36eb3b5
7
+ data.tar.gz: d7569944f35520f66fdd9356b1e2b5321077ced749b3ee499be1021cba629bae3066aeb866a0dff90f3bb3de828c7fa13eea8f64cd15758b357d9eb444cb1ae6
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- ��)� ����׼�k������6B/ԫ`�^6'�I��ɤ���
2
- T��R?����w-�����*������&Sb }2��4;�tA
1
+ �� �k�8
2
+ �W��~����wNp̐f4}vB�������A!��M�}��$��5��"})�[���
data/lib/daily_notices.rb CHANGED
@@ -24,12 +24,15 @@ class DailyNotices
24
24
  @indexpath = File.join(@filepath, @archive_path, 'index.xml')
25
25
  FileUtils.mkdir_p File.dirname(@indexpath)
26
26
 
27
+ @schema = 'items/item(description, time, uid)'
28
+ @default_key = 'uid'
29
+
27
30
  if File.exists? @indexpath then
28
31
  @dx = Dynarex.new @indexpath
29
32
  else
30
- @dx = Dynarex.new 'items/item(description, time)'
33
+ @dx = Dynarex.new @schema
31
34
  @dx.order = 'descending'
32
- @dx.default_key = 'uid'
35
+ @dx.default_key = @default_key
33
36
  @dx.xslt = @dx_xslt
34
37
  end
35
38
 
@@ -50,9 +53,9 @@ class DailyNotices
50
53
  end
51
54
 
52
55
  def create(description, time=Time.now, title: nil, \
53
- id: Time.now.strftime('%H%M%S'))
56
+ uid: Time.now.strftime('%H%M%S'))
54
57
 
55
- @dx.create description: description, time: time, id: id
58
+ @dx.create description: description, time: time, uid: uid
56
59
  @dx.save @indexpath
57
60
  File.write File.join(@filepath, @archive_path, 'index.html'), \
58
61
  @dx.to_html(domain: @url_base)
@@ -60,7 +63,7 @@ class DailyNotices
60
63
  # Add it to the RSS document
61
64
  title ||= description.split(/\n/,2).first[0..140]
62
65
  link = [File.join(@url_base, File.basename(@filepath), \
63
- @archive_path, '#' + id)].join('/')
66
+ @archive_path, '#' + uid)].join('/')
64
67
  @rss.add title: title, link: link, description: description
65
68
  @rss.save @rssfile
66
69
 
data.tar.gz.sig CHANGED
Binary file
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.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file