logophobia-feedzirra 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
data/lib/feedzirra.rb
CHANGED
data/lib/feedzirra/feed.rb
CHANGED
@@ -27,7 +27,7 @@ module Feedzirra
|
|
27
27
|
# === Returns
|
28
28
|
# The class name of the parser that can handle the XML.
|
29
29
|
def self.determine_feed_parser_for_xml(xml)
|
30
|
-
start_of_doc = xml.slice(0,
|
30
|
+
start_of_doc = xml.slice(0, 2000)
|
31
31
|
feed_classes.detect {|klass| klass.able_to_parse?(start_of_doc)}
|
32
32
|
end
|
33
33
|
|
@@ -15,6 +15,10 @@ describe Feedzirra::Parser::AtomEntry do
|
|
15
15
|
@entry.url.should == "http://aws.typepad.com/aws/2009/01/aws-job-architect-designer-position-in-turkey.html"
|
16
16
|
end
|
17
17
|
|
18
|
+
it "should parse the url even when" do
|
19
|
+
Feedzirra::Parser::Atom.parse(load_sample("atom_with_link_tag_for_url_unmarked.xml")).entries.first.url.should == "http://www.innoq.com/blog/phaus/2009/07/ja.html"
|
20
|
+
end
|
21
|
+
|
18
22
|
it "should parse the author" do
|
19
23
|
@entry.author.should == "AWS Editor"
|
20
24
|
end
|