rfeedreader 0.9.7 → 0.9.8
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.
- data/History.txt +4 -0
- data/lib/rfeedreader/version.rb +1 -1
- data/lib/rfeedreader.rb +10 -2
- data/test/test_rfeedreader.rb +8 -0
- data/website/index.html +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/rfeedreader/version.rb
CHANGED
data/lib/rfeedreader.rb
CHANGED
@@ -162,8 +162,16 @@ module Rfeedreader
|
|
162
162
|
|
163
163
|
def read_link(hpricot_doc)
|
164
164
|
@link = (hpricot_doc/"link").first.inner_text
|
165
|
-
|
166
|
-
|
165
|
+
|
166
|
+
if @link.empty?
|
167
|
+
element = (hpricot_doc/"link[@rel=alternate]").first
|
168
|
+
@link = element[:href] unless element.nil?
|
169
|
+
end
|
170
|
+
|
171
|
+
if @link.empty?
|
172
|
+
element = (hpricot_doc/"link").first
|
173
|
+
@link = element[:href] unless element.nil?
|
174
|
+
end
|
167
175
|
end
|
168
176
|
|
169
177
|
def source_type
|
data/test/test_rfeedreader.rb
CHANGED
@@ -112,4 +112,12 @@ class TestRfeedreader < Test::Unit::TestCase
|
|
112
112
|
def test_encoding_error
|
113
113
|
read_first "http://www.adesalambrar.info/feed/"
|
114
114
|
end
|
115
|
+
|
116
|
+
def test_encoded_uri
|
117
|
+
read_first "http://news.google.it/news?hl=it&ned=it&q=wine&ie=UTF-8&output=rss"
|
118
|
+
end
|
119
|
+
|
120
|
+
def test_read_empty_entries
|
121
|
+
read_first "http://blogs.ya.com/eltikitaka/atom.xml"
|
122
|
+
end
|
115
123
|
end
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>rfeedreader</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rfeedreader"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/rfeedreader" class="numbers">0.9.
|
36
|
+
<a href="http://rubyforge.org/projects/rfeedreader" class="numbers">0.9.8</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rfeedreader
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
6
|
+
version: 0.9.8
|
7
7
|
date: 2007-09-04 00:00:00 +02:00
|
8
8
|
summary: Feed parser to read feed and return first posts of this feed. Special parsing from sources like Flickr, Jumcut, Google video, ...
|
9
9
|
require_paths:
|