ratom-ssl 0.0.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.
- data/.gitignore +4 -0
- data/History.txt +118 -0
- data/LICENSE +20 -0
- data/README.rdoc +295 -0
- data/Rakefile +55 -0
- data/VERSION.yml +5 -0
- data/lib/atom/configuration.rb +24 -0
- data/lib/atom/pub.rb +253 -0
- data/lib/atom/version.rb +7 -0
- data/lib/atom/xml/parser.rb +376 -0
- data/lib/atom.rb +771 -0
- data/ratom-ssl.gemspec +98 -0
- data/spec/app/member_entry.atom +31 -0
- data/spec/app/service.xml +36 -0
- data/spec/atom/pub_spec.rb +504 -0
- data/spec/atom_spec.rb +1336 -0
- data/spec/conformance/baseuri.atom +19 -0
- data/spec/conformance/divtest.atom +32 -0
- data/spec/conformance/linktests.xml +103 -0
- data/spec/conformance/nondefaultnamespace-baseline.atom +25 -0
- data/spec/conformance/nondefaultnamespace-xhtml.atom +25 -0
- data/spec/conformance/nondefaultnamespace.atom +25 -0
- data/spec/conformance/ordertest.xml +112 -0
- data/spec/conformance/title/html-cdata.atom +22 -0
- data/spec/conformance/title/html-entity.atom +22 -0
- data/spec/conformance/title/html-ncr.atom +22 -0
- data/spec/conformance/title/text-cdata.atom +22 -0
- data/spec/conformance/title/text-entity.atom +21 -0
- data/spec/conformance/title/text-ncr.atom +21 -0
- data/spec/conformance/title/xhtml-entity.atom +21 -0
- data/spec/conformance/title/xhtml-ncr.atom +21 -0
- data/spec/conformance/unknown-namespace.atom +25 -0
- data/spec/conformance/xmlbase.atom +133 -0
- data/spec/fixtures/complex_single_entry.atom +45 -0
- data/spec/fixtures/created_entry.atom +31 -0
- data/spec/fixtures/entry.atom +30 -0
- data/spec/fixtures/entry_with_custom_extensions.atom +7 -0
- data/spec/fixtures/entry_with_simple_extensions.atom +30 -0
- data/spec/fixtures/entry_with_single_custom_extension.atom +6 -0
- data/spec/fixtures/multiple_entry.atom +0 -0
- data/spec/fixtures/simple_single_entry.atom +21 -0
- data/spec/fixtures/with_stylesheet.atom +8 -0
- data/spec/paging/first_paged_feed.atom +21 -0
- data/spec/paging/last_paged_feed.atom +21 -0
- data/spec/paging/middle_paged_feed.atom +22 -0
- data/spec/property.rb +31 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +43 -0
- metadata +140 -0
@@ -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 <code>http://example.org/tests/base/result.html</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"><a href="http://example.org/tests/base/result.html">http://example.org/tests/base/result.html</a></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"><a href="/tests/base/result.html">http://example.org/tests/base/result.html</a></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"><a href="base/result.html">http://example.org/tests/base/result.html</a></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"><a href="../tests/base/result.html">http://example.org/tests/base/result.html</a></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, <code>&lt;entry></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"><a href="http://example.org/tests/entrybase/result.html">http://example.org/tests/entrybase/result.html</a></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, <code>&lt;entry></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"><a href="/tests/entrybase/result.html">http://example.org/tests/entrybase/result.html</a></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, <code>&lt;entry></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"><a href="result.html">http://example.org/tests/entrybase/result.html</a></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, <code>&lt;entry></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"><a href="../entrybase/result.html">http://example.org/tests/entrybase/result.html</a></content>
|
98
|
+
<updated>2006-01-17T12:35:5+01:00</updated>
|
99
|
+
</entry>
|
100
|
+
|
101
|
+
<entry>
|
102
|
+
<title type="html">13: Content, <code>&lt;content></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/"><a href="http://example.org/tests/contentbase/result.html">http://example.org/tests/contentbase/result.html</a></content>
|
106
|
+
<updated>2006-01-17T12:35:4+01:00</updated>
|
107
|
+
</entry>
|
108
|
+
|
109
|
+
<entry>
|
110
|
+
<title type="html">14: Content, <code>&lt;content></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/"><a href="/tests/contentbase/result.html">http://example.org/tests/contentbase/result.html</a></content>
|
114
|
+
<updated>2006-01-17T12:35:3+01:00</updated>
|
115
|
+
</entry>
|
116
|
+
|
117
|
+
<entry>
|
118
|
+
<title type="html">15: Content, <code>&lt;content></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/"><a href="result.html">http://example.org/tests/contentbase/result.html</a></content>
|
122
|
+
<updated>2006-01-17T12:35:2+01:00</updated>
|
123
|
+
</entry>
|
124
|
+
|
125
|
+
<entry>
|
126
|
+
<title type="html">16: Content, <code>&lt;content></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/"><a href="../contentbase/result.html">http://example.org/tests/contentbase/result.html</a></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">A <em>lot</em> of effort went into making this effortless</subtitle>
|
5
|
+
<updated>2005-07-31T12:29:29Z</updated>
|
6
|
+
<id>tag:example.org,2003:3</id>
|
7
|
+
<link rel="alternate" type="text/html"
|
8
|
+
hreflang="en" href="http://example.org/"/>
|
9
|
+
<link rel="self" type="application/atom+xml"
|
10
|
+
href="http://example.org/feed.atom"/>
|
11
|
+
<rights>Copyright (c) 2003, Mark Pilgrim</rights>
|
12
|
+
<generator uri="http://www.example.com/" version="1.0">
|
13
|
+
Example Toolkit
|
14
|
+
</generator>
|
15
|
+
<category term="atom" scheme="http://example.org" label="Atom" />
|
16
|
+
<entry>
|
17
|
+
<title>Atom draft-07 snapshot</title>
|
18
|
+
<link rel="alternate" type="text/html" title="Alternate link"
|
19
|
+
href="http://example.org/2005/04/02/atom"/>
|
20
|
+
<link rel="enclosure" type="audio/mpeg" length="1337"
|
21
|
+
href="http://example.org/audio/ph34r_my_podcast.mp3"/>
|
22
|
+
<id>tag:example.org,2003:3.2397</id>
|
23
|
+
<updated>2005-07-31T12:29:29Z</updated>
|
24
|
+
<published>2003-12-13T08:29:29-04:00</published>
|
25
|
+
<author>
|
26
|
+
<name>Mark Pilgrim</name>
|
27
|
+
<uri>http://example.org/</uri>
|
28
|
+
<email>f8dy@example.com</email>
|
29
|
+
</author>
|
30
|
+
<contributor>
|
31
|
+
<name>Sam Ruby</name>
|
32
|
+
</contributor>
|
33
|
+
<contributor>
|
34
|
+
<name>Joe Gregorio</name>
|
35
|
+
</contributor>
|
36
|
+
<category term="atom" scheme="http://example.org" label="Atom" />
|
37
|
+
<category term="drafts" scheme="http://example2.org" label="Drafts" />
|
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>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:custom='http://custom.namespace'>
|
3
|
+
<id>https://custom.namespace/id/1</id>
|
4
|
+
<link rel='self' type='application/atom+xml' href='https://custom.namespace/id/1'/>
|
5
|
+
<custom:property name='foo' value='bar'/>
|
6
|
+
<custom:property name='baz' value='bat'/>
|
7
|
+
</entry>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:ex="http://example.org/example" xmlns:ex2="http://example2.org/example2" xmlns:ex3="http://example.org/example3">
|
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
|
+
<ex:simple1>Simple1 Value</ex:simple1>
|
12
|
+
<ex:simple-empty/>
|
13
|
+
<ex:title>Extension Title</ex:title>
|
14
|
+
|
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
|
+
<content type="html">This <em>is</em> html.</content>
|
20
|
+
<updated>2003-12-13T18:30:02Z</updated>
|
21
|
+
<summary>Some text.</summary>
|
22
|
+
<ex:simple1>Simple1 Entry Value</ex:simple1>
|
23
|
+
<ex:simple2>Simple2</ex:simple2>
|
24
|
+
<ex:simple2>Simple2a</ex:simple2>
|
25
|
+
<ex2:simple1>Simple Entry Value (NS2)</ex2:simple1>
|
26
|
+
<ex3:simple3><ContinuityOfCareRecord xmlns="urn:astm-org:CCR">Simple Entry Value (NS2)</ContinuityOfCareRecord></ex3:simple3>
|
27
|
+
<category term="atom" scheme="http://example.org" label="Atom" ex:attribute="extension" />
|
28
|
+
</entry>
|
29
|
+
|
30
|
+
</feed>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:custom='http://single.custom.namespace'>
|
3
|
+
<id>https://custom.namespace/id/1</id>
|
4
|
+
<link rel='self' type='application/atom+xml' href='https://single.custom.namespace/id/1'/>
|
5
|
+
<custom:singleproperty name='foo' value='bar'/>
|
6
|
+
</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 <em>is</em> html.</content>
|
17
|
+
<updated>2003-12-13T18:30:02Z</updated>
|
18
|
+
<summary>Some text.</summary>
|
19
|
+
</entry>
|
20
|
+
|
21
|
+
</feed>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
|
3
|
+
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'>
|
4
|
+
<id>tag:blogger.com,1999:blog-3343849602113720282</id>
|
5
|
+
<updated>2008-07-26T09:01:19.322+01:00</updated>
|
6
|
+
<title type='text'>Blockstack.tv</title>
|
7
|
+
<link rel='alternate' type='text/html' href='http://blockstack.blogspot.com/'/>
|
8
|
+
</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/property.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
module Atom
|
2
|
+
module Extensions
|
3
|
+
class Property
|
4
|
+
include Atom::Xml::Parseable
|
5
|
+
|
6
|
+
namespace "http://custom.namespace"
|
7
|
+
attribute :name, :value
|
8
|
+
|
9
|
+
def initialize(name = nil, value = nil)
|
10
|
+
if name && value
|
11
|
+
initialize_with_o :name => name, :value => value
|
12
|
+
else
|
13
|
+
initialize_with_o(name) { yield if block_given? }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize_with_o(o = nil)
|
18
|
+
case o
|
19
|
+
when String, XML::Reader
|
20
|
+
parse o, :once => true
|
21
|
+
when Hash
|
22
|
+
o.each do |name,value|
|
23
|
+
self.send :"#{name}=", value
|
24
|
+
end
|
25
|
+
else
|
26
|
+
yield(self) if block_given?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright (c) 2008 The Kaphan Foundation
|
2
|
+
#
|
3
|
+
# For licensing information see LICENSE.
|
4
|
+
#
|
5
|
+
# Please visit http://www.peerworks.org/contact for further information.
|
6
|
+
#
|
7
|
+
begin
|
8
|
+
require 'spec'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rubygems'
|
11
|
+
gem 'rspec'
|
12
|
+
require 'spec'
|
13
|
+
end
|
14
|
+
|
15
|
+
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
16
|
+
require 'atom'
|
17
|
+
|
18
|
+
Spec::Runner.configure do |config|
|
19
|
+
|
20
|
+
def mock_response(klass, body, headers = {})
|
21
|
+
response = klass.new(nil, nil, nil)
|
22
|
+
response.stub!(:body).and_return(body)
|
23
|
+
|
24
|
+
headers.each do |k, v|
|
25
|
+
response.stub!(:[]).with(k).and_return(v)
|
26
|
+
end
|
27
|
+
|
28
|
+
response
|
29
|
+
end
|
30
|
+
|
31
|
+
def mock_http_get(url, response, user = nil, pass = nil)
|
32
|
+
req = mock('request')
|
33
|
+
Net::HTTP::Get.should_receive(:new).with(url.request_uri).and_return(req)
|
34
|
+
|
35
|
+
if user && pass
|
36
|
+
req.should_receive(:basic_auth).with(user, pass)
|
37
|
+
end
|
38
|
+
|
39
|
+
http = mock('http')
|
40
|
+
http.should_receive(:request).with(req).and_return(response)
|
41
|
+
Net::HTTP.should_receive(:start).with(url.host, url.port).and_yield(http)
|
42
|
+
end
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ratom-ssl
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
version: 0.0.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Peerworks
|
13
|
+
- Sean Geoghegan
|
14
|
+
- Kenton White
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2010-04-19 00:00:00 -04:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: rspec
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: libxml-ruby
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 1
|
44
|
+
- 2
|
45
|
+
version: 1.1.2
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
description: A fast Atom Syndication and Publication API based on libxml
|
49
|
+
email: jkentonwhite@gmail.com
|
50
|
+
executables: []
|
51
|
+
|
52
|
+
extensions: []
|
53
|
+
|
54
|
+
extra_rdoc_files:
|
55
|
+
- LICENSE
|
56
|
+
- README.rdoc
|
57
|
+
files:
|
58
|
+
- .gitignore
|
59
|
+
- History.txt
|
60
|
+
- LICENSE
|
61
|
+
- README.rdoc
|
62
|
+
- Rakefile
|
63
|
+
- VERSION.yml
|
64
|
+
- lib/atom.rb
|
65
|
+
- lib/atom/configuration.rb
|
66
|
+
- lib/atom/pub.rb
|
67
|
+
- lib/atom/version.rb
|
68
|
+
- lib/atom/xml/parser.rb
|
69
|
+
- ratom-ssl.gemspec
|
70
|
+
- spec/app/member_entry.atom
|
71
|
+
- spec/app/service.xml
|
72
|
+
- spec/atom/pub_spec.rb
|
73
|
+
- spec/atom_spec.rb
|
74
|
+
- spec/conformance/baseuri.atom
|
75
|
+
- spec/conformance/divtest.atom
|
76
|
+
- spec/conformance/linktests.xml
|
77
|
+
- spec/conformance/nondefaultnamespace-baseline.atom
|
78
|
+
- spec/conformance/nondefaultnamespace-xhtml.atom
|
79
|
+
- spec/conformance/nondefaultnamespace.atom
|
80
|
+
- spec/conformance/ordertest.xml
|
81
|
+
- spec/conformance/title/html-cdata.atom
|
82
|
+
- spec/conformance/title/html-entity.atom
|
83
|
+
- spec/conformance/title/html-ncr.atom
|
84
|
+
- spec/conformance/title/text-cdata.atom
|
85
|
+
- spec/conformance/title/text-entity.atom
|
86
|
+
- spec/conformance/title/text-ncr.atom
|
87
|
+
- spec/conformance/title/xhtml-entity.atom
|
88
|
+
- spec/conformance/title/xhtml-ncr.atom
|
89
|
+
- spec/conformance/unknown-namespace.atom
|
90
|
+
- spec/conformance/xmlbase.atom
|
91
|
+
- spec/fixtures/complex_single_entry.atom
|
92
|
+
- spec/fixtures/created_entry.atom
|
93
|
+
- spec/fixtures/entry.atom
|
94
|
+
- spec/fixtures/entry_with_custom_extensions.atom
|
95
|
+
- spec/fixtures/entry_with_simple_extensions.atom
|
96
|
+
- spec/fixtures/entry_with_single_custom_extension.atom
|
97
|
+
- spec/fixtures/multiple_entry.atom
|
98
|
+
- spec/fixtures/simple_single_entry.atom
|
99
|
+
- spec/fixtures/with_stylesheet.atom
|
100
|
+
- spec/paging/first_paged_feed.atom
|
101
|
+
- spec/paging/last_paged_feed.atom
|
102
|
+
- spec/paging/middle_paged_feed.atom
|
103
|
+
- spec/property.rb
|
104
|
+
- spec/spec.opts
|
105
|
+
- spec/spec_helper.rb
|
106
|
+
has_rdoc: true
|
107
|
+
homepage: http://github.com/KentonWhite/ratom-ssl
|
108
|
+
licenses: []
|
109
|
+
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options:
|
112
|
+
- --charset=UTF-8
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
version: "0"
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
version: "0"
|
129
|
+
requirements: []
|
130
|
+
|
131
|
+
rubyforge_project: ratom
|
132
|
+
rubygems_version: 1.3.6
|
133
|
+
signing_key:
|
134
|
+
specification_version: 3
|
135
|
+
summary: Atom Syndication and Publication API with SSL
|
136
|
+
test_files:
|
137
|
+
- spec/atom/pub_spec.rb
|
138
|
+
- spec/atom_spec.rb
|
139
|
+
- spec/property.rb
|
140
|
+
- spec/spec_helper.rb
|