nokogiri-happymapper 0.6.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +64 -5
  3. data/README.md +296 -192
  4. data/lib/happymapper/anonymous_mapper.rb +46 -43
  5. data/lib/happymapper/attribute.rb +7 -5
  6. data/lib/happymapper/element.rb +19 -22
  7. data/lib/happymapper/item.rb +19 -21
  8. data/lib/happymapper/supported_types.rb +20 -28
  9. data/lib/happymapper/text_node.rb +4 -3
  10. data/lib/happymapper/version.rb +3 -1
  11. data/lib/happymapper.rb +336 -362
  12. data/lib/nokogiri-happymapper.rb +4 -0
  13. metadata +124 -105
  14. data/spec/attribute_default_value_spec.rb +0 -50
  15. data/spec/attributes_spec.rb +0 -36
  16. data/spec/fixtures/address.xml +0 -9
  17. data/spec/fixtures/ambigous_items.xml +0 -22
  18. data/spec/fixtures/analytics.xml +0 -61
  19. data/spec/fixtures/analytics_profile.xml +0 -127
  20. data/spec/fixtures/atom.xml +0 -19
  21. data/spec/fixtures/commit.xml +0 -52
  22. data/spec/fixtures/current_weather.xml +0 -89
  23. data/spec/fixtures/current_weather_missing_elements.xml +0 -18
  24. data/spec/fixtures/default_namespace_combi.xml +0 -6
  25. data/spec/fixtures/dictionary.xml +0 -20
  26. data/spec/fixtures/family_tree.xml +0 -21
  27. data/spec/fixtures/inagy.xml +0 -85
  28. data/spec/fixtures/lastfm.xml +0 -355
  29. data/spec/fixtures/multiple_namespaces.xml +0 -170
  30. data/spec/fixtures/multiple_primitives.xml +0 -5
  31. data/spec/fixtures/optional_attributes.xml +0 -6
  32. data/spec/fixtures/pita.xml +0 -133
  33. data/spec/fixtures/posts.xml +0 -23
  34. data/spec/fixtures/product_default_namespace.xml +0 -18
  35. data/spec/fixtures/product_no_namespace.xml +0 -10
  36. data/spec/fixtures/product_single_namespace.xml +0 -10
  37. data/spec/fixtures/quarters.xml +0 -19
  38. data/spec/fixtures/radar.xml +0 -21
  39. data/spec/fixtures/set_config_options.xml +0 -3
  40. data/spec/fixtures/statuses.xml +0 -422
  41. data/spec/fixtures/subclass_namespace.xml +0 -50
  42. data/spec/fixtures/unformatted_address.xml +0 -1
  43. data/spec/fixtures/wrapper.xml +0 -11
  44. data/spec/happymapper/attribute_spec.rb +0 -12
  45. data/spec/happymapper/element_spec.rb +0 -9
  46. data/spec/happymapper/item_spec.rb +0 -136
  47. data/spec/happymapper/text_node_spec.rb +0 -9
  48. data/spec/happymapper_parse_spec.rb +0 -113
  49. data/spec/happymapper_spec.rb +0 -1129
  50. data/spec/has_many_empty_array_spec.rb +0 -43
  51. data/spec/ignay_spec.rb +0 -95
  52. data/spec/inheritance_spec.rb +0 -107
  53. data/spec/mixed_namespaces_spec.rb +0 -61
  54. data/spec/parse_with_object_to_update_spec.rb +0 -111
  55. data/spec/spec_helper.rb +0 -7
  56. data/spec/to_xml_spec.rb +0 -201
  57. data/spec/to_xml_with_namespaces_spec.rb +0 -232
  58. data/spec/wilcard_tag_name_spec.rb +0 -96
  59. data/spec/wrap_spec.rb +0 -82
  60. data/spec/xpath_spec.rb +0 -89
