mns_subscriber 0.2.4 → 0.2.5
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 +2 -2
- data/lib/mns_subscriber.rb +10 -6
- metadata +2 -2
- 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: 45b3558835860b117222b23d849ddf7daaad8f24
|
4
|
+
data.tar.gz: 479141876a196737527d9771338e6396ea693e27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b71031d26da2a0c43e67cec94e0ed152ec4bb326b4882396ca4c8a1b14cba1890bc1cf418263f0b35433befcca52ff8f4179179b40e4bab146d618b7b9d962
|
7
|
+
data.tar.gz: 869a5a59c7432770e3c6f2ff24747b41f0520ceeb4942b0e049b2d1642b02ce3857968fd95e0202b82a546087e7650900cecfac3600023f73ca8424a066170b1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"�)�Wa�pi�P�4�S�c`R�I����������-h���c�m��c+L;�
|
2
|
+
MVt��'��kƎ�7J�������&�A�Y7�C��$��(���ޑX��otE4I��k�}d��� �o.���m���B� PXg�q�pv� �~�rK��䧃��3^�^���29����<'I_Wu��~k����kN?��>�K�ݔ�4��Z��L9��,�j��|�ea����S0�+�kϖY������
|
data/lib/mns_subscriber.rb
CHANGED
@@ -11,7 +11,8 @@ require 'daily_notices'
|
|
11
11
|
|
12
12
|
class MNSSubscriber < SPSSub
|
13
13
|
|
14
|
-
def initialize(host: 'sps', port: 59000, dir: '.', options: {}
|
14
|
+
def initialize(host: 'sps', port: 59000, dir: '.', options: {},
|
15
|
+
timeline: 'timeline')
|
15
16
|
|
16
17
|
# note: a valid url_base must be provided
|
17
18
|
|
@@ -20,11 +21,11 @@ class MNSSubscriber < SPSSub
|
|
20
21
|
dx_xslt: '/xsl/dynarex.xsl',
|
21
22
|
rss_xslt: '/xsl/feed.xsl',
|
22
23
|
target_page: :page,
|
23
|
-
target_xslt: '/xsl/page.xsl'
|
24
|
+
target_xslt: '/xsl/page.xsl'
|
24
25
|
}.merge(options)
|
25
26
|
|
26
27
|
super(host: host, port: port)
|
27
|
-
@filepath = dir
|
28
|
+
@filepath, @timeline = dir, timeline
|
28
29
|
|
29
30
|
end
|
30
31
|
|
@@ -66,11 +67,14 @@ class MNSSubscriber < SPSSub
|
|
66
67
|
def add_notice(topic, msg)
|
67
68
|
|
68
69
|
topic_dir = File.join(@filepath, topic)
|
69
|
-
notices = DailyNotices.new topic_dir, @options.merge(identifier: topic
|
70
|
+
notices = DailyNotices.new topic_dir, @options.merge(identifier: topic,
|
71
|
+
title: topic.capitalize + ' daily notices')
|
72
|
+
|
73
|
+
|
70
74
|
|
71
75
|
id = Time.now.to_i.to_s
|
72
76
|
|
73
|
-
return_status = notices.add msg, id: id
|
77
|
+
return_status = notices.add({description: msg, topic: topic}, id: id)
|
74
78
|
|
75
79
|
return if return_status == :duplicate
|
76
80
|
|
@@ -97,7 +101,7 @@ SQL
|
|
97
101
|
db.execute("INSERT INTO notices (id, message)
|
98
102
|
VALUES (?, ?)", [id, msg])
|
99
103
|
|
100
|
-
self.notice "
|
104
|
+
self.notice "%s/add: %s/status/%s" % [@timeline, topic, id]
|
101
105
|
|
102
106
|
sleep 1.5
|
103
107
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mns_subscriber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
wBAv1HG6hlSk9BepsW4e+NbsgNYQdx0NkPtppfh502tww8DydLyWZNnEte5tAbjg
|
32
32
|
mBoofo/5xUxN5A==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-03-
|
34
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sps-sub
|
metadata.gz.sig
CHANGED
Binary file
|