bradgessler-birdfeed 0.1.2
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/README.txt +38 -0
- data/VERSION.yml +4 -0
- data/lib/birdfeed/feed.rb +17 -0
- data/lib/birdfeed/format/atom10.rb +45 -0
- data/lib/birdfeed/format/rss20.rb +37 -0
- data/lib/birdfeed/format.rb +27 -0
- data/lib/birdfeed/formats.rb +4 -0
- data/lib/birdfeed/item.rb +9 -0
- data/lib/birdfeed.rb +5 -0
- data/spec/fixtures/cnn_topstories.rss +99 -0
- data/spec/fixtures/flickr.atom +430 -0
- data/spec/fixtures/twitter.atom +268 -0
- data/spec/fixtures/twitter.rss +150 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/specs/bird_feed_spec.rb +4 -0
- data/spec/specs/feed_spec.rb +11 -0
- data/spec/specs/format/atom_10_spec.rb +83 -0
- data/spec/specs/format/rss_20_spec.rb +83 -0
- data/spec/specs/format_spec.rb +14 -0
- metadata +85 -0
@@ -0,0 +1,268 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
|
3
|
+
<title>Twitter / bradgessler</title>
|
4
|
+
<id>tag:twitter.com,2007:Status</id>
|
5
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler"/>
|
6
|
+
<updated>2009-01-29T20:11:53+00:00</updated>
|
7
|
+
<subtitle>Twitter updates from Brad Gessler / bradgessler.</subtitle>
|
8
|
+
<entry>
|
9
|
+
<title>bradgessler: Why doesn't ruby have a decent RSS parser lib? Looks like I get to roll my own...</title>
|
10
|
+
<content type="html">bradgessler: Why doesn't ruby have a decent RSS parser lib? Looks like I get to roll my own...</content>
|
11
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1159405159</id>
|
12
|
+
<published>2009-01-29T19:28:15+00:00</published>
|
13
|
+
<updated>2009-01-29T19:28:15+00:00</updated>
|
14
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1159405159"/>
|
15
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
16
|
+
<author>
|
17
|
+
<name>Brad Gessler</name>
|
18
|
+
<uri>http://bradgessler.com</uri>
|
19
|
+
</author>
|
20
|
+
</entry>
|
21
|
+
<entry>
|
22
|
+
<title>bradgessler: Guess what this is http://is.gd/hHu5, I'll tell you in a few hours.</title>
|
23
|
+
<content type="html">bradgessler: Guess what this is http://is.gd/hHu5, I'll tell you in a few hours.</content>
|
24
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1159102595</id>
|
25
|
+
<published>2009-01-29T17:43:57+00:00</published>
|
26
|
+
<updated>2009-01-29T17:43:57+00:00</updated>
|
27
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1159102595"/>
|
28
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
29
|
+
<author>
|
30
|
+
<name>Brad Gessler</name>
|
31
|
+
<uri>http://bradgessler.com</uri>
|
32
|
+
</author>
|
33
|
+
</entry>
|
34
|
+
<entry>
|
35
|
+
<title>bradgessler: If you're a web startup and you haven't already, put your phone number on your website! You'll learn so much.</title>
|
36
|
+
<content type="html">bradgessler: If you're a web startup and you haven't already, put your phone number on your website! You'll learn so much.</content>
|
37
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1156462457</id>
|
38
|
+
<published>2009-01-28T21:02:06+00:00</published>
|
39
|
+
<updated>2009-01-28T21:02:06+00:00</updated>
|
40
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1156462457"/>
|
41
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
42
|
+
<author>
|
43
|
+
<name>Brad Gessler</name>
|
44
|
+
<uri>http://bradgessler.com</uri>
|
45
|
+
</author>
|
46
|
+
</entry>
|
47
|
+
<entry>
|
48
|
+
<title>bradgessler: Sounds like @TechCrunch needs to be #T@chCrunch and not Michael Arrington. Institutionalize it Mike. http://is.gd/g2yH</title>
|
49
|
+
<content type="html">bradgessler: Sounds like @TechCrunch needs to be #T@chCrunch and not Michael Arrington. Institutionalize it Mike. http://is.gd/g2yH</content>
|
50
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1154910336</id>
|
51
|
+
<published>2009-01-28T11:06:55+00:00</published>
|
52
|
+
<updated>2009-01-28T11:06:55+00:00</updated>
|
53
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1154910336"/>
|
54
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
55
|
+
<author>
|
56
|
+
<name>Brad Gessler</name>
|
57
|
+
<uri>http://bradgessler.com</uri>
|
58
|
+
</author>
|
59
|
+
</entry>
|
60
|
+
<entry>
|
61
|
+
<title>bradgessler: Glad I thought, "F#@K the establishment" and got a silver XSi instead of black.</title>
|
62
|
+
<content type="html">bradgessler: Glad I thought, "F#@K the establishment" and got a silver XSi instead of black.</content>
|
63
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1154839108</id>
|
64
|
+
<published>2009-01-28T10:13:43+00:00</published>
|
65
|
+
<updated>2009-01-28T10:13:43+00:00</updated>
|
66
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1154839108"/>
|
67
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
68
|
+
<author>
|
69
|
+
<name>Brad Gessler</name>
|
70
|
+
<uri>http://bradgessler.com</uri>
|
71
|
+
</author>
|
72
|
+
</entry>
|
73
|
+
<entry>
|
74
|
+
<title>bradgessler: Canon Rebel XSi ... it came!</title>
|
75
|
+
<content type="html">bradgessler: Canon Rebel XSi ... it came!</content>
|
76
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1154823389</id>
|
77
|
+
<published>2009-01-28T10:01:34+00:00</published>
|
78
|
+
<updated>2009-01-28T10:01:34+00:00</updated>
|
79
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1154823389"/>
|
80
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
81
|
+
<author>
|
82
|
+
<name>Brad Gessler</name>
|
83
|
+
<uri>http://bradgessler.com</uri>
|
84
|
+
</author>
|
85
|
+
</entry>
|
86
|
+
<entry>
|
87
|
+
<title>bradgessler: @dcurtis should put all of his "rage" ____ (fill in the blank) on rage.dcurtis.com.</title>
|
88
|
+
<content type="html">bradgessler: @dcurtis should put all of his "rage" ____ (fill in the blank) on rage.dcurtis.com.</content>
|
89
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1154822855</id>
|
90
|
+
<published>2009-01-28T10:01:09+00:00</published>
|
91
|
+
<updated>2009-01-28T10:01:09+00:00</updated>
|
92
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1154822855"/>
|
93
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
94
|
+
<author>
|
95
|
+
<name>Brad Gessler</name>
|
96
|
+
<uri>http://bradgessler.com</uri>
|
97
|
+
</author>
|
98
|
+
</entry>
|
99
|
+
<entry>
|
100
|
+
<title>bradgessler: I have a deal for you. Every founder of Poll Everywhere has a deal for you.</title>
|
101
|
+
<content type="html">bradgessler: I have a deal for you. Every founder of Poll Everywhere has a deal for you.</content>
|
102
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1154159545</id>
|
103
|
+
<published>2009-01-28T03:11:25+00:00</published>
|
104
|
+
<updated>2009-01-28T03:11:25+00:00</updated>
|
105
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1154159545"/>
|
106
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
107
|
+
<author>
|
108
|
+
<name>Brad Gessler</name>
|
109
|
+
<uri>http://bradgessler.com</uri>
|
110
|
+
</author>
|
111
|
+
</entry>
|
112
|
+
<entry>
|
113
|
+
<title>bradgessler: Yay! Jeannette got into Berkeley!</title>
|
114
|
+
<content type="html">bradgessler: Yay! Jeannette got into Berkeley!</content>
|
115
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1153726446</id>
|
116
|
+
<published>2009-01-28T00:08:53+00:00</published>
|
117
|
+
<updated>2009-01-28T00:08:53+00:00</updated>
|
118
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1153726446"/>
|
119
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
120
|
+
<author>
|
121
|
+
<name>Brad Gessler</name>
|
122
|
+
<uri>http://bradgessler.com</uri>
|
123
|
+
</author>
|
124
|
+
</entry>
|
125
|
+
<entry>
|
126
|
+
<title>bradgessler: @teach42 Gödel, Escher, Bach http://is.gd/hsv6</title>
|
127
|
+
<content type="html">bradgessler: @teach42 Gödel, Escher, Bach http://is.gd/hsv6</content>
|
128
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1153560883</id>
|
129
|
+
<published>2009-01-27T23:03:29+00:00</published>
|
130
|
+
<updated>2009-01-27T23:03:29+00:00</updated>
|
131
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1153560883"/>
|
132
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
133
|
+
<author>
|
134
|
+
<name>Brad Gessler</name>
|
135
|
+
<uri>http://bradgessler.com</uri>
|
136
|
+
</author>
|
137
|
+
</entry>
|
138
|
+
<entry>
|
139
|
+
<title>bradgessler: @dcurtis Keep your bodily fluid releases to yourself</title>
|
140
|
+
<content type="html">bradgessler: @dcurtis Keep your bodily fluid releases to yourself</content>
|
141
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1152823072</id>
|
142
|
+
<published>2009-01-27T18:35:44+00:00</published>
|
143
|
+
<updated>2009-01-27T18:35:44+00:00</updated>
|
144
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1152823072"/>
|
145
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
146
|
+
<author>
|
147
|
+
<name>Brad Gessler</name>
|
148
|
+
<uri>http://bradgessler.com</uri>
|
149
|
+
</author>
|
150
|
+
</entry>
|
151
|
+
<entry>
|
152
|
+
<title>bradgessler: One more item taken care of for our wedding, 100 more to go.</title>
|
153
|
+
<content type="html">bradgessler: One more item taken care of for our wedding, 100 more to go.</content>
|
154
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1151605447</id>
|
155
|
+
<published>2009-01-27T09:01:58+00:00</published>
|
156
|
+
<updated>2009-01-27T09:01:58+00:00</updated>
|
157
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1151605447"/>
|
158
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
159
|
+
<author>
|
160
|
+
<name>Brad Gessler</name>
|
161
|
+
<uri>http://bradgessler.com</uri>
|
162
|
+
</author>
|
163
|
+
</entry>
|
164
|
+
<entry>
|
165
|
+
<title>bradgessler: @dcurtis If the price is right and the domain was purchased through go-daddy, hell yeah. Do they have an affiliate program?</title>
|
166
|
+
<content type="html">bradgessler: @dcurtis If the price is right and the domain was purchased through go-daddy, hell yeah. Do they have an affiliate program?</content>
|
167
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1150719326</id>
|
168
|
+
<published>2009-01-27T00:45:19+00:00</published>
|
169
|
+
<updated>2009-01-27T00:45:19+00:00</updated>
|
170
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1150719326"/>
|
171
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
172
|
+
<author>
|
173
|
+
<name>Brad Gessler</name>
|
174
|
+
<uri>http://bradgessler.com</uri>
|
175
|
+
</author>
|
176
|
+
</entry>
|
177
|
+
<entry>
|
178
|
+
<title>bradgessler: Coffee + salsa verde breakfast burrito + coffee = :-)</title>
|
179
|
+
<content type="html">bradgessler: Coffee + salsa verde breakfast burrito + coffee = :-)</content>
|
180
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1149589048</id>
|
181
|
+
<published>2009-01-26T17:29:25+00:00</published>
|
182
|
+
<updated>2009-01-26T17:29:25+00:00</updated>
|
183
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1149589048"/>
|
184
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
185
|
+
<author>
|
186
|
+
<name>Brad Gessler</name>
|
187
|
+
<uri>http://bradgessler.com</uri>
|
188
|
+
</author>
|
189
|
+
</entry>
|
190
|
+
<entry>
|
191
|
+
<title>bradgessler: Got a silver Canon XSi on the way... time to read up on photography!</title>
|
192
|
+
<content type="html">bradgessler: Got a silver Canon XSi on the way... time to read up on photography!</content>
|
193
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1149572783</id>
|
194
|
+
<published>2009-01-26T17:23:32+00:00</published>
|
195
|
+
<updated>2009-01-26T17:23:32+00:00</updated>
|
196
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1149572783"/>
|
197
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
198
|
+
<author>
|
199
|
+
<name>Brad Gessler</name>
|
200
|
+
<uri>http://bradgessler.com</uri>
|
201
|
+
</author>
|
202
|
+
</entry>
|
203
|
+
<entry>
|
204
|
+
<title>bradgessler: @tcdavis Tweet the problem (or tweet its pastie)</title>
|
205
|
+
<content type="html">bradgessler: @tcdavis Tweet the problem (or tweet its pastie)</content>
|
206
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1148014395</id>
|
207
|
+
<published>2009-01-26T02:13:25+00:00</published>
|
208
|
+
<updated>2009-01-26T02:13:25+00:00</updated>
|
209
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1148014395"/>
|
210
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
211
|
+
<author>
|
212
|
+
<name>Brad Gessler</name>
|
213
|
+
<uri>http://bradgessler.com</uri>
|
214
|
+
</author>
|
215
|
+
</entry>
|
216
|
+
<entry>
|
217
|
+
<title>bradgessler: Sat in the back of a crumb wagon to recover Sean's phone</title>
|
218
|
+
<content type="html">bradgessler: Sat in the back of a crumb wagon to recover Sean's phone</content>
|
219
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1145142181</id>
|
220
|
+
<published>2009-01-24T19:25:57+00:00</published>
|
221
|
+
<updated>2009-01-24T19:25:57+00:00</updated>
|
222
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1145142181"/>
|
223
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
224
|
+
<author>
|
225
|
+
<name>Brad Gessler</name>
|
226
|
+
<uri>http://bradgessler.com</uri>
|
227
|
+
</author>
|
228
|
+
</entry>
|
229
|
+
<entry>
|
230
|
+
<title>bradgessler: @polleverywhere @Posterous @anyvite http://twitpic.com/163yu</title>
|
231
|
+
<content type="html">bradgessler: @polleverywhere @Posterous @anyvite http://twitpic.com/163yu</content>
|
232
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1141331824</id>
|
233
|
+
<published>2009-01-23T06:31:16+00:00</published>
|
234
|
+
<updated>2009-01-23T06:31:16+00:00</updated>
|
235
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1141331824"/>
|
236
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
237
|
+
<author>
|
238
|
+
<name>Brad Gessler</name>
|
239
|
+
<uri>http://bradgessler.com</uri>
|
240
|
+
</author>
|
241
|
+
</entry>
|
242
|
+
<entry>
|
243
|
+
<title>bradgessler: http://twitpic.com/15ahs</title>
|
244
|
+
<content type="html">bradgessler: http://twitpic.com/15ahs</content>
|
245
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1134811770</id>
|
246
|
+
<published>2009-01-20T23:22:42+00:00</published>
|
247
|
+
<updated>2009-01-20T23:22:42+00:00</updated>
|
248
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1134811770"/>
|
249
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
250
|
+
<author>
|
251
|
+
<name>Brad Gessler</name>
|
252
|
+
<uri>http://bradgessler.com</uri>
|
253
|
+
</author>
|
254
|
+
</entry>
|
255
|
+
<entry>
|
256
|
+
<title>bradgessler: Murphy's Law stops NOW.</title>
|
257
|
+
<content type="html">bradgessler: Murphy's Law stops NOW.</content>
|
258
|
+
<id>tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1133145135</id>
|
259
|
+
<published>2009-01-20T13:45:04+00:00</published>
|
260
|
+
<updated>2009-01-20T13:45:04+00:00</updated>
|
261
|
+
<link type="text/html" rel="alternate" href="http://twitter.com/bradgessler/statuses/1133145135"/>
|
262
|
+
<link type="image/png" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/68736777/bgessler_normal.png"/>
|
263
|
+
<author>
|
264
|
+
<name>Brad Gessler</name>
|
265
|
+
<uri>http://bradgessler.com</uri>
|
266
|
+
</author>
|
267
|
+
</entry>
|
268
|
+
</feed>
|
@@ -0,0 +1,150 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<rss version="2.0">
|
3
|
+
<channel>
|
4
|
+
<title>Twitter / bradgessler</title>
|
5
|
+
<link>http://twitter.com/bradgessler</link>
|
6
|
+
<description>Twitter updates from Brad Gessler / bradgessler.</description>
|
7
|
+
<language>en-us</language>
|
8
|
+
<ttl>40</ttl>
|
9
|
+
<item>
|
10
|
+
<title>bradgessler: Why doesn't ruby have a decent RSS parser lib? Looks like I get to roll my own...</title>
|
11
|
+
<description>bradgessler: Why doesn't ruby have a decent RSS parser lib? Looks like I get to roll my own...</description>
|
12
|
+
<pubDate>Thu, 29 Jan 2009 19:28:15 +0000</pubDate>
|
13
|
+
<guid>http://twitter.com/bradgessler/statuses/1159405159</guid>
|
14
|
+
<link>http://twitter.com/bradgessler/statuses/1159405159</link>
|
15
|
+
</item>
|
16
|
+
<item>
|
17
|
+
<title>bradgessler: Guess what this is http://is.gd/hHu5, I'll tell you in a few hours.</title>
|
18
|
+
<description>bradgessler: Guess what this is http://is.gd/hHu5, I'll tell you in a few hours.</description>
|
19
|
+
<pubDate>Thu, 29 Jan 2009 17:43:57 +0000</pubDate>
|
20
|
+
<guid>http://twitter.com/bradgessler/statuses/1159102595</guid>
|
21
|
+
<link>http://twitter.com/bradgessler/statuses/1159102595</link>
|
22
|
+
</item>
|
23
|
+
<item>
|
24
|
+
<title>bradgessler: If you're a web startup and you haven't already, put your phone number on your website! You'll learn so much.</title>
|
25
|
+
<description>bradgessler: If you're a web startup and you haven't already, put your phone number on your website! You'll learn so much.</description>
|
26
|
+
<pubDate>Wed, 28 Jan 2009 21:02:06 +0000</pubDate>
|
27
|
+
<guid>http://twitter.com/bradgessler/statuses/1156462457</guid>
|
28
|
+
<link>http://twitter.com/bradgessler/statuses/1156462457</link>
|
29
|
+
</item>
|
30
|
+
<item>
|
31
|
+
<title>bradgessler: Sounds like @TechCrunch needs to be #T@chCrunch and not Michael Arrington. Institutionalize it Mike. http://is.gd/g2yH</title>
|
32
|
+
<description>bradgessler: Sounds like @TechCrunch needs to be #T@chCrunch and not Michael Arrington. Institutionalize it Mike. http://is.gd/g2yH</description>
|
33
|
+
<pubDate>Wed, 28 Jan 2009 11:06:55 +0000</pubDate>
|
34
|
+
<guid>http://twitter.com/bradgessler/statuses/1154910336</guid>
|
35
|
+
<link>http://twitter.com/bradgessler/statuses/1154910336</link>
|
36
|
+
</item>
|
37
|
+
<item>
|
38
|
+
<title>bradgessler: Glad I thought, "F#@K the establishment" and got a silver XSi instead of black.</title>
|
39
|
+
<description>bradgessler: Glad I thought, "F#@K the establishment" and got a silver XSi instead of black.</description>
|
40
|
+
<pubDate>Wed, 28 Jan 2009 10:13:43 +0000</pubDate>
|
41
|
+
<guid>http://twitter.com/bradgessler/statuses/1154839108</guid>
|
42
|
+
<link>http://twitter.com/bradgessler/statuses/1154839108</link>
|
43
|
+
</item>
|
44
|
+
<item>
|
45
|
+
<title>bradgessler: Canon Rebel XSi ... it came!</title>
|
46
|
+
<description>bradgessler: Canon Rebel XSi ... it came!</description>
|
47
|
+
<pubDate>Wed, 28 Jan 2009 10:01:34 +0000</pubDate>
|
48
|
+
<guid>http://twitter.com/bradgessler/statuses/1154823389</guid>
|
49
|
+
<link>http://twitter.com/bradgessler/statuses/1154823389</link>
|
50
|
+
</item>
|
51
|
+
<item>
|
52
|
+
<title>bradgessler: @dcurtis should put all of his "rage" ____ (fill in the blank) on rage.dcurtis.com.</title>
|
53
|
+
<description>bradgessler: @dcurtis should put all of his "rage" ____ (fill in the blank) on rage.dcurtis.com.</description>
|
54
|
+
<pubDate>Wed, 28 Jan 2009 10:01:09 +0000</pubDate>
|
55
|
+
<guid>http://twitter.com/bradgessler/statuses/1154822855</guid>
|
56
|
+
<link>http://twitter.com/bradgessler/statuses/1154822855</link>
|
57
|
+
</item>
|
58
|
+
<item>
|
59
|
+
<title>bradgessler: I have a deal for you. Every founder of Poll Everywhere has a deal for you.</title>
|
60
|
+
<description>bradgessler: I have a deal for you. Every founder of Poll Everywhere has a deal for you.</description>
|
61
|
+
<pubDate>Wed, 28 Jan 2009 03:11:25 +0000</pubDate>
|
62
|
+
<guid>http://twitter.com/bradgessler/statuses/1154159545</guid>
|
63
|
+
<link>http://twitter.com/bradgessler/statuses/1154159545</link>
|
64
|
+
</item>
|
65
|
+
<item>
|
66
|
+
<title>bradgessler: Yay! Jeannette got into Berkeley!</title>
|
67
|
+
<description>bradgessler: Yay! Jeannette got into Berkeley!</description>
|
68
|
+
<pubDate>Wed, 28 Jan 2009 00:08:53 +0000</pubDate>
|
69
|
+
<guid>http://twitter.com/bradgessler/statuses/1153726446</guid>
|
70
|
+
<link>http://twitter.com/bradgessler/statuses/1153726446</link>
|
71
|
+
</item>
|
72
|
+
<item>
|
73
|
+
<title>bradgessler: @teach42 Gödel, Escher, Bach http://is.gd/hsv6</title>
|
74
|
+
<description>bradgessler: @teach42 Gödel, Escher, Bach http://is.gd/hsv6</description>
|
75
|
+
<pubDate>Tue, 27 Jan 2009 23:03:29 +0000</pubDate>
|
76
|
+
<guid>http://twitter.com/bradgessler/statuses/1153560883</guid>
|
77
|
+
<link>http://twitter.com/bradgessler/statuses/1153560883</link>
|
78
|
+
</item>
|
79
|
+
<item>
|
80
|
+
<title>bradgessler: @dcurtis Keep your bodily fluid releases to yourself</title>
|
81
|
+
<description>bradgessler: @dcurtis Keep your bodily fluid releases to yourself</description>
|
82
|
+
<pubDate>Tue, 27 Jan 2009 18:35:44 +0000</pubDate>
|
83
|
+
<guid>http://twitter.com/bradgessler/statuses/1152823072</guid>
|
84
|
+
<link>http://twitter.com/bradgessler/statuses/1152823072</link>
|
85
|
+
</item>
|
86
|
+
<item>
|
87
|
+
<title>bradgessler: One more item taken care of for our wedding, 100 more to go.</title>
|
88
|
+
<description>bradgessler: One more item taken care of for our wedding, 100 more to go.</description>
|
89
|
+
<pubDate>Tue, 27 Jan 2009 09:01:58 +0000</pubDate>
|
90
|
+
<guid>http://twitter.com/bradgessler/statuses/1151605447</guid>
|
91
|
+
<link>http://twitter.com/bradgessler/statuses/1151605447</link>
|
92
|
+
</item>
|
93
|
+
<item>
|
94
|
+
<title>bradgessler: @dcurtis If the price is right and the domain was purchased through go-daddy, hell yeah. Do they have an affiliate program?</title>
|
95
|
+
<description>bradgessler: @dcurtis If the price is right and the domain was purchased through go-daddy, hell yeah. Do they have an affiliate program?</description>
|
96
|
+
<pubDate>Tue, 27 Jan 2009 00:45:19 +0000</pubDate>
|
97
|
+
<guid>http://twitter.com/bradgessler/statuses/1150719326</guid>
|
98
|
+
<link>http://twitter.com/bradgessler/statuses/1150719326</link>
|
99
|
+
</item>
|
100
|
+
<item>
|
101
|
+
<title>bradgessler: Coffee + salsa verde breakfast burrito + coffee = :-)</title>
|
102
|
+
<description>bradgessler: Coffee + salsa verde breakfast burrito + coffee = :-)</description>
|
103
|
+
<pubDate>Mon, 26 Jan 2009 17:29:25 +0000</pubDate>
|
104
|
+
<guid>http://twitter.com/bradgessler/statuses/1149589048</guid>
|
105
|
+
<link>http://twitter.com/bradgessler/statuses/1149589048</link>
|
106
|
+
</item>
|
107
|
+
<item>
|
108
|
+
<title>bradgessler: Got a silver Canon XSi on the way... time to read up on photography!</title>
|
109
|
+
<description>bradgessler: Got a silver Canon XSi on the way... time to read up on photography!</description>
|
110
|
+
<pubDate>Mon, 26 Jan 2009 17:23:32 +0000</pubDate>
|
111
|
+
<guid>http://twitter.com/bradgessler/statuses/1149572783</guid>
|
112
|
+
<link>http://twitter.com/bradgessler/statuses/1149572783</link>
|
113
|
+
</item>
|
114
|
+
<item>
|
115
|
+
<title>bradgessler: @tcdavis Tweet the problem (or tweet its pastie)</title>
|
116
|
+
<description>bradgessler: @tcdavis Tweet the problem (or tweet its pastie)</description>
|
117
|
+
<pubDate>Mon, 26 Jan 2009 02:13:25 +0000</pubDate>
|
118
|
+
<guid>http://twitter.com/bradgessler/statuses/1148014395</guid>
|
119
|
+
<link>http://twitter.com/bradgessler/statuses/1148014395</link>
|
120
|
+
</item>
|
121
|
+
<item>
|
122
|
+
<title>bradgessler: Sat in the back of a crumb wagon to recover Sean's phone</title>
|
123
|
+
<description>bradgessler: Sat in the back of a crumb wagon to recover Sean's phone</description>
|
124
|
+
<pubDate>Sat, 24 Jan 2009 19:25:57 +0000</pubDate>
|
125
|
+
<guid>http://twitter.com/bradgessler/statuses/1145142181</guid>
|
126
|
+
<link>http://twitter.com/bradgessler/statuses/1145142181</link>
|
127
|
+
</item>
|
128
|
+
<item>
|
129
|
+
<title>bradgessler: @polleverywhere @Posterous @anyvite http://twitpic.com/163yu</title>
|
130
|
+
<description>bradgessler: @polleverywhere @Posterous @anyvite http://twitpic.com/163yu</description>
|
131
|
+
<pubDate>Fri, 23 Jan 2009 06:31:16 +0000</pubDate>
|
132
|
+
<guid>http://twitter.com/bradgessler/statuses/1141331824</guid>
|
133
|
+
<link>http://twitter.com/bradgessler/statuses/1141331824</link>
|
134
|
+
</item>
|
135
|
+
<item>
|
136
|
+
<title>bradgessler: http://twitpic.com/15ahs</title>
|
137
|
+
<description>bradgessler: http://twitpic.com/15ahs</description>
|
138
|
+
<pubDate>Tue, 20 Jan 2009 23:22:42 +0000</pubDate>
|
139
|
+
<guid>http://twitter.com/bradgessler/statuses/1134811770</guid>
|
140
|
+
<link>http://twitter.com/bradgessler/statuses/1134811770</link>
|
141
|
+
</item>
|
142
|
+
<item>
|
143
|
+
<title>bradgessler: Murphy's Law stops NOW.</title>
|
144
|
+
<description>bradgessler: Murphy's Law stops NOW.</description>
|
145
|
+
<pubDate>Tue, 20 Jan 2009 13:45:04 +0000</pubDate>
|
146
|
+
<guid>http://twitter.com/bradgessler/statuses/1133145135</guid>
|
147
|
+
<link>http://twitter.com/bradgessler/statuses/1133145135</link>
|
148
|
+
</item>
|
149
|
+
</channel>
|
150
|
+
</rss>
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'spec'
|
3
|
+
require File.join(File.dirname(__FILE__), %w[.. lib birdfeed])
|
4
|
+
|
5
|
+
include BirdFeed
|
6
|
+
|
7
|
+
def feed(name,format=:rss)
|
8
|
+
name = name.to_s
|
9
|
+
unless name =~ /\.(\w+)$/ # If there's a file extension, then don't try to force a format
|
10
|
+
# Otherwise we want to read the format arg
|
11
|
+
name = "#{name}.#{format}"
|
12
|
+
end
|
13
|
+
File.read File.join(File.dirname(__FILE__), %w[fixtures], name)
|
14
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w[.. spec_helper])
|
2
|
+
|
3
|
+
describe Feed, "parse" do
|
4
|
+
it "should parse RSS 2.0" do
|
5
|
+
Feed.parse(feed(:twitter, :rss)).should be_an_instance_of(Feed)
|
6
|
+
end
|
7
|
+
|
8
|
+
it "Should parse Atom 1.0" do
|
9
|
+
Feed.parse(feed(:twitter, :atom)).should be_an_instance_of(Feed)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
|
2
|
+
|
3
|
+
describe Atom10 do
|
4
|
+
it "should be 'RSS 2.0' format" do
|
5
|
+
Atom10.format.should eql("Atom 1.0")
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
describe Atom10, "validity" do
|
10
|
+
it "should be valid if Atom 1.0" do
|
11
|
+
Atom10.should be_valid(feed(:twitter, :atom))
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should not be valid if not Atom 1.0" do
|
15
|
+
Atom10.should_not be_valid(feed(:twitter, :rss))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe Atom10, "feed parser" do
|
20
|
+
before(:each) do
|
21
|
+
@cnn = Atom10.parse(feed(:twitter, :atom))
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should parse title" do
|
25
|
+
@cnn.title.should eql('Twitter / bradgessler')
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should parse link" do
|
29
|
+
@cnn.link.should eql('http://twitter.com/bradgessler')
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should parse description" do
|
33
|
+
@cnn.description.should eql("Twitter updates from Brad Gessler / bradgessler.")
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should parse updated_at" do
|
37
|
+
@cnn.updated_at.should eql('2009-01-29T20:11:53+00:00')
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should parse items" do
|
41
|
+
@cnn.items.should_not be_empty
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should return a feed" do
|
45
|
+
@cnn.should be_a(Feed)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe Atom10, "item parser" do
|
50
|
+
before(:each) do
|
51
|
+
@item = Atom10.parse(feed(:twitter, :atom)).items.first
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should parse title" do
|
55
|
+
@item.title.should eql("bradgessler: Why doesn't ruby have a decent RSS parser lib? Looks like I get to roll my own...")
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should parse description" do
|
59
|
+
@item.description.should eql("bradgessler: Why doesn't ruby have a decent RSS parser lib? Looks like I get to roll my own...")
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should have author" do
|
63
|
+
@item.author.should eql('Brad Gessler')
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should parse link" do
|
67
|
+
@item.link.should eql('http://twitter.com/bradgessler/statuses/1159405159')
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should parse id" do
|
71
|
+
@item.id.should eql('tag:twitter.com,2007:http://twitter.com/bradgessler/statuses/1159405159')
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should have xml" do
|
75
|
+
@item.xml.should_not be_nil
|
76
|
+
@item.xml.should be_a(String)
|
77
|
+
@item.xml.should match(/^<entry>/)
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should have node" do
|
81
|
+
@item.node.should_not be_nil
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
|
2
|
+
|
3
|
+
describe Rss20 do
|
4
|
+
it "should be 'RSS 2.0' format" do
|
5
|
+
Rss20.format.should eql("RSS 2.0")
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
describe Rss20, "validity" do
|
10
|
+
it "should be valid if RSS 2.0" do
|
11
|
+
Rss20.should be_valid(feed(:twitter, :rss))
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should not be valid if not RSS 2.0" do
|
15
|
+
Rss20.should_not be_valid(feed(:twitter, :atom))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe Rss20, "feed parser" do
|
20
|
+
before(:each) do
|
21
|
+
@cnn = Rss20.parse(feed(:cnn_topstories, :rss))
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should parse title" do
|
25
|
+
@cnn.title.should eql('CNN.com')
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should parse link" do
|
29
|
+
@cnn.link.should eql('http://www.cnn.com/?eref=rss_topstories')
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should parse description" do
|
33
|
+
@cnn.description.should eql('CNN.com delivers up-to-the-minute news and information on the latest top stories, weather, entertainment, politics and more.')
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should parse updated_at" do
|
37
|
+
@cnn.updated_at.should eql('Thu, 29 Jan 2009 14:19:49 EST')
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should parse items" do
|
41
|
+
@cnn.items.should_not be_empty
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should return a feed" do
|
45
|
+
@cnn.should be_a(Feed)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe Rss20, "item parser" do
|
50
|
+
before(:each) do
|
51
|
+
@item = Rss20.parse(feed(:cnn_topstories, :rss)).items.first
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should parse title" do
|
55
|
+
@item.title.should eql("Recession lands men in 'Devil's Cave'")
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should parse description" do
|
59
|
+
@item.description.should match(/^Enter the "Devil's Cave" by pulling aside the wooden grate beneath the porch of the abandoned suburban New Jersey home/)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should have blank author" do
|
63
|
+
@item.author.should be_nil # RSS doesn't support authors ya dumby!
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should parse link" do
|
67
|
+
@item.link.should eql('http://rss.cnn.com/~r/rss/cnn_topstories/~3/wpPskrTYfzg/index.html')
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should parse id" do
|
71
|
+
@item.id.should eql('http://www.cnn.com/2009/US/01/29/porch.cave/index.html?eref=rss_topstories')
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should have xml" do
|
75
|
+
@item.xml.should_not be_nil
|
76
|
+
@item.xml.should be_a(String)
|
77
|
+
@item.xml.should match(/^<item>/)
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should have node" do
|
81
|
+
@item.node.should_not be_nil
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w[.. spec_helper])
|
2
|
+
|
3
|
+
describe Format do
|
4
|
+
end
|
5
|
+
|
6
|
+
describe Format, "parser detection" do
|
7
|
+
it "should detect RSS 2.0" do
|
8
|
+
Format.detect(feed(:twitter, :rss)).should be(BirdFeed::Rss20)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should detect Atom 1.0" do
|
12
|
+
Format.detect(feed(:twitter, :atom)).should be(BirdFeed::Atom10)
|
13
|
+
end
|
14
|
+
end
|