@@ -1,422 +0,0 @@
1
- <statuses type="array">
2
- <status>
3
- <created_at>Sat Aug 09 05:38:12 +0000 2008</created_at>
4
- <id>882281424</id>
5
- <text>I so just thought the guy lighting the Olympic torch was falling when he began to run on the wall. Wow that would have been catastrophic.</text>
6
- <source>web</source>
7
- <truncated>false</truncated>
8
- <in_reply_to_status_id>1234</in_reply_to_status_id>
9
- <in_reply_to_user_id>12345</in_reply_to_user_id>
10
- <favorited></favorited>
11
- <user>
12
- <id>4243</id>
13
- <name>John Nunemaker</name>
14
- <screen_name>jnunemaker</screen_name>
15
- <location>Mishawaka, IN, US</location>
16
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
17
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
18
- <url>http://addictedtonew.com</url>
19
- <protected>false</protected>
20
- <followers_count>486</followers_count>
21
- </user>
22
- </status>
23
- <status>
24
- <created_at>Sat Aug 09 02:04:56 +0000 2008</created_at>
25
- <id>882145663</id>
26
- <text>@ijonas - wow that stuff sounds sweet</text>
27
- <source>web</source>
28
- <truncated>false</truncated>
29
- <in_reply_to_status_id>882005142</in_reply_to_status_id>
30
- <in_reply_to_user_id>1000471</in_reply_to_user_id>
31
- <favorited></favorited>
32
- <user>
33
- <id>4243</id>
34
- <name>John Nunemaker</name>
35
- <screen_name>jnunemaker</screen_name>
36
- <location>Mishawaka, IN, US</location>
37
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
38
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
39
- <url>http://addictedtonew.com</url>
40
- <protected>false</protected>
41
- <followers_count>486</followers_count>
42
- </user>
43
- </status>
44
- <status>
45
- <created_at>Sat Aug 09 01:36:41 +0000 2008</created_at>
46
- <id>882126691</id>
47
- <text>Steph is driving Sally for the first time. I'm proud of her.</text>
48
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
49
- <truncated>false</truncated>
50
- <in_reply_to_status_id></in_reply_to_status_id>
51
- <in_reply_to_user_id></in_reply_to_user_id>
52
- <favorited></favorited>
53
- <user>
54
- <id>4243</id>
55
- <name>John Nunemaker</name>
56
- <screen_name>jnunemaker</screen_name>
57
- <location>Mishawaka, IN, US</location>
58
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
59
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
60
- <url>http://addictedtonew.com</url>
61
- <protected>false</protected>
62
- <followers_count>486</followers_count>
63
- </user>
64
- </status>
65
- <status>
66
- <created_at>Fri Aug 08 22:21:21 +0000 2008</created_at>
67
- <id>881987762</id>
68
- <text>@ijonas - what are you making with couchdb, ruby and httparty?</text>
69
- <source>web</source>
70
- <truncated>false</truncated>
71
- <in_reply_to_status_id>881947237</in_reply_to_status_id>
72
- <in_reply_to_user_id>1000471</in_reply_to_user_id>
73
- <favorited></favorited>
74
- <user>
75
- <id>4243</id>
76
- <name>John Nunemaker</name>
77
- <screen_name>jnunemaker</screen_name>
78
- <location>Mishawaka, IN, US</location>
79
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
80
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
81
- <url>http://addictedtonew.com</url>
82
- <protected>false</protected>
83
- <followers_count>486</followers_count>
84
- </user>
85
- </status>
86
- <status>
87
- <created_at>Fri Aug 08 14:20:14 +0000 2008</created_at>
88
- <id>881535796</id>
89
- <text>@oaknd1 - delete it off phone and iTunes.</text>
90
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
91
- <truncated>false</truncated>
92
- <in_reply_to_status_id>881526234</in_reply_to_status_id>
93
- <in_reply_to_user_id>3038211</in_reply_to_user_id>
94
- <favorited></favorited>
95
- <user>
96
- <id>4243</id>
97
- <name>John Nunemaker</name>
98
- <screen_name>jnunemaker</screen_name>
99
- <location>Mishawaka, IN, US</location>
100
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
101
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
102
- <url>http://addictedtonew.com</url>
103
- <protected>false</protected>
104
- <followers_count>486</followers_count>
105
- </user>
106
- </status>
107
- <status>
108
- <created_at>Fri Aug 08 14:07:29 +0000 2008</created_at>
109
- <id>881522394</id>
110
- <text>Listening to U2 "beautiful day" in honor of it being such a beautiful day.</text>
111
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
112
- <truncated>false</truncated>
113
- <in_reply_to_status_id></in_reply_to_status_id>
114
- <in_reply_to_user_id></in_reply_to_user_id>
115
- <favorited></favorited>
116
- <user>
117
- <id>4243</id>
118
- <name>John Nunemaker</name>
119
- <screen_name>jnunemaker</screen_name>
120
- <location>Mishawaka, IN, US</location>
121
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
122
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
123
- <url>http://addictedtonew.com</url>
124
- <protected>false</protected>
125
- <followers_count>486</followers_count>
126
- </user>
127
- </status>
128
- <status>
129
- <created_at>Fri Aug 08 14:06:44 +0000 2008</created_at>
130
- <id>881521592</id>
131
- <text>@lizsmc1 - hi! (just passed her on the road)</text>
132
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
133
- <truncated>false</truncated>
134
- <in_reply_to_status_id>881519558</in_reply_to_status_id>
135
- <in_reply_to_user_id>11485452</in_reply_to_user_id>
136
- <favorited></favorited>
137
- <user>
138
- <id>4243</id>
139
- <name>John Nunemaker</name>
140
- <screen_name>jnunemaker</screen_name>
141
- <location>Mishawaka, IN, US</location>
142
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
143
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
144
- <url>http://addictedtonew.com</url>
145
- <protected>false</protected>
146
- <followers_count>486</followers_count>
147
- </user>
148
- </status>
149
- <status>
150
- <created_at>Fri Aug 08 13:59:35 +0000 2008</created_at>
151
- <id>881514030</id>
152
- <text>Beautiful day for a motorcycle ride.</text>
153
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
154
- <truncated>false</truncated>
155
- <in_reply_to_status_id></in_reply_to_status_id>
156
- <in_reply_to_user_id></in_reply_to_user_id>
157
- <favorited></favorited>
158
- <user>
159
- <id>4243</id>
160
- <name>John Nunemaker</name>
161
- <screen_name>jnunemaker</screen_name>
162
- <location>Mishawaka, IN, US</location>
163
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
164
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
165
- <url>http://addictedtonew.com</url>
166
- <protected>false</protected>
167
- <followers_count>486</followers_count>
168
- </user>
169
- </status>
170
- <status>
171
- <created_at>Fri Aug 08 13:45:21 +0000 2008</created_at>
172
- <id>881499439</id>
173
- <text>@lizamc1 - no way! Politos will be missed. I remember eating a whole garlic pizza there with Joe.</text>
174
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
175
- <truncated>false</truncated>
176
- <in_reply_to_status_id></in_reply_to_status_id>
177
- <in_reply_to_user_id></in_reply_to_user_id>
178
- <favorited></favorited>
179
- <user>
180
- <id>4243</id>
181
- <name>John Nunemaker</name>
182
- <screen_name>jnunemaker</screen_name>
183
- <location>Mishawaka, IN, US</location>
184
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
185
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
186
- <url>http://addictedtonew.com</url>
187
- <protected>false</protected>
188
- <followers_count>486</followers_count>
189
- </user>
190
- </status>
191
- <status>
192
- <created_at>Fri Aug 08 13:41:50 +0000 2008</created_at>
193
- <id>881496024</id>
194
- <text>Riding my motorcyle to campus. Using the library basement for a meeting.</text>
195
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
196
- <truncated>false</truncated>
197
- <in_reply_to_status_id></in_reply_to_status_id>
198
- <in_reply_to_user_id></in_reply_to_user_id>
199
- <favorited></favorited>
200
- <user>
201
- <id>4243</id>
202
- <name>John Nunemaker</name>
203
- <screen_name>jnunemaker</screen_name>
204
- <location>Mishawaka, IN, US</location>
205
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
206
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
207
- <url>http://addictedtonew.com</url>
208
- <protected>false</protected>
209
- <followers_count>486</followers_count>
210
- </user>
211
- </status>
212
- <status>
213
- <created_at>Thu Aug 07 22:52:20 +0000 2008</created_at>
214
- <id>880896190</id>
215
- <text>Scraping super glue off my finger with a knife.</text>
216
- <source>web</source>
217
- <truncated>false</truncated>
218
- <in_reply_to_status_id></in_reply_to_status_id>
219
- <in_reply_to_user_id></in_reply_to_user_id>
220
- <favorited></favorited>
221
- <user>
222
- <id>4243</id>
223
- <name>John Nunemaker</name>
224
- <screen_name>jnunemaker</screen_name>
225
- <location>Mishawaka, IN, US</location>
226
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
227
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
228
- <url>http://addictedtonew.com</url>
229
- <protected>false</protected>
230
- <followers_count>486</followers_count>
231
- </user>
232
- </status>
233
- <status>
234
- <created_at>Thu Aug 07 22:14:35 +0000 2008</created_at>
235
- <id>880866160</id>
236
- <text>So cold...Starbucks north side, you win the day, but I shall bring a sweatshirt to our next battle!</text>
237
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
238
- <truncated>false</truncated>
239
- <in_reply_to_status_id></in_reply_to_status_id>
240
- <in_reply_to_user_id></in_reply_to_user_id>
241
- <favorited></favorited>
242
- <user>
243
- <id>4243</id>
244
- <name>John Nunemaker</name>
245
- <screen_name>jnunemaker</screen_name>
246
- <location>Mishawaka, IN, US</location>
247
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
248
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
249
- <url>http://addictedtonew.com</url>
250
- <protected>false</protected>
251
- <followers_count>486</followers_count>
252
- </user>
253
- </status>
254
- <status>
255
- <created_at>Thu Aug 07 17:25:40 +0000 2008</created_at>
256
- <id>880610064</id>
257
- <text>Headed home for a bit to get my headphones and then to the north side to meet @orderedlist.</text>
258
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
259
- <truncated>false</truncated>
260
- <in_reply_to_status_id></in_reply_to_status_id>
261
- <in_reply_to_user_id></in_reply_to_user_id>
262
- <favorited></favorited>
263
- <user>
264
- <id>4243</id>
265
- <name>John Nunemaker</name>
266
- <screen_name>jnunemaker</screen_name>
267
- <location>Mishawaka, IN, US</location>
268
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
269
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
270
- <url>http://addictedtonew.com</url>
271
- <protected>false</protected>
272
- <followers_count>485</followers_count>
273
- </user>
274
- </status>
275
- <status>
276
- <created_at>Thu Aug 07 17:15:59 +0000 2008</created_at>
277
- <id>880600278</id>
278
- <text>Panera wifi, why do you hate me?</text>
279
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
280
- <truncated>false</truncated>
281
- <in_reply_to_status_id></in_reply_to_status_id>
282
- <in_reply_to_user_id></in_reply_to_user_id>
283
- <favorited></favorited>
284
- <user>
285
- <id>4243</id>
286
- <name>John Nunemaker</name>
287
- <screen_name>jnunemaker</screen_name>
288
- <location>Mishawaka, IN, US</location>
289
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
290
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
291
- <url>http://addictedtonew.com</url>
292
- <protected>false</protected>
293
- <followers_count>485</followers_count>
294
- </user>
295
- </status>
296
- <status>
297
- <created_at>Thu Aug 07 15:46:25 +0000 2008</created_at>
298
- <id>880509577</id>
299
- <text>At panera. Turned my alarm off this morning and woke up late. Oh well.</text>
300
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
301
- <truncated>false</truncated>
302
- <in_reply_to_status_id></in_reply_to_status_id>
303
- <in_reply_to_user_id></in_reply_to_user_id>
304
- <favorited></favorited>
305
- <user>
306
- <id>4243</id>
307
- <name>John Nunemaker</name>
308
- <screen_name>jnunemaker</screen_name>
309
- <location>Mishawaka, IN, US</location>
310
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
311
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
312
- <url>http://addictedtonew.com</url>
313
- <protected>false</protected>
314
- <followers_count>485</followers_count>
315
- </user>
316
- </status>
317
- <status>
318
- <created_at>Thu Aug 07 15:01:35 +0000 2008</created_at>
319
- <id>880463746</id>
320
- <text>@kloh I remember days like that. Exhausting. Also, NullRiver said to sync again, uninstall app from phone and then resync app. Evidently ...</text>
321
- <source>web</source>
322
- <truncated>true</truncated>
323
- <in_reply_to_status_id>880432701</in_reply_to_status_id>
324
- <in_reply_to_user_id>10193732</in_reply_to_user_id>
325
- <favorited></favorited>
326
- <user>
327
- <id>4243</id>
328
- <name>John Nunemaker</name>
329
- <screen_name>jnunemaker</screen_name>
330
- <location>Mishawaka, IN, US</location>
331
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
332
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
333
- <url>http://addictedtonew.com</url>
334
- <protected>false</protected>
335
- <followers_count>485</followers_count>
336
- </user>
337
- </status>
338
- <status>
339
- <created_at>Thu Aug 07 02:52:38 +0000 2008</created_at>
340
- <id>879986739</id>
341
- <text>@kloh - I haven't updated my OS so I'm wondering how apple could have made the app stop working. I did contact NullRiver support just no ...</text>
342
- <source>web</source>
343
- <truncated>true</truncated>
344
- <in_reply_to_status_id>879980813</in_reply_to_status_id>
345
- <in_reply_to_user_id>10193732</in_reply_to_user_id>
346
- <favorited></favorited>
347
- <user>
348
- <id>4243</id>
349
- <name>John Nunemaker</name>
350
- <screen_name>jnunemaker</screen_name>
351
- <location>Mishawaka, IN, US</location>
352
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
353
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
354
- <url>http://addictedtonew.com</url>
355
- <protected>false</protected>
356
- <followers_count>486</followers_count>
357
- </user>
358
- </status>
359
- <status>
360
- <created_at>Thu Aug 07 02:38:58 +0000 2008</created_at>
361
- <id>879976045</id>
362
- <text>@jerry - i went with the pdf download.</text>
363
- <source>web</source>
364
- <truncated>false</truncated>
365
- <in_reply_to_status_id>879878196</in_reply_to_status_id>
366
- <in_reply_to_user_id>613</in_reply_to_user_id>
367
- <favorited></favorited>
368
- <user>
369
- <id>4243</id>
370
- <name>John Nunemaker</name>
371
- <screen_name>jnunemaker</screen_name>
372
- <location>Mishawaka, IN, US</location>
373
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
374
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
375
- <url>http://addictedtonew.com</url>
376
- <protected>false</protected>
377
- <followers_count>486</followers_count>
378
- </user>
379
- </status>
380
- <status>
381
- <created_at>Thu Aug 07 02:31:26 +0000 2008</created_at>
382
- <id>879969851</id>
383
- <text>@kloh - it worked at home for multiple tests and just stopped when I acyltually needed it.</text>
384
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
385
- <truncated>false</truncated>
386
- <in_reply_to_status_id>879968483</in_reply_to_status_id>
387
- <in_reply_to_user_id>10193732</in_reply_to_user_id>
388
- <favorited></favorited>
389
- <user>
390
- <id>4243</id>
391
- <name>John Nunemaker</name>
392
- <screen_name>jnunemaker</screen_name>
393
- <location>Mishawaka, IN, US</location>
394
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
395
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
396
- <url>http://addictedtonew.com</url>
397
- <protected>false</protected>
398
- <followers_count>486</followers_count>
399
- </user>
400
- </status>
401
- <status>
402
- <created_at>Thu Aug 07 01:18:28 +0000 2008</created_at>
403
- <id>879913748</id>
404
- <text>Netshare will no longer start up for me. Of course it borks the first time I actually want to use it.</text>
405
- <source>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75"&gt;txt&lt;/a&gt;</source>
406
- <truncated>false</truncated>
407
- <in_reply_to_status_id></in_reply_to_status_id>
408
- <in_reply_to_user_id></in_reply_to_user_id>
409
- <favorited></favorited>
410
- <user>
411
- <id>4243</id>
412
- <name>John Nunemaker</name>
413
- <screen_name>jnunemaker</screen_name>
414
- <location>Mishawaka, IN, US</location>
415
- <description>Loves his wife, ruby, notre dame football and iu basketball</description>
416
- <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/53781608/Photo_75_normal.jpg</profile_image_url>
417
- <url>http://addictedtonew.com</url>
418
- <protected>false</protected>
419
- <followers_count>486</followers_count>
420
- </user>
421
- </status>
422
- </statuses>
@@ -1,50 +0,0 @@
1
- <article:Article xmlns:article="http://www.wetpaint.com/alfresco/article"
2
- xmlns:photo="http://www.wetpaint.com/alfresco/photo"
3
- xmlns:gallery="http://www.wetpaint.com/alfresco/gallery"
4
- xmlns:alf="http://www.alfresco.org"
5
- alf:name="title">
6
- <article:title>article title</article:title>
7
- <article:text>article text</article:text>
8
- <article:publishOptions>
9
- <article:author>Nathan</article:author>
10
- <article:draft>false</article:draft>
11
- <article:scheduledDay>2011-01-14</article:scheduledDay>
12
- <article:scheduledTime>11:31:45.0</article:scheduledTime>
13
- <article:publishDisplayDay>2011-01-14</article:publishDisplayDay>
14
- <article:publishDisplayTime>11:31:45.0</article:publishDisplayTime>
15
- <article:createdDay>2011-01-14</article:createdDay>
16
- <article:createdTime>11:52:24.0</article:createdTime>
17
- </article:publishOptions>
18
-
19
- <photo:Photo>
20
- <photo:title>photo title</photo:title>
21
- <photo:publishOptions>
22
- <photo:author>Stephanie</photo:author>
23
- <photo:draft>false</photo:draft>
24
- <photo:scheduledDay>2011-01-13</photo:scheduledDay>
25
- <photo:scheduledTime>15:47:30.0</photo:scheduledTime>
26
- <photo:publishDisplayDay>2011-01-13</photo:publishDisplayDay>
27
- <photo:publishDisplayTime>15:47:30.0</photo:publishDisplayTime>
28
- <photo:createdDay>2011-01-13</photo:createdDay>
29
- <photo:createdTime>15:51:47.0</photo:createdTime>
30
- </photo:publishOptions>
31
- </photo:Photo>
32
-
33
- <gallery:Gallery>
34
- <gallery:title>gallery title</gallery:title>
35
- <photo:Photo>
36
- <photo:title>photo title</photo:title>
37
- <photo:publishOptions>
38
- <photo:author>Stephanie</photo:author>
39
- <photo:draft>false</photo:draft>
40
- <photo:scheduledDay>2011-01-13</photo:scheduledDay>
41
- <photo:scheduledTime>15:47:30.0</photo:scheduledTime>
42
- <photo:publishDisplayDay>2011-01-13</photo:publishDisplayDay>
43
- <photo:publishDisplayTime>15:47:30.0</photo:publishDisplayTime>
44
- <photo:createdDay>2011-01-13</photo:createdDay>
45
- <photo:createdTime>15:51:47.0</photo:createdTime>
46
- </photo:publishOptions>
47
- </photo:Photo>
48
- </gallery:Gallery>
49
-
50
- </article:Article>
@@ -1 +0,0 @@
1
- <address><street>Milchstrasse</street><housenumber>23</housenumber></address>
@@ -1,11 +0,0 @@
1
- <root attr1="somevalue">
2
- <name>myname</name>
3
- <mywraptag>
4
- <description>some description</description>
5
- <subclass myattr='attrvalue'>
6
- <item>item1</item>
7
- <item>item2</item>
8
- </subclass>
9
- </mywraptag>
10
- <number>12345</number>
11
- </root>
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe HappyMapper::Attribute do
4
-
5
- describe "initialization" do
6
- it 'accepts :default option' do
7
- attr = described_class.new(:foo, String, :default => 'foobar')
8
- expect(attr.default).to eq('foobar')
9
- end
10
- end
11
-
12
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe HappyMapper::Element do
4
- describe "initialization" do
5
- before do
6
- @attr = HappyMapper::Element.new(:foo, String)
7
- end
8
- end
9
- end
@@ -1,136 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Foo
4
- class Bar; end
5
- end
6
-
7
- describe HappyMapper::Item do
8
-
9
- describe "new instance" do
10
- before do
11
- @item = HappyMapper::Item.new(:foo, String, :tag => 'foobar')
12
- end
13
-
14
- it "should accept a name" do
15
- expect(@item.name).to eq('foo')
16
- end
17
-
18
- it 'should accept a type' do
19
- expect(@item.type).to eq(String)
20
- end
21
-
22
- it 'should accept :tag as an option' do
23
- expect(@item.tag).to eq('foobar')
24
- end
25
-
26
- it "should have a method_name" do
27
- expect(@item.method_name).to eq('foo')
28
- end
29
- end
30
-
31
- describe "#constant" do
32
- it "should just use type if constant" do
33
- item = HappyMapper::Item.new(:foo, String)
34
- expect(item.constant).to eq(String)
35
- end
36
-
37
- it "should convert string type to constant" do
38
- item = HappyMapper::Item.new(:foo, 'String')
39
- expect(item.constant).to eq(String)
40
- end
41
-
42
- it "should convert string with :: to constant" do
43
- item = HappyMapper::Item.new(:foo, 'Foo::Bar')
44
- expect(item.constant).to eq(Foo::Bar)
45
- end
46
- end
47
-
48
- describe "#method_name" do
49
- it "should convert dashes to underscores" do
50
- item = HappyMapper::Item.new(:'foo-bar', String, :tag => 'foobar')
51
- expect(item.method_name).to eq('foo_bar')
52
- end
53
- end
54
-
55
- describe "#xpath" do
56
- it "should default to tag" do
57
- item = HappyMapper::Item.new(:foo, String, :tag => 'foobar')
58
- expect(item.xpath).to eq('foobar')
59
- end
60
-
61
- it "should prepend with .// if options[:deep] true" do
62
- item = HappyMapper::Item.new(:foo, String, :tag => 'foobar', :deep => true)
63
- expect(item.xpath).to eq('.//foobar')
64
- end
65
-
66
- it "should prepend namespace if namespace exists" do
67
- item = HappyMapper::Item.new(:foo, String, :tag => 'foobar')
68
- item.namespace = 'v2'
69
- expect(item.xpath).to eq('v2:foobar')
70
- end
71
- end
72
-
73
- describe "typecasting" do
74
- it "should work with Strings" do
75
- item = HappyMapper::Item.new(:foo, String)
76
- [21, '21'].each do |a|
77
- expect(item.typecast(a)).to eq('21')
78
- end
79
- end
80
-
81
- it "should work with Integers" do
82
- item = HappyMapper::Item.new(:foo, Integer)
83
- [21, 21.0, '21'].each do |a|
84
- expect(item.typecast(a)).to eq(21)
85
- end
86
- end
87
-
88
- it "should work with Floats" do
89
- item = HappyMapper::Item.new(:foo, Float)
90
- [21, 21.0, '21'].each do |a|
91
- expect(item.typecast(a)).to eq(21.0)
92
- end
93
- end
94
-
95
- it "should work with Times" do
96
- item = HappyMapper::Item.new(:foo, Time)
97
- expect(item.typecast('2000-01-01 01:01:01.123456')).to eq(Time.local(2000, 1, 1, 1, 1, 1, 123456))
98
- end
99
-
100
- it "should work with Dates" do
101
- item = HappyMapper::Item.new(:foo, Date)
102
- expect(item.typecast('2000-01-01')).to eq(Date.new(2000, 1, 1))
103
- end
104
-
105
- it "should handle nil Dates" do
106
- item = HappyMapper::Item.new(:foo, Date)
107
- expect(item.typecast(nil)).to eq(nil)
108
- end
109
-
110
- it "should handle empty string Dates" do
111
- item = HappyMapper::Item.new(:foo, Date)
112
- expect(item.typecast("")).to eq(nil)
113
- end
114
-
115
- it "should work with DateTimes" do
116
- item = HappyMapper::Item.new(:foo, DateTime)
117
- expect(item.typecast('2000-01-01 00:00:00')).to eq(DateTime.new(2000, 1, 1, 0, 0, 0))
118
- end
119
-
120
- it "should handle nil DateTimes" do
121
- item = HappyMapper::Item.new(:foo, DateTime)
122
- expect(item.typecast(nil)).to eq(nil)
123
- end
124
-
125
- it "should handle empty string DateTimes" do
126
- item = HappyMapper::Item.new(:foo, DateTime)
127
- expect(item.typecast("")).to eq(nil)
128
- end
129
-
130
-
131
- it "should work with Boolean" do
132
- item = HappyMapper::Item.new(:foo, HappyMapper::Boolean)
133
- expect(item.typecast('false')).to eq(false)
134
- end
135
- end
136
- end
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe HappyMapper::Attribute do
4
- describe "initialization" do
5
- before do
6
- @attr = HappyMapper::TextNode.new(:foo, String)
7
- end
8
- end
9
- end