feedparser 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +9 -2
- data/README.md +69 -27
- data/Rakefile +2 -1
- data/lib/feedparser.rb +7 -1
- data/lib/feedparser/builder/atom.rb +92 -42
- data/lib/feedparser/builder/rss.rb +70 -42
- data/lib/feedparser/feed.rb +7 -14
- data/lib/feedparser/item.rb +9 -12
- data/lib/feedparser/parser.rb +3 -2
- data/lib/feedparser/version.rb +3 -3
- data/test/feeds/googlegroups.atom +19 -0
- data/test/feeds/googlegroups2.atom +7 -0
- data/test/feeds/headius.atom +122 -0
- data/test/feeds/lambdatheultimate.rss2 +288 -0
- data/test/feeds/railstutorial.atom +655 -0
- data/test/feeds/rubyflow.rss2 +116 -0
- data/test/feeds/rubymine.rss2 +315 -0
- data/test/feeds/rubyonrails.atom +1241 -0
- data/test/feeds/sitepoint.rss2 +219 -0
- data/test/helper.rb +36 -9
- data/test/test_atom.rb +14 -32
- data/test/test_atom_live.rb +45 -0
- data/test/test_rss.rb +13 -25
- data/test/test_rss_live.rb +38 -0
- metadata +27 -5
- data/test/feeds/quirksblog.atom.v03 +0 -1098
- data/test/test_atom_from_file.rb +0 -28
data/test/test_atom_from_file.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
###
|
2
|
-
# to run use
|
3
|
-
# ruby -I ./lib -I ./test test/test_atom_from_file.rb
|
4
|
-
# or better
|
5
|
-
# rake test
|
6
|
-
|
7
|
-
require 'helper'
|
8
|
-
|
9
|
-
|
10
|
-
class TestAtomFromFile < MiniTest::Test
|
11
|
-
|
12
|
-
def test_googlegroup
|
13
|
-
feed = parse_feed_from_file( 'googlegroups.atom' )
|
14
|
-
|
15
|
-
assert_equal 'atom', feed.format
|
16
|
-
assert_equal 'Google Groups', feed.generator
|
17
|
-
assert_equal 'https://groups.google.com/d/forum/beerdb', feed.url
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_googlegroup2
|
21
|
-
feed = parse_feed_from_file( 'googlegroups2.atom' )
|
22
|
-
|
23
|
-
assert_equal 'atom', feed.format
|
24
|
-
assert_equal 'Google Groups (w/ leading n trailing newlines stripped)', feed.generator
|
25
|
-
assert_equal 'https://groups.google.com/d/forum/beerdb', feed.url
|
26
|
-
end
|
27
|
-
|
28
|
-
end # class TestAtomFromFile
|