pauldix-feedzirra 0.0.15 → 0.0.16
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/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
|
|
data/lib/feedzirra.rb
CHANGED
@@ -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
|