mns_timeline 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d421b97678029d8c0e9aa0459b17bad60a6ba617
4
- data.tar.gz: cf64d5b6293e45c7ae6073d2a727812028aba920
3
+ metadata.gz: fdd5497ebb1678b9b704652ed26b4d53811a3e0a
4
+ data.tar.gz: b9a480d8f4120f6cff12418db5ff59eef8ff1838
5
5
  SHA512:
6
- metadata.gz: 5d95206d0aa340b713acc710660a85bc3b2046ba29fc0cd10f6a397f5109117418c7997d9bee3da07154a9531c73a226d1b03f5acab13b0b8f1e78691a72dca9
7
- data.tar.gz: 7a0be83d9445481d5a27ae23b7b23183ace3694448dfbeb4136989f75ede21028af5f41081aacc93aa98e83f102c2e7f9fc34edc1268a22d11388236070548ef
6
+ metadata.gz: e596f7ed41a0b510c7721260de7ff3efdcda96177a70d9954d44c735c880e087b6173345cc4a37a0a5d26813c7149fa593e71907de5897caba364e0382522dab
7
+ data.tar.gz: 1279b46bcdf1d744271a662e148070ad2af521cf5799a49b5fb0b0b8384aa5edbea2816362d24310011228f9654657d0cad9d5cf050cfcc419aac8d6733f80b8
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/mns_timeline.rb CHANGED
@@ -42,26 +42,25 @@ class MNSTimeline < SPSSub
42
42
  topic, id = msg.split('/').values_at 0, -1
43
43
  url_base = @options[:url_base]
44
44
  fileid = Time.at(id.to_i).strftime("%Y/%b/%d/").downcase + id + '/index.xml'
45
-
45
+
46
46
  url = "%s%s/%s" % [url_base, topic, fileid]
47
47
  kvx = Kvx.new url
48
- msg = kvx.body[:description]
49
48
 
50
- add_notice(topic, msg, id)
49
+ add_notice(kvx.body.clone.merge(topic: topic), id)
51
50
 
52
51
  end
53
52
 
54
- def add_notice(topic, msg, id)
53
+ def add_notice(h, id)
55
54
 
56
55
  timeline_dir = File.join(@filepath, @timeline)
57
56
  notices = DailyNotices.new timeline_dir,
58
57
  @options.merge(identifier: @timeline, title: @timeline.capitalize)
59
58
 
60
- return_status = notices.add({description: msg, topic: topic}, id: id)
59
+ return_status = notices.add(h, id: id)
61
60
 
62
61
  return if return_status == :duplicate
63
62
 
64
- dbfilename = File.join(timeline_dir, topic + '.db')
63
+ dbfilename = File.join(timeline_dir, h[:topic] + '.db')
65
64
 
66
65
  if File.exists? dbfilename then
67
66
 
@@ -81,9 +80,9 @@ SQL
81
80
  end
82
81
 
83
82
  db.execute("INSERT INTO notices (id, message)
84
- VALUES (?, ?)", [id, msg])
83
+ VALUES (?, ?)", [id, msg=h[:description]])
85
84
  sleep 1.5
86
85
 
87
86
  end
88
87
 
89
- end
88
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mns_timeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  YBz+URMHtVq6O+d7EkE/k4kCrvXbft0ECyMz6y5LS2066ci943uRhmBABvzPeO1K
32
32
  tBQ+W56kQhJC1g==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-03-10 00:00:00.000000000 Z
34
+ date: 2017-03-11 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sps-sub
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- e0O O(}��b!h�z��R(1cը:>BLLF���Q�� �֫eC�NThAIj|� ���m⽜�����3�_�ӈ'q
2
- 3qwqRgg;�\��`�M�Rf��g}>v2��������HjY���c0�*�t�+�6^Ҍ�Ì㣧x
1
+ jP��Hwr�<�<f�+��j�����@z{w?eF���r.~��Z�������"aR������5�E9M/H<�=�e��T�#��+�'��~�=e"���.{X�_�pT�@��4
2
+ ��S�kew��g��IQ��؃7�v�:- ^�oP