rss2mail 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +1 -1
- data/lib/rss2mail/feed.rb +14 -9
- data/lib/rss2mail/rss.rb +1 -1
- data/lib/rss2mail/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3f44f1b63398c70b3ec0350c00d00e5f983df0c
|
4
|
+
data.tar.gz: 620630082c4f11f38780e091c0206eed398138ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abca2de4146677c09a077e4d09908f08fc36a144eb4096b3e4284defd7e8ab1602a911bf51534ba04f12d24e523113ad03a58aff8d87e1d10f57aa5a1054012e
|
7
|
+
data.tar.gz: b15e68309061549f0437b6448bfdba0349e1fcdebb4a1088e8a51441a315c1a6c04495669f78fe70433f7194a57d8500ccc66a2c70724e2e27e4af5dc6a87ee4
|
data/README
CHANGED
data/lib/rss2mail/feed.rb
CHANGED
@@ -138,14 +138,20 @@ module RSS2Mail
|
|
138
138
|
open_feed(feed[:url], conditions) { |uri|
|
139
139
|
if etag = uri.meta['etag']
|
140
140
|
feed[:etag] = etag
|
141
|
+
else
|
142
|
+
feed.delete(:etag)
|
141
143
|
end
|
142
144
|
|
143
145
|
if mtime = begin; uri.last_modified; rescue ArgumentError; end
|
144
146
|
feed[:mtime] = mtime.rfc822
|
147
|
+
else
|
148
|
+
feed.delete(:mtime)
|
145
149
|
end
|
146
150
|
|
147
151
|
unless etag || mtime
|
148
152
|
feed[:updated] = Time.now
|
153
|
+
else
|
154
|
+
feed.delete(:updated)
|
149
155
|
end
|
150
156
|
|
151
157
|
@content ||= uri.read
|
@@ -170,15 +176,14 @@ module RSS2Mail
|
|
170
176
|
}
|
171
177
|
|
172
178
|
if rss && !reload
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
}
|
179
|
+
if update = updated
|
180
|
+
rss.items.delete_if { |item| (date = item.date) && date <= update }
|
181
|
+
end
|
182
|
+
|
183
|
+
if sent = feed[:sent]
|
184
|
+
set = Set.new(sent)
|
185
|
+
rss.items.delete_if { |item| set.include?(item.link) }
|
186
|
+
end
|
182
187
|
end
|
183
188
|
else
|
184
189
|
log 'Nothing to parse'
|
data/lib/rss2mail/rss.rb
CHANGED
data/lib/rss2mail/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rss2mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Wille
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -116,7 +116,7 @@ rdoc_options:
|
|
116
116
|
- --line-numbers
|
117
117
|
- --all
|
118
118
|
- --title
|
119
|
-
- rss2mail Application documentation (v0.2.
|
119
|
+
- rss2mail Application documentation (v0.2.2)
|
120
120
|
- --main
|
121
121
|
- README
|
122
122
|
require_paths:
|