feedjira 1.1.0 → 1.2.0

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.
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title>xkcd.com</title><link href="http://xkcd.com/" rel="alternate"></link><id>http://xkcd.com/</id><updated>2013-11-29T00:00:00Z</updated><entry><title>Oort Cloud</title><link href="http://xkcd.com/1297/" rel="alternate"></link><updated>2013-11-29T00:00:00Z</updated><id>http://xkcd.com/1297/</id><summary type="html">&lt;img src="http://imgs.xkcd.com/comics/oort_cloud.png" title="... I wanna try. Hang on, be right back." alt="... I wanna try. Hang on, be right back." /&gt;</summary></entry><entry><title>Git Commit</title><link href="http://xkcd.com/1296/" rel="alternate"></link><updated>2013-11-27T00:00:00Z</updated><id>http://xkcd.com/1296/</id><summary type="html">&lt;img src="http://imgs.xkcd.com/comics/git_commit.png" title="Merge branch 'asdfasjkfdlas/alkdjf' into sdkjfls-final" alt="Merge branch 'asdfasjkfdlas/alkdjf' into sdkjfls-final" /&gt;</summary></entry><entry><title>New Study</title><link href="http://xkcd.com/1295/" rel="alternate"></link><updated>2013-11-25T00:00:00Z</updated><id>http://xkcd.com/1295/</id><summary type="html">&lt;img src="http://imgs.xkcd.com/comics/new_study.png" title="When the results are published, no one will be sure whether to report on them again." alt="When the results are published, no one will be sure whether to report on them again." /&gt;</summary></entry><entry><title>Telescope Names</title><link href="http://xkcd.com/1294/" rel="alternate"></link><updated>2013-11-22T00:00:00Z</updated><id>http://xkcd.com/1294/</id><summary type="html">&lt;img src="http://imgs.xkcd.com/comics/telescope_names.png" title="The Thirty Meter Telescope will be renamed The Flesh-Searing Eye on the Volcano." alt="The Thirty Meter Telescope will be renamed The Flesh-Searing Eye on the Volcano." /&gt;</summary></entry></feed>
@@ -1,23 +0,0 @@
1
- require 'benchmark'
2
- require 'net/http'
3
- require 'curb'
4
-
5
- urls = ['http://www.google.com'] * 100
6
-
7
- Benchmark.bm(11) do |b|
8
- b.report('Net::HTTP') do
9
- urls.each do |url|
10
- Net::HTTP.get URI.parse url
11
- end
12
- end
13
-
14
- b.report('Curl::Easy') do
15
- urls.each do |url|
16
- Curl::Easy.perform url
17
- end
18
- end
19
-
20
- b.report('Curl::Multi') do
21
- Curl::Multi.get urls
22
- end
23
- end
@@ -1,73 +0,0 @@
1
- require 'benchmark'
2
- require 'feedjira'
3
- require 'simple-rss'
4
- require 'feed-normalizer'
5
- require 'feed_me'
6
-
7
- iterations = 10
8
- urls = File.readlines(File.dirname(__FILE__) + '/feed_list.txt')
9
- files = Dir.glob(File.dirname(__FILE__) + '/feed_xml/*.xml')
10
- xmls = files.map { |file| File.open(file).read }
11
-
12
- # suppress warnings
13
- $VERBOSE = nil
14
-
15
- puts 'Parsing benchmarks'
16
-
17
- Benchmark.bm(15) do |b|
18
- b.report('feedjira') do
19
- iterations.times do
20
- xmls.each { |xml| Feedjira::Feed.parse xml }
21
- end
22
- end
23
-
24
- b.report('simple-rss') do
25
- iterations.times do
26
- xmls.each { |xml| SimpleRSS.parse xml }
27
- end
28
- end
29
-
30
- b.report('feed-normalizer') do
31
- iterations.times do
32
- xmls.each { |xml| FeedNormalizer::FeedNormalizer.parse xml }
33
- end
34
- end
35
-
36
- # incompatible with `ruby-feedparser`, same constant used
37
- require 'feed_parser'
38
- b.report('feed_parser') do
39
- iterations.times do
40
- xmls.each { |xml| FeedParser.new(feed_xml: xml).parse }
41
- end
42
- end
43
-
44
- b.report('feed_me') do
45
- iterations.times do
46
- xmls.each { |xml| FeedMe.parse xml }
47
- end
48
- end
49
-
50
- # incompatible with `feed_parser`, same constant used
51
- # require 'feedparser'
52
- # b.report('ruby-feedparser') do
53
- # iterations.times do
54
- # xmls.each { |xml| FeedParser::Feed::new xml }
55
- # end
56
- # end
57
- end
58
-
59
- puts "\nFetch and parse benchmarks"
60
-
61
- Benchmark.bm(15) do |b|
62
- b.report('feedjira') do
63
- iterations.times { Feedjira::Feed.fetch_and_parse urls }
64
- end
65
-
66
- # incompatible with `ruby-feedparser`, same constant used
67
- require 'feed_parser'
68
- b.report('feed_parser') do
69
- iterations.times do
70
- urls.each { |url| FeedParser.new(url: url).parse }
71
- end
72
- end
73
- end