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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b26d41eda9e3e48aa7e05eed4da2c46c0c76359
4
- data.tar.gz: 6ea4e40523e992f18610321274e489ee29385057
3
+ metadata.gz: a3f44f1b63398c70b3ec0350c00d00e5f983df0c
4
+ data.tar.gz: 620630082c4f11f38780e091c0206eed398138ce
5
5
  SHA512:
6
- metadata.gz: 283d032a7319f57eeb98b6c054950cc6b19f31a0ed491fd68ff5c3ef3c3c08c6dc21546f9f176a7f5c3d2726ade85d1a26d2039867d667ac24b5c0b6880f8386
7
- data.tar.gz: 2847513a86719e8a9a9abc3c844b1a3e0d5e69c8c6cce3abf50fb1beaca31818b250cadb06cc8070177404c91905d6e0fbf10f5348c1c8d9f2a8d95de76bc035
6
+ metadata.gz: abca2de4146677c09a077e4d09908f08fc36a144eb4096b3e4284defd7e8ab1602a911bf51534ba04f12d24e523113ad03a58aff8d87e1d10f57aa5a1054012e
7
+ data.tar.gz: b15e68309061549f0437b6448bfdba0349e1fcdebb4a1088e8a51441a315c1a6c04495669f78fe70433f7194a57d8500ccc66a2c70724e2e27e4af5dc6a87ee4
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to rss2mail version 0.2.1
5
+ This documentation refers to rss2mail version 0.2.2
6
6
 
7
7
 
8
8
  == DESCRIPTION
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
- sent = feed[:sent]
174
-
175
- rss.items.delete_if { |item|
176
- if updated && date = item.date
177
- date <= updated
178
- elsif sent
179
- sent.include?(item.link)
180
- end
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
@@ -182,7 +182,7 @@ module RSS2Mail
182
182
 
183
183
  body.encode!(encoding) if encoding
184
184
  body
185
- rescue OpenURI::HTTPError
185
+ rescue OpenURI::HTTPError, EOFError
186
186
  end
187
187
 
188
188
  def extract_body(expr, attribute = nil)
@@ -4,7 +4,7 @@ module RSS2Mail
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 2
7
- TINY = 1
7
+ TINY = 2
8
8
 
9
9
  class << self
10
10
 
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.1
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-01 00:00:00.000000000 Z
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.1)
119
+ - rss2mail Application documentation (v0.2.2)
120
120
  - --main
121
121
  - README
122
122
  require_paths: