simianarmy-feedzirra 0.0.14 → 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 +5 -6
- metadata +3 -2
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
|
|
@@ -235,11 +235,9 @@ module Feedzirra
|
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
238
|
-
curl.on_failure do |c|
|
238
|
+
curl.on_failure do |c, err|
|
239
239
|
add_url_to_multi(multi, url_queue.shift, url_queue, responses, options) unless url_queue.empty?
|
240
|
-
|
241
|
-
# c can = [Curl object, integer], which breaks on c.response_code
|
242
|
-
c = c.first if c.kind_of? Array
|
240
|
+
|
243
241
|
responses[url] = c.response_code
|
244
242
|
options[:on_failure].call(url, c.response_code, c.header_str, c.body_str) if options.has_key?(:on_failure)
|
245
243
|
end
|
@@ -287,8 +285,9 @@ module Feedzirra
|
|
287
285
|
end
|
288
286
|
end
|
289
287
|
|
290
|
-
curl.on_failure do |c|
|
288
|
+
curl.on_failure do |c, err|
|
291
289
|
add_feed_to_multi(multi, feed_queue.shift, feed_queue, responses, options) unless feed_queue.empty?
|
290
|
+
|
292
291
|
response_code = c.response_code
|
293
292
|
if response_code == 304 # it's not modified. this isn't an error condition
|
294
293
|
responses[feed.feed_url] = feed
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simianarmy-feedzirra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Mauger
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- spec/feedzirra/feed_entry_utilities_spec.rb
|
116
116
|
has_rdoc: true
|
117
117
|
homepage: http://github.com/simianarmy/feedzirra
|
118
|
+
licenses:
|
118
119
|
post_install_message:
|
119
120
|
rdoc_options: []
|
120
121
|
|
@@ -135,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
136
|
requirements: []
|
136
137
|
|
137
138
|
rubyforge_project:
|
138
|
-
rubygems_version: 1.
|
139
|
+
rubygems_version: 1.3.5
|
139
140
|
signing_key:
|
140
141
|
specification_version: 2
|
141
142
|
summary: "A feed fetching and parsing library that treats the internet like Godzilla treats Japan: it dominates and eats all."
|