rfeedreader 1.0.16 → 1.0.17

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.
@@ -1,3 +1,7 @@
1
+ == 1.0.17 2008-11-29
2
+
3
+ * Solve: Wordpress.com feed with empty descriptions, remove mrss entries
4
+
1
5
  == 1.0.16 2008-11-10
2
6
 
3
7
  * Solve: Empty titles
@@ -125,27 +125,22 @@ module Rfeedreader
125
125
 
126
126
  # Parse each item
127
127
  (hpricot_doc/"item|entry")[0..nb_posts - 1].each do |item|
128
-
129
- if @is_mrss
130
- puts "is_mrss"
131
- @entries<<Entry_MRSS.new(item, self.charset)
132
- else
133
- case type
134
- when "source_flickr"
135
- @entries<<Entry_Flickr.new(item, self.charset)
136
- when "source_fotolog"
137
- @entries<<Entry_Fotolog.new(item, self.charset)
138
- when "source_google_video"
139
- @entries<<Entry_Google_Video.new(item, self.charset)
140
- when "source_jumpcut"
141
- @entries<<Entry_Jumpcut.new(item, self.charset)
142
- when "source_picasa"
143
- @entries<<Entry_Picasa.new(item, self.charset)
144
- when "source_youtube"
145
- @entries<<Entry_Youtube.new(item, self.charset)
146
- else
147
- @entries<<Entry.new(item, self.charset)
148
- end
128
+
129
+ case type
130
+ when "source_flickr"
131
+ @entries<<Entry_Flickr.new(item, self.charset)
132
+ when "source_fotolog"
133
+ @entries<<Entry_Fotolog.new(item, self.charset)
134
+ when "source_google_video"
135
+ @entries<<Entry_Google_Video.new(item, self.charset)
136
+ when "source_jumpcut"
137
+ @entries<<Entry_Jumpcut.new(item, self.charset)
138
+ when "source_picasa"
139
+ @entries<<Entry_Picasa.new(item, self.charset)
140
+ when "source_youtube"
141
+ @entries<<Entry_Youtube.new(item, self.charset)
142
+ else
143
+ @entries<<Entry.new(item, self.charset)
149
144
  end
150
145
  end
151
146
  end
@@ -268,7 +263,10 @@ module Rfeedreader
268
263
  @description = (@hpricot_item/"content").text
269
264
  @description = (@hpricot_item/"content\:encoded").text if @description.empty?
270
265
  if @description.empty?
266
+ puts "content not found"
271
267
  @description = (@hpricot_item/"description|summary|[@type='text']").inner_html
268
+
269
+ puts "inner_html: #{@description}"
272
270
  @description.gsub!(/^<!\[CDATA\[/, '')
273
271
  @description.gsub!(/\]\]>$/, '')
274
272
  @description = HTMLEntities.decode_entities(@description)
@@ -295,13 +293,6 @@ module Rfeedreader
295
293
  "Entry: title: #{@title} - link: #{@link}\n\rdescription: #{@description}"
296
294
  end
297
295
  end
298
-
299
- class Entry_MRSS<Entry
300
- def read_description
301
- image = @hpricot_item.search("media:thumbnail").to_s.scan(/url=['"]?([^'"]*)['" ]/).to_s
302
- @description = "<a href='#{@link}' class='image_link'><img src='#{image}' class='post_image'/></a>"
303
- end
304
- end
305
296
 
306
297
  class Entry_Flickr<Entry
307
298
  def read_description
@@ -2,7 +2,7 @@ module Rfeedreader #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 16
5
+ TINY = 17
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -262,4 +262,12 @@ class TestRfeedreader < Test::Unit::TestCase
262
262
  def test_orlandooo
263
263
  read_first "http://orlandooo.com/blog/"
264
264
  end
265
+
266
+ def test_juan
267
+ read_first "http://juan.urrutiaelejalde.org"
268
+ end
269
+
270
+ def test_wordpress
271
+ read_first "http://argentin.wordpress.com/"
272
+ end
265
273
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfeedreader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Girard
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-10 00:00:00 +01:00
12
+ date: 2008-11-29 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency