daily_notices 0.2.4 → 0.2.5
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 +1 -2
- data/lib/daily_notices.rb +5 -5
- data.tar.gz.sig +0 -0
- 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: 75034a8aa3252cd59b321633226576d61ee6a93d
|
4
|
+
data.tar.gz: 4965100aa48581d31c295024c5d5ffe006931f73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1cea284a304832ae95965ef756b449566f3b7831c56ba39f7eef545a356ff3b5339755318db0618c15270c11268b64c6cc6edfe24ed75a0b2f603781515764
|
7
|
+
data.tar.gz: 23712e25ce1a7b666b25a78f07067d6efc655b0f61efeba0a46613bfcd8fb673af308bca2853aefda3a1c0cd12e9d5d2ae6829bfabff3fd2f0a521269cbeec28
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
��
|
2
|
-
�W��~����wNp̐f4}�vB�������A!��M�}��$��5��"})�[���
|
1
|
+
]ig��ǓYUd��r�,��aq���v��r�"H9.��^>a|����"):��xezT
|
data/lib/daily_notices.rb
CHANGED
@@ -24,7 +24,7 @@ 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
|
27
|
+
@schema = 'items/item(description, time)'
|
28
28
|
@default_key = 'uid'
|
29
29
|
|
30
30
|
if File.exists? @indexpath then
|
@@ -53,9 +53,9 @@ class DailyNotices
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def create(description, time=Time.now, title: nil, \
|
56
|
-
|
56
|
+
id: Time.now.strftime('%H%M%S'))
|
57
57
|
|
58
|
-
@dx.create
|
58
|
+
@dx.create({description: description, time: time}, id: id)
|
59
59
|
@dx.save @indexpath
|
60
60
|
File.write File.join(@filepath, @archive_path, 'index.html'), \
|
61
61
|
@dx.to_html(domain: @url_base)
|
@@ -63,8 +63,8 @@ class DailyNotices
|
|
63
63
|
# Add it to the RSS document
|
64
64
|
title ||= description.split(/\n/,2).first[0..140]
|
65
65
|
link = [File.join(@url_base, File.basename(@filepath), \
|
66
|
-
@archive_path, '#' +
|
67
|
-
@rss.add title: title, link: link, description: description
|
66
|
+
@archive_path, '#' + id)].join('/')
|
67
|
+
@rss.add( {title: title, link: link, description: description}, id: id)
|
68
68
|
@rss.save @rssfile
|
69
69
|
|
70
70
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|