mns_subscriber 0.4.0 → 0.4.1
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/lib/mns_subscriber.rb +7 -7
- data.tar.gz.sig +1 -2
- metadata +7 -7
- 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: b27dea17c534343223f1412bab9186d3d50d1ae1
|
|
4
|
+
data.tar.gz: 7ae22351ff29a625d392f2dd41aa3ee1cd14d7a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8691551b7a99cdbc676fcd42ab60dcb254b4da53f59b1884062a2142b8dbf0297e80ecf311f58b8cdb846bb73908e74bc41895c9a1c8a5f98a8eecdff2f36a5f
|
|
7
|
+
data.tar.gz: e70ffff5537c73405e07098764d03835a2323dcdf468221db78f2ac1008635e4b4b735400f4555f77cab1f8830f926f7e0b6a6c15f84fa59ffd2288f1b7c8455
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/mns_subscriber.rb
CHANGED
|
@@ -61,20 +61,20 @@ class MNSSubscriber < SPSSub
|
|
|
61
61
|
|
|
62
62
|
else
|
|
63
63
|
|
|
64
|
-
subtopic = a
|
|
65
|
-
add_notice(subtopic, msg)
|
|
64
|
+
subtopic, id = a[1..-1]
|
|
65
|
+
add_notice(subtopic, msg, id)
|
|
66
66
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
def add_notice(topic, raw_msg)
|
|
71
|
+
def add_notice(topic, raw_msg, raw_id=Time.now)
|
|
72
72
|
|
|
73
73
|
topic_dir = File.join(@filepath, topic)
|
|
74
74
|
notices = DailyNotices.new topic_dir, @options.merge(identifier: topic,
|
|
75
75
|
title: topic.capitalize + ' daily notices')
|
|
76
76
|
|
|
77
|
-
id =
|
|
77
|
+
id = raw_id.to_i
|
|
78
78
|
|
|
79
79
|
# strip out any JSON from the end of the message
|
|
80
80
|
msg, raw_json = raw_msg.split(/(?=\{.*)/)
|
|
@@ -87,13 +87,13 @@ class MNSSubscriber < SPSSub
|
|
|
87
87
|
|
|
88
88
|
return if return_status == :duplicate
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
rxnotices = RecordxSqlite.new(File.join(topic_dir, 'notices.db'),
|
|
91
91
|
table: {notices: {id: 0, message: ''}})
|
|
92
|
-
|
|
92
|
+
rxnotices.create id: id.to_s, message: msg
|
|
93
93
|
|
|
94
94
|
if raw_json then
|
|
95
95
|
|
|
96
|
-
record =
|
|
96
|
+
record = JSON.parse(raw_json)
|
|
97
97
|
index = RecordxSqlite.new(File.join(topic_dir, 'index.db'),
|
|
98
98
|
table: {items: record})
|
|
99
99
|
index.create record
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
��Я�b^C��.�b^@��1k�s��� ̾z���`�L\hC�OĆG^�WCV@��cO�ޔ�I7�H�����J �a� �G죙�Sg0Ú��*�?T��]�Z�L�����ܥ�ޱ�yp���6��y�,s����VUJP��x�f�\3�E/pO$�bP�v��j-0k�G�At���E��Uiv �����ԣu�6�V\��5�u
|
|
1
|
+
Z����ކF�K\>dk��0��:
|
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.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -42,7 +42,7 @@ dependencies:
|
|
|
42
42
|
version: '0.3'
|
|
43
43
|
- - ">="
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 0.3.
|
|
45
|
+
version: 0.3.4
|
|
46
46
|
type: :runtime
|
|
47
47
|
prerelease: false
|
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -52,7 +52,7 @@ dependencies:
|
|
|
52
52
|
version: '0.3'
|
|
53
53
|
- - ">="
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 0.3.
|
|
55
|
+
version: 0.3.4
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: sps-sub
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -79,20 +79,20 @@ dependencies:
|
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0.
|
|
82
|
+
version: '0.6'
|
|
83
83
|
- - ">="
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: 0.
|
|
85
|
+
version: 0.6.1
|
|
86
86
|
type: :runtime
|
|
87
87
|
prerelease: false
|
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements:
|
|
90
90
|
- - "~>"
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
|
-
version: '0.
|
|
92
|
+
version: '0.6'
|
|
93
93
|
- - ">="
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 0.
|
|
95
|
+
version: 0.6.1
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
97
|
name: recordx_sqlite
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|