daily_notices 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd31990fa289d5df03e9f3ce61dc94260113a8b6
4
- data.tar.gz: ba8a4f902a35714d3931c2e0fa76deae968a9ae5
3
+ metadata.gz: f055ddc77d79cf8ec132a7ff8b06268ccb23efcc
4
+ data.tar.gz: 91afd4fe8a53ad103578f5a3748136e51321f63c
5
5
  SHA512:
6
- metadata.gz: 524d0fcebee058baabe8cdb7b5d79c15f9dcbd7b210678625780e2f9a1bfa75b4a3d2843611251efd42817fa644f74350404b693cf9fc3bb01f018ba46ec791d
7
- data.tar.gz: 72ef22c01079ac818a53e16dbb8a51e2187a283e0596186302b7279d6414a09800d6deb1d83b13b09f7860b14e0bdb256d77a09171bd61add3f75d920a8cefe8
6
+ metadata.gz: e3c909aeae9025382c925cb30fc30f7ecedb71807f2b7d4b81128d5016f0f83923f379a44ac27e558a8ffcafe9bb402d1d8d39324a50f3093db06193e8c32dfc
7
+ data.tar.gz: '0389eb853e59364eb73fcdfa566db233c2dc5a416f9ae14b0d96857d14329c01af38645c96c5fdb33bb7e1bdf4e6ac45b75c8888a2c489774f4598e9e94cdc22'
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -74,22 +74,18 @@ class DailyNotices
74
74
  @target_page = target_page
75
75
  end
76
76
 
77
- def create(x, time=Time.now.strftime('%H:%M %p - %d %b %Y'), title: nil, \
78
- id: Time.now.to_i.to_s, description: nil)
77
+ def create(description, time=Time.now.strftime('%H:%M %p - %d %b %Y'), \
78
+ title: nil, id: Time.now.to_i.to_s)
79
79
 
80
80
  new_day() if @day != Time.now.day
81
-
82
- if x.is_a? String then
83
81
 
84
- description = x
85
- @dx.create({description: description, time: time}, id: id)
82
+ if @dx.all.any? and @dx.all.last.description == CGI.unescape(description) then
86
83
 
87
- elsif x.is_a? Hash
84
+ return :duplicate
88
85
 
89
- @dx.create(x, id: id)
90
-
91
86
  end
92
-
87
+
88
+ @dx.create({description: description, time: time}, id: id)
93
89
  @dx.save @indexpath
94
90
 
95
91
  if @target_page == :recordset then
@@ -127,6 +123,8 @@ class DailyNotices
127
123
  @rss.save @rssfile
128
124
 
129
125
  on_add(@indexpath, id)
126
+
127
+ return true
130
128
 
131
129
  end
132
130
 
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.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  8he6uWzjGUd5dEdL/ASnQ9lBbvl0TStzNEnsGNBV94H/6fnjx7MHQ/CWQE/M877s
32
32
  zcuMgGZau1C2mg==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-11-15 00:00:00.000000000 Z
34
+ date: 2016-11-16 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rss_creator
metadata.gz.sig CHANGED
Binary file