ratom 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/History.txt +7 -0
  2. data/License.txt +20 -0
  3. data/Manifest.txt +52 -0
  4. data/README.txt +123 -0
  5. data/Rakefile +4 -0
  6. data/config/hoe.rb +72 -0
  7. data/config/requirements.rb +17 -0
  8. data/lib/atom.rb +566 -0
  9. data/lib/atom/pub.rb +185 -0
  10. data/lib/atom/version.rb +9 -0
  11. data/lib/atom/xml/parser.rb +223 -0
  12. data/setup.rb +1585 -0
  13. data/spec/app/member_entry.atom +31 -0
  14. data/spec/app/service.xml +36 -0
  15. data/spec/atom/pub_spec.rb +289 -0
  16. data/spec/atom_spec.rb +1012 -0
  17. data/spec/conformance/baseuri.atom +19 -0
  18. data/spec/conformance/divtest.atom +32 -0
  19. data/spec/conformance/linktests.xml +93 -0
  20. data/spec/conformance/nondefaultnamespace-baseline.atom +25 -0
  21. data/spec/conformance/nondefaultnamespace-xhtml.atom +25 -0
  22. data/spec/conformance/nondefaultnamespace.atom +25 -0
  23. data/spec/conformance/ordertest.xml +112 -0
  24. data/spec/conformance/title/html-cdata.atom +22 -0
  25. data/spec/conformance/title/html-entity.atom +22 -0
  26. data/spec/conformance/title/html-ncr.atom +22 -0
  27. data/spec/conformance/title/text-cdata.atom +22 -0
  28. data/spec/conformance/title/text-entity.atom +21 -0
  29. data/spec/conformance/title/text-ncr.atom +21 -0
  30. data/spec/conformance/title/xhtml-entity.atom +21 -0
  31. data/spec/conformance/title/xhtml-ncr.atom +21 -0
  32. data/spec/conformance/unknown-namespace.atom +25 -0
  33. data/spec/conformance/xmlbase.atom +133 -0
  34. data/spec/fixtures/complex_single_entry.atom +45 -0
  35. data/spec/fixtures/created_entry.atom +31 -0
  36. data/spec/fixtures/entry.atom +30 -0
  37. data/spec/fixtures/multiple_entry.atom +0 -0
  38. data/spec/fixtures/simple_single_entry.atom +21 -0
  39. data/spec/paging/first_paged_feed.atom +21 -0
  40. data/spec/paging/last_paged_feed.atom +21 -0
  41. data/spec/paging/middle_paged_feed.atom +22 -0
  42. data/spec/spec.opts +2 -0
  43. data/spec/spec_helper.rb +24 -0
  44. data/tasks/deployment.rake +34 -0
  45. data/tasks/environment.rake +7 -0
  46. data/tasks/rspec.rake +15 -0
  47. data/tasks/website.rake +17 -0
  48. data/website/index.html +11 -0
  49. data/website/index.txt +39 -0
  50. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  51. data/website/stylesheets/screen.css +138 -0
  52. data/website/template.rhtml +48 -0
  53. metadata +126 -0
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <id>http://atomtests.philringnalda.com/tests/item/title/text-ncr.atom</id>
4
+ <title>Atom item title text NCR</title>
5
+ <updated>2005-12-18T00:13:00Z</updated>
6
+ <author>
7
+ <name>Phil Ringnalda</name>
8
+ <uri>http://weblog.philringnalda.com/</uri>
9
+ </author>
10
+ <link rel="self" href="http://atomtests.philringnalda.com/tests/item/title/text-ncr.atom"/>
11
+ <entry>
12
+ <id>http://atomtests.philringnalda.com/tests/item/title/text-ncr.atom/1</id>
13
+ <title type="text">&#60;title></title>
14
+ <updated>2005-12-18T00:13:00Z</updated>
15
+ <summary>An item with a type="text" title consisting of a less-than
16
+ character, the word 'title' and a greater-than character, where the
17
+ less-than character is escaped with a numeric character reference.</summary>
18
+ <link href="http://atomtests.philringnalda.com/alt/title-title.html"/>
19
+ <category term="item title"/>
20
+ </entry>
21
+ </feed>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <id>http://atomtests.philringnalda.com/tests/item/title/xhtml-entity.atom</id>
4
+ <title>Atom item title xhtml entity</title>
5
+ <updated>2005-12-18T00:13:00Z</updated>
6
+ <author>
7
+ <name>Phil Ringnalda</name>
8
+ <uri>http://weblog.philringnalda.com/</uri>
9
+ </author>
10
+ <link rel="self" href="http://atomtests.philringnalda.com/tests/item/title/xhtml-entity.atom"/>
11
+ <entry>
12
+ <id>http://atomtests.philringnalda.com/tests/item/title/xhtml-entity.atom/1</id>
13
+ <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">&lt;title></div></title>
14
+ <updated>2005-12-18T00:13:00Z</updated>
15
+ <summary>An item with a type="xhtml" title consisting of a less-than
16
+ character, the word 'title' and a greater-than character, where the
17
+ less-than character is escaped with its character entity reference.</summary>
18
+ <link href="http://atomtests.philringnalda.com/alt/title-title.html"/>
19
+ <category term="item title"/>
20
+ </entry>
21
+ </feed>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <id>http://atomtests.philringnalda.com/tests/item/title/xhtml-ncr.atom</id>
4
+ <title>Atom item title xhtml ncr</title>
5
+ <updated>2005-12-18T00:13:00Z</updated>
6
+ <author>
7
+ <name>Phil Ringnalda</name>
8
+ <uri>http://weblog.philringnalda.com/</uri>
9
+ </author>
10
+ <link rel="self" href="http://atomtests.philringnalda.com/tests/item/title/xhtml-ncr.atom"/>
11
+ <entry>
12
+ <id>http://atomtests.philringnalda.com/tests/item/title/xhtml-ncr.atom/1</id>
13
+ <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">&#60;title></div></title>
14
+ <updated>2005-12-18T00:13:00Z</updated>
15
+ <summary>An item with a type="xhtml" title consisting of a less-than
16
+ character, the word 'title' and a greater-than character, where
17
+ the less-than character is escaped with its numeric character reference.</summary>
18
+ <link href="http://atomtests.philringnalda.com/alt/title-title.html"/>
19
+ <category term="item title"/>
20
+ </entry>
21
+ </feed>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom" xmlns:h="http://www.w3.org/1999/xhtml">
3
+ <title>Prefixed XHTML with unprefixed bogo-namespace</title>
4
+ <updated>2006-01-22T19:47:34Z</updated>
5
+ <link href="http://example.org/tests/namespace/result.html"/>
6
+ <author>
7
+ <name>Henri Sivonen</name>
8
+ <email>hsivonen@iki.fi</email>
9
+ </author>
10
+ <id>http://hsivonen.iki.fi/test/unknown-namespace.atom</id>
11
+ <entry>
12
+ <id>http://hsivonen.iki.fi/test/unknown-namespace.atom/entry</id>
13
+ <title>This entry contains XHTML-looking markup that is not XHTML</title>
14
+ <link href="http://example.org/tests/namespace/result.html"/>
15
+ <updated>2006-01-22T19:47:34Z</updated>
16
+ <content type="xhtml"><h:div xmlns='http://hsivonen.iki.fi/FooML'>
17
+ <h:ul>
18
+ <h:li>This is an XHTML list item. If it is not rendered as a list item, the namespace support of the client app is broken.</h:li>
19
+ </h:ul>
20
+ <ul>
21
+ <li>This is not an XHTML list item. If it is rendered as a list item, the namespace support of the client app is broken.</li>
22
+ </ul>
23
+ </h:div></content>
24
+ </entry>
25
+ </feed>
@@ -0,0 +1,133 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://example.org/tests/">
3
+ <title>xml:base support tests</title>
4
+ <subtitle type="html">All alternate links should point to &lt;code>http://example.org/tests/base/result.html&lt;/code>; all links in content should point where their label says.</subtitle>
5
+ <link href="http://example.org/tests/base/result.html"/>
6
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base</id>
7
+ <updated>2006-01-17T12:35:16+01:00</updated>
8
+
9
+ <entry>
10
+ <title>1: Alternate link: Absolute URL</title>
11
+ <link href="http://example.org/tests/base/result.html"/>
12
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test1</id>
13
+ <updated>2006-01-17T12:35:16+01:00</updated>
14
+ </entry>
15
+
16
+ <entry>
17
+ <title>2: Alternate link: Host-relative absolute URL</title>
18
+ <link href="/tests/base/result.html"/>
19
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test2</id>
20
+ <updated>2006-01-17T12:35:15+01:00</updated>
21
+ </entry>
22
+
23
+ <entry>
24
+ <title>3: Alternate link: Relative URL</title>
25
+ <link href="base/result.html"/>
26
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test3</id>
27
+ <updated>2006-01-17T12:35:14+01:00</updated>
28
+ </entry>
29
+
30
+ <entry>
31
+ <title>4: Alternate link: Relative URL with parent directory component</title>
32
+ <link href="../tests/base/result.html"/>
33
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test4</id>
34
+ <updated>2006-01-17T12:35:13+01:00</updated>
35
+ </entry>
36
+
37
+ <entry>
38
+ <title>5: Content: Absolute URL</title>
39
+ <link href="http://example.org/tests/base/result.html"/>
40
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test5</id>
41
+ <content type="html">&lt;a href="http://example.org/tests/base/result.html"&gt;http://example.org/tests/base/result.html&lt;/a&gt;</content>
42
+ <updated>2006-01-17T12:35:12+01:00</updated>
43
+ </entry>
44
+
45
+ <entry>
46
+ <title>6: Content: Host-relative URL</title>
47
+ <link href="http://example.org/tests/base/result.html"/>
48
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test6</id>
49
+ <content type="html">&lt;a href="/tests/base/result.html"&gt;http://example.org/tests/base/result.html&lt;/a&gt;</content>
50
+ <updated>2006-01-17T12:35:11+01:00</updated>
51
+ </entry>
52
+
53
+ <entry>
54
+ <title>7: Content: Relative URL</title>
55
+ <link href="http://example.org/tests/base/result.html"/>
56
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test7</id>
57
+ <content type="html">&lt;a href="base/result.html"&gt;http://example.org/tests/base/result.html&lt;/a&gt;</content>
58
+ <updated>2006-01-17T12:35:10+01:00</updated>
59
+ </entry>
60
+
61
+ <entry>
62
+ <title>8: Content: Relative URL with parent directory component</title>
63
+ <link href="http://example.org/tests/base/result.html"/>
64
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test8</id>
65
+ <content type="html">&lt;a href="../tests/base/result.html"&gt;http://example.org/tests/base/result.html&lt;/a&gt;</content>
66
+ <updated>2006-01-17T12:35:9+01:00</updated>
67
+ </entry>
68
+
69
+ <entry xml:base="http://example.org/tests/entrybase/">
70
+ <title type="html">9: Content, &lt;code>&amp;lt;entry>&lt;/code> has base: Absolute URL</title>
71
+ <link href="http://example.org/tests/base/result.html"/>
72
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test9</id>
73
+ <content type="html">&lt;a href="http://example.org/tests/entrybase/result.html"&gt;http://example.org/tests/entrybase/result.html&lt;/a&gt;</content>
74
+ <updated>2006-01-17T12:35:8+01:00</updated>
75
+ </entry>
76
+
77
+ <entry xml:base="http://example.org/tests/entrybase/">
78
+ <title type="html">10: Content, &lt;code>&amp;lt;entry>&lt;/code> has base: Host-relative URL</title>
79
+ <link href="http://example.org/tests/base/result.html"/>
80
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test10</id>
81
+ <content type="html">&lt;a href="/tests/entrybase/result.html"&gt;http://example.org/tests/entrybase/result.html&lt;/a&gt;</content>
82
+ <updated>2006-01-17T12:35:7+01:00</updated>
83
+ </entry>
84
+
85
+ <entry xml:base="http://example.org/tests/entrybase/">
86
+ <title type="html">11: Content, &lt;code>&amp;lt;entry>&lt;/code> has base: Relative URL</title>
87
+ <link href="http://example.org/tests/base/result.html"/>
88
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test11</id>
89
+ <content type="html">&lt;a href="result.html"&gt;http://example.org/tests/entrybase/result.html&lt;/a&gt;</content>
90
+ <updated>2006-01-17T12:35:6+01:00</updated>
91
+ </entry>
92
+
93
+ <entry xml:base="http://example.org/tests/entrybase/">
94
+ <title type="html">12: Content, &lt;code>&amp;lt;entry>&lt;/code> has base: Relative URL with parent directory component</title>
95
+ <link href="http://example.org/tests/base/result.html"/>
96
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test12</id>
97
+ <content type="html">&lt;a href="../entrybase/result.html"&gt;http://example.org/tests/entrybase/result.html&lt;/a&gt;</content>
98
+ <updated>2006-01-17T12:35:5+01:00</updated>
99
+ </entry>
100
+
101
+ <entry>
102
+ <title type="html">13: Content, &lt;code>&amp;lt;content>&lt;/code> has base: Absolute URL</title>
103
+ <link href="http://example.org/tests/base/result.html"/>
104
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test13</id>
105
+ <content type="html" xml:base="http://example.org/tests/contentbase/">&lt;a href="http://example.org/tests/contentbase/result.html"&gt;http://example.org/tests/contentbase/result.html&lt;/a&gt;</content>
106
+ <updated>2006-01-17T12:35:4+01:00</updated>
107
+ </entry>
108
+
109
+ <entry>
110
+ <title type="html">14: Content, &lt;code>&amp;lt;content>&lt;/code> has base: Host-relative URL</title>
111
+ <link href="http://example.org/tests/base/result.html"/>
112
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test14</id>
113
+ <content type="html" xml:base="http://example.org/tests/contentbase/">&lt;a href="/tests/contentbase/result.html"&gt;http://example.org/tests/contentbase/result.html&lt;/a&gt;</content>
114
+ <updated>2006-01-17T12:35:3+01:00</updated>
115
+ </entry>
116
+
117
+ <entry>
118
+ <title type="html">15: Content, &lt;code>&amp;lt;content>&lt;/code> has base: Relative URL</title>
119
+ <link href="http://example.org/tests/base/result.html"/>
120
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test15</id>
121
+ <content type="html" xml:base="http://example.org/tests/contentbase/">&lt;a href="result.html"&gt;http://example.org/tests/contentbase/result.html&lt;/a&gt;</content>
122
+ <updated>2006-01-17T12:35:2+01:00</updated>
123
+ </entry>
124
+
125
+ <entry>
126
+ <title type="html">16: Content, &lt;code>&amp;lt;content>&lt;/code> has base: Relative URL with parent directory component</title>
127
+ <link href="http://example.org/tests/base/result.html"/>
128
+ <id>tag:plasmasturm.org,2005:Atom-Tests:xml-base:Test16</id>
129
+ <content type="html" xml:base="http://example.org/tests/contentbase/">&lt;a href="../contentbase/result.html"&gt;http://example.org/tests/contentbase/result.html&lt;/a&gt;</content>
130
+ <updated>2006-01-17T12:35:1+01:00</updated>
131
+ </entry>
132
+
133
+ </feed>
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <title type="text">dive into mark</title>
4
+ <subtitle type="html">
5
+ A &lt;em&gt;lot&lt;/em&gt; of effort
6
+ went into making this effortless
7
+ </subtitle>
8
+ <updated>2005-07-31T12:29:29Z</updated>
9
+ <id>tag:example.org,2003:3</id>
10
+ <link rel="alternate" type="text/html"
11
+ hreflang="en" href="http://example.org/"/>
12
+ <link rel="self" type="application/atom+xml"
13
+ href="http://example.org/feed.atom"/>
14
+ <rights>Copyright (c) 2003, Mark Pilgrim</rights>
15
+ <generator uri="http://www.example.com/" version="1.0">
16
+ Example Toolkit
17
+ </generator>
18
+ <entry>
19
+ <title>Atom draft-07 snapshot</title>
20
+ <link rel="alternate" type="text/html"
21
+ href="http://example.org/2005/04/02/atom"/>
22
+ <link rel="enclosure" type="audio/mpeg" length="1337"
23
+ href="http://example.org/audio/ph34r_my_podcast.mp3"/>
24
+ <id>tag:example.org,2003:3.2397</id>
25
+ <updated>2005-07-31T12:29:29Z</updated>
26
+ <published>2003-12-13T08:29:29-04:00</published>
27
+ <author>
28
+ <name>Mark Pilgrim</name>
29
+ <uri>http://example.org/</uri>
30
+ <email>f8dy@example.com</email>
31
+ </author>
32
+ <contributor>
33
+ <name>Sam Ruby</name>
34
+ </contributor>
35
+ <contributor>
36
+ <name>Joe Gregorio</name>
37
+ </contributor>
38
+ <content type="xhtml" xml:lang="en"
39
+ xml:base="http://diveintomark.org/">
40
+ <div xmlns="http://www.w3.org/1999/xhtml">
41
+ <p><i>[Update: The Atom draft is finished.]</i></p>
42
+ </div>
43
+ </content>
44
+ </entry>
45
+ </feed>
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" ?>
2
+ <entry xmlns="http://www.w3.org/2005/Atom">
3
+ <title>Atom draft-07 snapshot</title>
4
+ <link rel="edit" href="http://example.org/edit/atom"/>
5
+ <link rel="alternate" type="text/html"
6
+ href="http://example.org/2005/04/02/atom"/>
7
+ <link rel="enclosure" type="audio/mpeg" length="1337"
8
+ href="http://example.org/audio/ph34r_my_podcast.mp3"/>
9
+ <id>tag:example.org,2003:3.2397</id>
10
+ <updated>2005-07-31T12:29:31Z</updated>
11
+ <published>2003-12-13T08:29:31-04:00</published>
12
+ <author>
13
+ <name>Mark Pilgrim</name>
14
+ <uri>http://example.org/</uri>
15
+ <email>f8dy@example.com</email>
16
+ </author>
17
+ <contributor>
18
+ <name>Sam Ruby</name>
19
+ </contributor>
20
+ <contributor>
21
+ <name>Joe Gregorio</name>
22
+ </contributor>
23
+ <content type="xhtml" xml:lang="en"
24
+ xml:base="http://diveintomark.org/">
25
+ <div xmlns="http://www.w3.org/1999/xhtml">
26
+ <p>
27
+ <i>[Update: The Atom draft is finished.]</i>
28
+ </p>
29
+ </div>
30
+ </content>
31
+ </entry>
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" ?>
2
+ <entry xmlns="http://www.w3.org/2005/Atom">
3
+ <title>Atom draft-07 snapshot</title>
4
+ <link rel="alternate" type="text/html"
5
+ href="http://example.org/2005/04/02/atom"/>
6
+ <link rel="enclosure" type="audio/mpeg" length="1337"
7
+ href="http://example.org/audio/ph34r_my_podcast.mp3"/>
8
+ <id>tag:example.org,2003:3.2397</id>
9
+ <updated>2005-07-31T12:29:29Z</updated>
10
+ <published>2003-12-13T08:29:29-04:00</published>
11
+ <author>
12
+ <name>Mark Pilgrim</name>
13
+ <uri>http://example.org/</uri>
14
+ <email>f8dy@example.com</email>
15
+ </author>
16
+ <contributor>
17
+ <name>Sam Ruby</name>
18
+ </contributor>
19
+ <contributor>
20
+ <name>Joe Gregorio</name>
21
+ </contributor>
22
+ <content type="xhtml" xml:lang="en"
23
+ xml:base="http://diveintomark.org/">
24
+ <div xmlns="http://www.w3.org/1999/xhtml">
25
+ <p>
26
+ <i>[Update: The Atom draft is finished.]</i>
27
+ </p>
28
+ </div>
29
+ </content>
30
+ </entry>
File without changes
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+
4
+ <title>Example Feed</title>
5
+ <link href="http://example.org/"/>
6
+ <updated>2003-12-13T18:30:02Z</updated>
7
+ <author>
8
+ <name>John Doe</name>
9
+ </author>
10
+ <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
11
+
12
+ <entry>
13
+ <title>Atom-Powered Robots Run Amok</title>
14
+ <link href="http://example.org/2003/12/13/atom03"/>
15
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
16
+ <content type="html">This &lt;em&gt;is&lt;/em&gt; html.</content>
17
+ <updated>2003-12-13T18:30:02Z</updated>
18
+ <summary>Some text.</summary>
19
+ </entry>
20
+
21
+ </feed>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <title>Example Feed</title>
4
+ <link href="http://example.org/"/>
5
+ <link rel="self" href="http://example.org/index.atom"/>
6
+ <link rel="first" href="http://example.org/index.atom"/>
7
+ <link rel="next" href="http://example.org/index.atom?page=2"/>
8
+ <link rel="last" href="http://example.org/index.atom?page=10"/>
9
+ <updated>2003-12-13T18:30:02Z</updated>
10
+ <author>
11
+ <name>John Doe</name>
12
+ </author>
13
+ <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
14
+ <entry>
15
+ <title>Atom-Powered Robots Run Amok</title>
16
+ <link href="http://example.org/2003/12/13/atom03"/>
17
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
18
+ <updated>2003-12-13T18:30:02Z</updated>
19
+ <summary>Some text.</summary>
20
+ </entry>
21
+ </feed>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <title>Example Feed</title>
4
+ <link href="http://example.org/"/>
5
+ <link rel="self" href="http://example.org/index.atom?page=10"/>
6
+ <link rel="first" href="http://example.org/index.atom"/>
7
+ <link rel="prev" href="http://example.org/index.atom?page=9"/>
8
+ <link rel="last" href="http://example.org/index.atom?page=10"/>
9
+ <updated>2003-12-13T18:30:02Z</updated>
10
+ <author>
11
+ <name>John Doe</name>
12
+ </author>
13
+ <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
14
+ <entry>
15
+ <title>Atom-Powered Robots Run Amok</title>
16
+ <link href="http://example.org/2003/12/13/atom03"/>
17
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
18
+ <updated>2003-11-10T18:30:02Z</updated>
19
+ <summary>Some text.</summary>
20
+ </entry>
21
+ </feed>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <title>Example Feed</title>
4
+ <link href="http://example.org/"/>
5
+ <link rel="self" href="http://example.org/index.atom?page=3"/>
6
+ <link rel="first" href="http://example.org/index.atom"/>
7
+ <link rel="prev" href="http://example.org/index.atom?page=2"/>
8
+ <link rel="next" href="http://example.org/index.atom?page=4"/>
9
+ <link rel="last" href="http://example.org/index.atom?page=10"/>
10
+ <updated>2003-12-13T18:30:02Z</updated>
11
+ <author>
12
+ <name>John Doe</name>
13
+ </author>
14
+ <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
15
+ <entry>
16
+ <title>Atom-Powered Robots Run Amok</title>
17
+ <link href="http://example.org/2003/12/13/atom03"/>
18
+ <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
19
+ <updated>2003-11-15T18:30:02Z</updated>
20
+ <summary>Some text.</summary>
21
+ </entry>
22
+ </feed>
data/spec/spec.opts ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --diff
@@ -0,0 +1,24 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ gem 'rspec'
6
+ require 'spec'
7
+ end
8
+
9
+ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
10
+ require 'atom'
11
+
12
+ Spec::Runner.configure do |config|
13
+
14
+ def mock_response(klass, body, headers = {})
15
+ response = klass.new(nil, nil, nil)
16
+ response.stub!(:body).and_return(body)
17
+
18
+ headers.each do |k, v|
19
+ response.stub!(:[]).with(k).and_return(v)
20
+ end
21
+
22
+ response
23
+ end
24
+ end