Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: feedjira/feedjira
base: 6e28b2a26e
...
head fork: feedjira/feedjira
compare: 1fc5276e0a
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
19 HISTORY.md
@@ -0,0 +1,19 @@
+# 0.2.0.rc1
+* Remove ActiveSupport dependency
+ * No longer tethered to any version of Rails!
+* Update curb (v0.8.0) and rspec (v2.10.0)
+* Revert [3008ceb](https://github.com/pauldix/feedzirra/commit/3008ceb338df1f4c37a211d0aab8a6ad4f584dbc)
+* Add Travis-CI integration
+* General repository and gem maintenance
+
+# 0.1.3
+* ?
+
+# 0.1.2
+* ?
+
+# 0.1.1
+* make FeedEntries enumerable (patch by Daniel Gregoire)
+
+# 0.1.0
+* lower builder requirement to make it rails-3 friendly
View
52 README.rdoc → README.md
@@ -1,10 +1,10 @@
-== Feedzirra
+# Feedzirra
-I'd like feedback on the api and any bugs encountered on feeds in the wild. I've set up a {google group here}[http://groups.google.com/group/feedzirra].
+I'd like feedback on the api and any bugs encountered on feeds in the wild. I've set up a [google group here](http://groups.google.com/group/feedzirra).
-=== Description
+## Description
-Feedzirra is a feed library that is designed to get and update many feeds as quickly as possible. This includes using libcurl-multi through the taf2-curb[link:http://github.com/taf2/curb/tree/master] gem for faster http gets, and libxml through nokogiri[link:http://github.com/tenderlove/nokogiri/tree/master] and sax-machine[link:http://github.com/pauldix/sax-machine/tree/master] for faster parsing.
+Feedzirra is a feed library that is designed to get and update many feeds as quickly as possible. This includes using libcurl-multi through the [curb](https://github.com/taf2/curb) gem for faster http gets, and libxml through [nokogiri](https://github.com/tenderlove/nokogiri) and [sax-machine](https://github.com/pauldix/sax-machine) for faster parsing.
Once you have fetched feeds using Feedzirra, they can be updated using the feed objects. Feedzirra automatically inserts etag and last-modified information from the http response headers to lower bandwidth usage, eliminate unnecessary parsing, and make things speedier in general.
@@ -14,13 +14,13 @@ The fetching and parsing logic have been decoupled so that either of them can be
The final feature of Feedzirra is the ability to define custom parsing classes. In truth, Feedzirra could be used to parse much more than feeds. Microformats, page scraping, and almost anything else are fair game.
-=== Speedup date parsing
+## Speedup date parsing
-In MRI the date parsing code is written in ruby and is optimized for readability over speed, to speed up this part you can install the {home_run}[https://github.com/jeremyevans/home_run] gem to replace it with an optimized C version.
+In MRI the date parsing code is written in ruby and is optimized for readability over speed, to speed up this part you can install the [home_run](https://github.com/jeremyevans/home_run) gem to replace it with an optimized C version.
-=== Usage
+## Usage
-{A gist of the following code}[link:http://gist.github.com/57285]
+[A gist of the following code](http://gist.github.com/57285)
require 'feedzirra'
@@ -70,24 +70,24 @@ In MRI the date parsing code is written in ruby and is optimized for readability
# defining custom behavior on failure or success. note that a return status of 304 (not updated) will call the on_success handler
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing",
- :on_success => lambda {|url, feed| puts feed.title },
- :on_failure => lambda {|url, response_code, response_header, response_body| puts response_body })
+ :on_success => lambda [|url, feed| puts feed.title ],
+ :on_failure => lambda [|url, response_code, response_header, response_body| puts response_body ])
# if a collection was passed into fetch_and_parse, the handlers will be called for each one
# the behavior for the handlers when using Feedzirra::Feed.update is slightly different. The feed passed into on_success will be
# the updated feed with the standard updated accessors. on failure it will be the original feed object passed into update
# fetching a feed via a proxy (optional)
- feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing", {:proxy_url => '10.0.0.1', :proxy_port => 3084})
+ feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing", [:proxy_url => '10.0.0.1', :proxy_port => 3084])
-=== Extending
+## Extending
-==== Adding a feed parsing class
+### Adding a feed parsing class
# Adds a new feed parsing class, this class will be used first
Feedzirra::Feed.add_feed_class MyFeedClass
-==== Adding attributes to all feeds types / all entries types
+### Adding attributes to all feeds types / all entries types
# Add the generator attribute to all feed types
Feedzirra::Feed.add_common_feed_element('generator')
@@ -96,10 +96,10 @@ In MRI the date parsing code is written in ruby and is optimized for readability
# Add some GeoRss information
Feedzirra::Feed.add_common_feed_entry_element('geo:lat', :as => :lat)
Feedzirra::Feed.fetch_and_parse("http://www.earthpublisher.com/georss.php").entries.each do |e|
- p "lat: #{e.lat}, long: #{e.long}"
+ p "lat: #[e.lat}, long: #{e.long]"
end
-==== Adding attributes to only one class
+### Adding attributes to only one class
If you want to add attributes for only on class you simply have to declare them in the class
@@ -113,29 +113,29 @@ If you want to add attributes for only on class you simply have to declare them
# Fetch a feed containing GeoRss info and print them
Feedzirra::Feed.fetch_and_parse("http://www.earthpublisher.com/georss.php").entries.each do |e|
- p "lat: #{e.lat}, long: #{e.long}"
+ p "lat: #[e.lat}, long: #{e.long]"
end
-=== Benchmarks
+## Benchmarks
-One of the goals of Feedzirra is speed. This includes not only parsing, but fetching multiple feeds as quickly as possible. I ran a benchmark getting 20 feeds 10 times using Feedzirra, rFeedParser, and FeedNormalizer. For more details the {benchmark code can be found in the project in spec/benchmarks/feedzirra_benchmarks.rb}[http://github.com/pauldix/feedzirra/blob/7fb5634c5c16e9c6ec971767b462c6518cd55f5d/spec/benchmarks/feedzirra_benchmarks.rb]
+One of the goals of Feedzirra is speed. This includes not only parsing, but fetching multiple feeds as quickly as possible. I ran a benchmark getting 20 feeds 10 times using Feedzirra, rFeedParser, and FeedNormalizer. For more details the [benchmark code can be found in the project in spec/benchmarks/feedzirra_benchmarks.rb](https://github.com/pauldix/feedzirra/blob/7fb5634c5c16e9c6ec971767b462c6518cd55f5d/spec/benchmarks/feedzirra_benchmarks.rb)
feedzirra 5.170000 1.290000 6.460000 ( 18.917796)
rfeedparser 104.260000 12.220000 116.480000 (244.799063)
feed-normalizer 66.250000 4.010000 70.260000 (191.589862)
-The result of that benchmark is a bit sketchy because of the network variability. Running 10 times against the same 20 feeds was meant to smooth some of that out. However, there is also a {benchmark comparing parsing speed in spec/benchmarks/parsing_benchmark.rb}[http://github.com/pauldix/feedzirra/blob/7fb5634c5c16e9c6ec971767b462c6518cd55f5d/spec/benchmarks/parsing_benchmark.rb] on an atom feed.
+The result of that benchmark is a bit sketchy because of the network variability. Running 10 times against the same 20 feeds was meant to smooth some of that out. However, there is also a [benchmark comparing parsing speed in spec/benchmarks/parsing_benchmark.rb](https://github.com/pauldix/feedzirra/blob/7fb5634c5c16e9c6ec971767b462c6518cd55f5d/spec/benchmarks/parsing_benchmark.rb) on an atom feed.
feedzirra 0.500000 0.030000 0.530000 ( 0.658744)
rfeedparser 8.400000 1.110000 9.510000 ( 11.839827)
feed-normalizer 5.980000 0.160000 6.140000 ( 7.576140)
-There's also a {benchmark that shows the results of using Feedzirra to perform updates on feeds}[http://github.com/pauldix/feedzirra/blob/45d64319544c61a4c9eb9f7f825c73b9f9030cb3/spec/benchmarks/updating_benchmarks.rb] you've already pulled in. I tested against 179 feeds. The first is the initial pull and the second is an update 65 seconds later. I'm not sure how many of them support etag and last-modified, so performance may be better or worse depending on what feeds you're requesting.
+There's also a [benchmark that shows the results of using Feedzirra to perform updates on feeds](https://github.com/pauldix/feedzirra/blob/45d64319544c61a4c9eb9f7f825c73b9f9030cb3/spec/benchmarks/updating_benchmarks.rb) you've already pulled in. I tested against 179 feeds. The first is the initial pull and the second is an update 65 seconds later. I'm not sure how many of them support etag and last-modified, so performance may be better or worse depending on what feeds you're requesting.
feedzirra fetch and parse 4.010000 0.710000 4.720000 ( 15.110101)
feedzirra update 0.660000 0.280000 0.940000 ( 5.152709)
-=== TODO
+## TODO
This thing needs to hammer on many different feeds in the wild. I'm sure there will be bugs. I want to find them and crush them. I didn't bother using the test suite for feedparser. i wanted to start fresh.
@@ -149,15 +149,15 @@ Here are some more specific TODOs.
* Make the feed_spec actually mock stuff out so it doesn't hit the net.
* Readdress how feeds determine if they can parse a document. Maybe I should use namespaces instead?
-=== LICENSE
+## LICENSE
(The MIT License)
Copyright (c) 2009-2012:
-- {Paul Dix}[http://pauldix.net]
-- {Julien Kirch}[http://archiloque.net/]
-- {Ezekiel Templin}[http://zeke.templ.in/]
+- [Paul Dix](http://pauldix.net)
+- [Julien Kirch](http://archiloque.net/)
+- [Ezekiel Templin](http://zeke.templ.in/)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
7 history.md
@@ -1,7 +0,0 @@
-# 0.1.1
-
-- make FeedEntries enumerable (patch by Daniel Gregoire)
-
-# 0.1.0
-
-- lower builder requirement to make it rails-3 friendly
View
2  lib/feedzirra/version.rb
@@ -1,3 +1,3 @@
module Feedzirra
- VERSION = '0.1.3'
+ VERSION = '0.2.0.rc1'
end

No commit comments for this range

Something went wrong with that request. Please try again.