feedjira 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +8 -0
  4. data/.travis.yml +31 -12
  5. data/CHANGELOG.md +15 -1
  6. data/Dangerfile +1 -0
  7. data/Gemfile +2 -1
  8. data/Rakefile +6 -1
  9. data/feedjira.gemspec +16 -14
  10. data/fixtures/vcr_cassettes/fetch_failure.yml +62 -0
  11. data/fixtures/vcr_cassettes/parse_error.yml +222 -0
  12. data/fixtures/vcr_cassettes/success.yml +281 -0
  13. data/lib/feedjira.rb +9 -0
  14. data/lib/feedjira/core_ext.rb +3 -3
  15. data/lib/feedjira/core_ext/date.rb +2 -1
  16. data/lib/feedjira/core_ext/string.rb +1 -1
  17. data/lib/feedjira/core_ext/time.rb +19 -16
  18. data/lib/feedjira/date_time_utilities.rb +24 -0
  19. data/lib/feedjira/date_time_utilities/date_time_language_parser.rb +22 -0
  20. data/lib/feedjira/date_time_utilities/date_time_pattern_parser.rb +29 -0
  21. data/lib/feedjira/feed.rb +27 -18
  22. data/lib/feedjira/feed_entry_utilities.rb +15 -17
  23. data/lib/feedjira/feed_utilities.rb +26 -21
  24. data/lib/feedjira/parser/atom.rb +9 -8
  25. data/lib/feedjira/parser/atom_entry.rb +10 -13
  26. data/lib/feedjira/parser/atom_feed_burner.rb +8 -10
  27. data/lib/feedjira/parser/atom_feed_burner_entry.rb +11 -14
  28. data/lib/feedjira/parser/atom_youtube.rb +20 -0
  29. data/lib/feedjira/parser/atom_youtube_entry.rb +29 -0
  30. data/lib/feedjira/parser/google_docs_atom.rb +6 -6
  31. data/lib/feedjira/parser/google_docs_atom_entry.rb +11 -11
  32. data/lib/feedjira/parser/itunes_rss.rb +39 -22
  33. data/lib/feedjira/parser/itunes_rss_category.rb +38 -0
  34. data/lib/feedjira/parser/itunes_rss_item.rb +28 -20
  35. data/lib/feedjira/parser/itunes_rss_owner.rb +3 -4
  36. data/lib/feedjira/parser/podlove_chapter.rb +20 -0
  37. data/lib/feedjira/parser/rss.rb +10 -8
  38. data/lib/feedjira/parser/rss_entry.rb +17 -21
  39. data/lib/feedjira/parser/rss_feed_burner.rb +4 -6
  40. data/lib/feedjira/parser/rss_feed_burner_entry.rb +23 -28
  41. data/lib/feedjira/parser/rss_image.rb +15 -0
  42. data/lib/feedjira/preprocessor.rb +2 -2
  43. data/lib/feedjira/version.rb +1 -1
  44. data/spec/feedjira/date_time_utilities_spec.rb +41 -0
  45. data/spec/feedjira/feed_entry_utilities_spec.rb +23 -19
  46. data/spec/feedjira/feed_spec.rb +109 -74
  47. data/spec/feedjira/feed_utilities_spec.rb +65 -63
  48. data/spec/feedjira/parser/atom_entry_spec.rb +54 -34
  49. data/spec/feedjira/parser/atom_feed_burner_entry_spec.rb +27 -20
  50. data/spec/feedjira/parser/atom_feed_burner_spec.rb +32 -30
  51. data/spec/feedjira/parser/atom_spec.rb +50 -48
  52. data/spec/feedjira/parser/atom_youtube_entry_spec.rb +86 -0
  53. data/spec/feedjira/parser/atom_youtube_spec.rb +43 -0
  54. data/spec/feedjira/parser/google_docs_atom_entry_spec.rb +5 -4
  55. data/spec/feedjira/parser/google_docs_atom_spec.rb +6 -6
  56. data/spec/feedjira/parser/itunes_rss_item_spec.rb +33 -29
  57. data/spec/feedjira/parser/itunes_rss_owner_spec.rb +10 -9
  58. data/spec/feedjira/parser/itunes_rss_spec.rb +83 -30
  59. data/spec/feedjira/parser/podlove_chapter_spec.rb +37 -0
  60. data/spec/feedjira/parser/rss_entry_spec.rb +50 -33
  61. data/spec/feedjira/parser/rss_feed_burner_entry_spec.rb +55 -33
  62. data/spec/feedjira/parser/rss_feed_burner_spec.rb +31 -26
  63. data/spec/feedjira/parser/rss_spec.rb +56 -24
  64. data/spec/feedjira/preprocessor_spec.rb +11 -3
  65. data/spec/sample_feeds.rb +29 -21
  66. data/spec/sample_feeds/AmazonWebServicesBlog.xml +797 -797
  67. data/spec/sample_feeds/AtomEscapedHTMLInPreTag.xml +13 -0
  68. data/spec/sample_feeds/CRE.xml +5849 -0
  69. data/spec/sample_feeds/FeedBurnerXHTML.xml +400 -400
  70. data/spec/sample_feeds/ITunesWithSingleQuotedAttributes.xml +67 -0
  71. data/spec/sample_feeds/PaulDixExplainsNothing.xml +175 -175
  72. data/spec/sample_feeds/PaulDixExplainsNothingAlternate.xml +175 -175
  73. data/spec/sample_feeds/PaulDixExplainsNothingFirstEntryContent.xml +16 -16
  74. data/spec/sample_feeds/PaulDixExplainsNothingWFW.xml +174 -174
  75. data/spec/sample_feeds/TenderLovemaking.xml +12 -2
  76. data/spec/sample_feeds/TrotterCashionHome.xml +611 -611
  77. data/spec/sample_feeds/TypePadNews.xml +368 -368
  78. data/spec/sample_feeds/itunes.xml +18 -2
  79. data/spec/sample_feeds/pet_atom.xml +229 -229
  80. data/spec/sample_feeds/youtube_atom.xml +395 -0
  81. data/spec/spec_helper.rb +6 -0
  82. metadata +112 -27
@@ -0,0 +1,395 @@
1
+
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <feed xmlns:yt="http://www.youtube.com/xml/schemas/2015" xmlns:media="http://search.yahoo.com/mrss/" xmlns="http://www.w3.org/2005/Atom">
4
+ <link rel="self" href="http://www.youtube.com/feeds/videos.xml?user=google"/>
5
+ <id>yt:channel:UCK8sQmJBp8GCxrOtXWBpyEA</id>
6
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
7
+ <title>Google</title>
8
+ <link rel="alternate" href="http://www.youtube.com/user/Google"/>
9
+ <author>
10
+ <name>Google Author</name>
11
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
12
+ </author>
13
+ <published>2005-09-18T22:37:10+00:00</published>
14
+ <updated>2015-05-04T00:01:27+00:00</updated>
15
+ <entry>
16
+ <id>yt:video:5shykyfmb28</id>
17
+ <yt:videoId>5shykyfmb28</yt:videoId>
18
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
19
+ <title>The Google app: Questions Title</title>
20
+ <link rel="alternate" href="http://www.youtube.com/watch?v=5shykyfmb28"/>
21
+ <author>
22
+ <name>Google</name>
23
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
24
+ </author>
25
+ <published>2015-05-04T00:01:27+00:00</published>
26
+ <updated>2015-05-13T17:38:30+00:00</updated>
27
+ <media:group>
28
+ <media:title>The Google app: Questions</media:title>
29
+ <media:content url="https://www.youtube.com/v/5shykyfmb28?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
30
+ <media:thumbnail url="https://i2.ytimg.com/vi/5shykyfmb28/hqdefault.jpg" width="480" height="360"/>
31
+ <media:description>A question is the most powerful force in the world. It can start you on an adventure or spark a connection. See where a question can take you. The Google app is available on iOS and Android. Download the app here: http://www.google.com/search/about/download</media:description>
32
+ <media:community>
33
+ <media:starRating count="3546" average="4.79" min="1" max="5"/>
34
+ <media:statistics views="251497"/>
35
+ </media:community>
36
+ </media:group>
37
+ </entry>
38
+ <entry>
39
+ <id>yt:video:xfFHnBQ6nQg</id>
40
+ <yt:videoId>xfFHnBQ6nQg</yt:videoId>
41
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
42
+ <title>Project Fi: Innovating in connectivity and communication</title>
43
+ <link rel="alternate" href="http://www.youtube.com/watch?v=xfFHnBQ6nQg"/>
44
+ <author>
45
+ <name>Google</name>
46
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
47
+ </author>
48
+ <published>2015-04-23T15:29:38+00:00</published>
49
+ <updated>2015-05-13T18:32:00+00:00</updated>
50
+ <media:group>
51
+ <media:title>Project Fi: Innovating in connectivity and communication</media:title>
52
+ <media:content url="https://www.youtube.com/v/xfFHnBQ6nQg?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
53
+ <media:thumbnail url="https://i1.ytimg.com/vi/xfFHnBQ6nQg/hqdefault.jpg" width="480" height="360"/>
54
+ <media:description>A behind-the-scenes look at Project Fi. Find out more at fi.google.com.</media:description>
55
+ <media:community>
56
+ <media:starRating count="3915" average="4.77" min="1" max="5"/>
57
+ <media:statistics views="498948"/>
58
+ </media:community>
59
+ </media:group>
60
+ </entry>
61
+ <entry>
62
+ <id>yt:video:faacIELjUeI</id>
63
+ <yt:videoId>faacIELjUeI</yt:videoId>
64
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
65
+ <title>Project Fi: A new way to say hello</title>
66
+ <link rel="alternate" href="http://www.youtube.com/watch?v=faacIELjUeI"/>
67
+ <author>
68
+ <name>Google</name>
69
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
70
+ </author>
71
+ <published>2015-04-23T15:29:11+00:00</published>
72
+ <updated>2015-05-13T17:51:58+00:00</updated>
73
+ <media:group>
74
+ <media:title>Project Fi: A new way to say hello</media:title>
75
+ <media:content url="https://www.youtube.com/v/faacIELjUeI?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
76
+ <media:thumbnail url="https://i3.ytimg.com/vi/faacIELjUeI/hqdefault.jpg" width="480" height="360"/>
77
+ <media:description>Introducing Project Fi, a new way to say hello. Find out more at fi.google.com.</media:description>
78
+ <media:community>
79
+ <media:starRating count="2963" average="4.83" min="1" max="5"/>
80
+ <media:statistics views="204324"/>
81
+ </media:community>
82
+ </media:group>
83
+ </entry>
84
+ <entry>
85
+ <id>yt:video:hydLZJXG3Tk</id>
86
+ <yt:videoId>hydLZJXG3Tk</yt:videoId>
87
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
88
+ <title>Smartbox by Inbox: the mailbox of tomorrow, today</title>
89
+ <link rel="alternate" href="http://www.youtube.com/watch?v=hydLZJXG3Tk"/>
90
+ <author>
91
+ <name>Google</name>
92
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
93
+ </author>
94
+ <published>2015-04-01T01:00:28+00:00</published>
95
+ <updated>2015-05-13T17:41:04+00:00</updated>
96
+ <media:group>
97
+ <media:title>Smartbox by Inbox: the mailbox of tomorrow, today</media:title>
98
+ <media:content url="https://www.youtube.com/v/hydLZJXG3Tk?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
99
+ <media:thumbnail url="https://i1.ytimg.com/vi/hydLZJXG3Tk/hqdefault.jpg" width="480" height="360"/>
100
+ <media:description>We’re excited to introduce Smartbox—a better, smarter mailbox that fuses physical mail with everything you love about the electronic kind.
101
+
102
+ Smartbox isn't real. But Inbox by Gmail is. Email inbox@google.com from an @gmail.com address to request an invite.
103
+
104
+ https://www.google.com/inbox</media:description>
105
+ <media:community>
106
+ <media:starRating count="13463" average="4.75" min="1" max="5"/>
107
+ <media:statistics views="1376473"/>
108
+ </media:community>
109
+ </media:group>
110
+ </entry>
111
+ <entry>
112
+ <id>yt:video:1lxNpMHhJFA</id>
113
+ <yt:videoId>1lxNpMHhJFA</yt:videoId>
114
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
115
+ <title>The Google app: Windy</title>
116
+ <link rel="alternate" href="http://www.youtube.com/watch?v=1lxNpMHhJFA"/>
117
+ <author>
118
+ <name>Google</name>
119
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
120
+ </author>
121
+ <published>2015-03-18T19:27:58+00:00</published>
122
+ <updated>2015-05-13T06:50:30+00:00</updated>
123
+ <media:group>
124
+ <media:title>The Google app: Windy</media:title>
125
+ <media:content url="https://www.youtube.com/v/1lxNpMHhJFA?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
126
+ <media:thumbnail url="https://i2.ytimg.com/vi/1lxNpMHhJFA/hqdefault.jpg" width="480" height="360"/>
127
+ <media:description>“Ok Google, how windy is it right now?”
128
+ Talk to Google to get answers, find stuff nearby, and get things done. The Google app. Available on iOS and Android. Go to g.co/googleapp on your mobile browser to download.</media:description>
129
+ <media:community>
130
+ <media:starRating count="2211" average="4.42" min="1" max="5"/>
131
+ <media:statistics views="204663"/>
132
+ </media:community>
133
+ </media:group>
134
+ </entry>
135
+ <entry>
136
+ <id>yt:video:PRU2ShMzQRg</id>
137
+ <yt:videoId>PRU2ShMzQRg</yt:videoId>
138
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
139
+ <title>Building Bridges with Pope Francis and Students Over the Web</title>
140
+ <link rel="alternate" href="http://www.youtube.com/watch?v=PRU2ShMzQRg"/>
141
+ <author>
142
+ <name>Google</name>
143
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
144
+ </author>
145
+ <published>2015-03-12T16:33:46+00:00</published>
146
+ <updated>2015-05-13T13:58:33+00:00</updated>
147
+ <media:group>
148
+ <media:title>Building Bridges with Pope Francis and Students Over the Web</media:title>
149
+ <media:content url="https://www.youtube.com/v/PRU2ShMzQRg?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
150
+ <media:thumbnail url="https://i1.ytimg.com/vi/PRU2ShMzQRg/hqdefault.jpg" width="480" height="360"/>
151
+ <media:description>On February 5th, Pope Francis hosted a Google+ Hangout on how technology can help improve the education of students with disabilities. In the Hangout, which was led by Scholas Occurrentes, The Pope was joined by students from around the world including India, Spain, Brazil, and the United States.
152
+
153
+ Watch the full Hangout here: http://goo.gl/f3ZpkD</media:description>
154
+ <media:community>
155
+ <media:starRating count="3187" average="4.22" min="1" max="5"/>
156
+ <media:statistics views="914420"/>
157
+ </media:community>
158
+ </media:group>
159
+ </entry>
160
+ <entry>
161
+ <id>yt:video:t4vkQAByALc</id>
162
+ <yt:videoId>t4vkQAByALc</yt:videoId>
163
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
164
+ <title>Introducing Google Calendar for iPhone</title>
165
+ <link rel="alternate" href="http://www.youtube.com/watch?v=t4vkQAByALc"/>
166
+ <author>
167
+ <name>Google</name>
168
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
169
+ </author>
170
+ <published>2015-03-10T17:26:23+00:00</published>
171
+ <updated>2015-05-13T07:37:22+00:00</updated>
172
+ <media:group>
173
+ <media:title>Introducing Google Calendar for iPhone</media:title>
174
+ <media:content url="https://www.youtube.com/v/t4vkQAByALc?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
175
+ <media:thumbnail url="https://i1.ytimg.com/vi/t4vkQAByALc/hqdefault.jpg" width="480" height="360"/>
176
+ <media:description>Meet Google Calendar for iPhone. It’s designed to be a helpful assistant, so you can spend less time managing your day, and more time enjoying it.
177
+
178
+ Learn more at http://g.co/calendar</media:description>
179
+ <media:community>
180
+ <media:starRating count="3294" average="4.14" min="1" max="5"/>
181
+ <media:statistics views="915335"/>
182
+ </media:community>
183
+ </media:group>
184
+ </entry>
185
+ <entry>
186
+ <id>yt:video:C57obdJnxQo</id>
187
+ <yt:videoId>C57obdJnxQo</yt:videoId>
188
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
189
+ <title>Student Becomes Teacher - Google Compare</title>
190
+ <link rel="alternate" href="http://www.youtube.com/watch?v=C57obdJnxQo"/>
191
+ <author>
192
+ <name>Google</name>
193
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
194
+ </author>
195
+ <published>2015-03-05T18:10:24+00:00</published>
196
+ <updated>2015-05-13T15:44:10+00:00</updated>
197
+ <media:group>
198
+ <media:title>Student Becomes Teacher - Google Compare</media:title>
199
+ <media:content url="https://www.youtube.com/v/C57obdJnxQo?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
200
+ <media:thumbnail url="https://i4.ytimg.com/vi/C57obdJnxQo/hqdefault.jpg" width="480" height="360"/>
201
+ <media:description>When two generations come together, each learns something from the other. In this heartfelt story, when grandpa and granddaughter spend time together fixing up an old classic car they both learn something new. The lesson for all of us is to spend less time online and more time on the road; spend less time looking for car insurance and more time doing the things you like with the people you love, with help from Google Compare.
202
+
203
+ See how you can compare multiple car insurance quotes easily on your mobile, desktop, or tablet at www.google.com/compare</media:description>
204
+ <media:community>
205
+ <media:starRating count="1348" average="4.66" min="1" max="5"/>
206
+ <media:statistics views="86705"/>
207
+ </media:community>
208
+ </media:group>
209
+ </entry>
210
+ <entry>
211
+ <id>yt:video:z3v4rIG8kQA</id>
212
+ <yt:videoId>z3v4rIG8kQA</yt:videoId>
213
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
214
+ <title>Google's Proposal for North Bayshore</title>
215
+ <link rel="alternate" href="http://www.youtube.com/watch?v=z3v4rIG8kQA"/>
216
+ <author>
217
+ <name>Google</name>
218
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
219
+ </author>
220
+ <published>2015-02-27T18:54:22+00:00</published>
221
+ <updated>2015-05-13T18:43:42+00:00</updated>
222
+ <media:group>
223
+ <media:title>Google's Proposal for North Bayshore</media:title>
224
+ <media:content url="https://www.youtube.com/v/z3v4rIG8kQA?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
225
+ <media:thumbnail url="https://i3.ytimg.com/vi/z3v4rIG8kQA/hqdefault.jpg" width="480" height="360"/>
226
+ <media:description>Vice President of Real Estate Dave Radcliffe and architects Thomas Heatherwick and Bjarke Ingels discuss our proposed Master Plan for our new campus in Mountain View, California. With our proposal, our focus is on creating space for people, nature and ideas to thrive.</media:description>
227
+ <media:community>
228
+ <media:starRating count="8893" average="4.75" min="1" max="5"/>
229
+ <media:statistics views="1180615"/>
230
+ </media:community>
231
+ </media:group>
232
+ </entry>
233
+ <entry>
234
+ <id>yt:video:RyRbsmmRKnE</id>
235
+ <yt:videoId>RyRbsmmRKnE</yt:videoId>
236
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
237
+ <title>HolaGoogle: Soy Kary on Google+ Photos</title>
238
+ <link rel="alternate" href="http://www.youtube.com/watch?v=RyRbsmmRKnE"/>
239
+ <author>
240
+ <name>Google</name>
241
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
242
+ </author>
243
+ <published>2015-02-02T22:15:17+00:00</published>
244
+ <updated>2015-05-13T03:00:34+00:00</updated>
245
+ <media:group>
246
+ <media:title>HolaGoogle: Soy Kary on Google+ Photos</media:title>
247
+ <media:content url="https://www.youtube.com/v/RyRbsmmRKnE?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
248
+ <media:thumbnail url="https://i3.ytimg.com/vi/RyRbsmmRKnE/hqdefault.jpg" width="480" height="360"/>
249
+ <media:description>Kary Pérez chose travel over the traditional quinceañera. From monuments in Istanbul to cafes in Madrid, Kary's story continues as she explores the world around her. Learn how she uses Google+ Photos.
250
+
251
+ Kary’s story is featured on Holagoogle.soy, which aims to bring the best of Google to the Hispanic community in a culturally relevant way. The site highlights our users and the cool things they are doing with Google products. Visit holagoogle.soy to discover other Latinos doing cool things with Google products and share your own story.</media:description>
252
+ <media:community>
253
+ <media:starRating count="1438" average="4.37" min="1" max="5"/>
254
+ <media:statistics views="91894"/>
255
+ </media:community>
256
+ </media:group>
257
+ </entry>
258
+ <entry>
259
+ <id>yt:video:DVwHCGAr_OE</id>
260
+ <yt:videoId>DVwHCGAr_OE</yt:videoId>
261
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
262
+ <title>Google - Year in Search 2014</title>
263
+ <link rel="alternate" href="http://www.youtube.com/watch?v=DVwHCGAr_OE"/>
264
+ <author>
265
+ <name>Google</name>
266
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
267
+ </author>
268
+ <published>2014-12-16T06:57:19+00:00</published>
269
+ <updated>2015-05-13T16:44:47+00:00</updated>
270
+ <media:group>
271
+ <media:title>Google - Year in Search 2014</media:title>
272
+ <media:content url="https://www.youtube.com/v/DVwHCGAr_OE?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
273
+ <media:thumbnail url="https://i1.ytimg.com/vi/DVwHCGAr_OE/hqdefault.jpg" width="480" height="360"/>
274
+ <media:description>In 2014 we searched trillions of times. What do these searches say about us? Explore the Year in Search http://www.google.com/2014 and follow the conversation on #YearInSearch
275
+
276
+ Watch past Year in Search videos: http://goo.gl/LXA4nQ
277
+
278
+ Soundtrack is ‘Divinity’, by Porter Robinson
279
+ Porter Robinon's new album 'Worlds' is available on Google Play: http://goo.gl/q6ljz4
280
+
281
+ Nicky Minaj's new album 'The Pinkprint' is available on Google Play: http://goo.gl/utOZxd
282
+ HBO’s Game of Thrones is available on Google Play (not all countries are eligible): http://goo.gl/xOgofr
283
+
284
+ Credits:
285
+ Two people hugging: Dida Mulder
286
+ Boy with 3D Printed hand: E-NABLE/RIT University News/RIT MAGIC Center
287
+ Ebola doctors and patients: Plan International
288
+ Perth passenger train footage: vision courtesy of the Public Transport Authority of Western Australia
289
+ Malala Yousafzai collecting the Nobel Peace Prize: Nobel Media AB
290
+ Bill Nye's voice over: Big Think. Original video: http://goo.gl/aK9yDI
291
+ Follow Big Think on YouTube: http://goo.gl/CPTsV5</media:description>
292
+ <media:community>
293
+ <media:starRating count="101801" average="4.68" min="1" max="5"/>
294
+ <media:statistics views="32470726"/>
295
+ </media:community>
296
+ </media:group>
297
+ </entry>
298
+ <entry>
299
+ <id>yt:video:8IP7Y5B2-Io</id>
300
+ <yt:videoId>8IP7Y5B2-Io</yt:videoId>
301
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
302
+ <title>.SOY, un dominio para Latinos</title>
303
+ <link rel="alternate" href="http://www.youtube.com/watch?v=8IP7Y5B2-Io"/>
304
+ <author>
305
+ <name>Google</name>
306
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
307
+ </author>
308
+ <published>2014-12-04T01:35:21+00:00</published>
309
+ <updated>2015-05-13T15:11:37+00:00</updated>
310
+ <media:group>
311
+ <media:title>.SOY, un dominio para Latinos</media:title>
312
+ <media:content url="https://www.youtube.com/v/8IP7Y5B2-Io?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
313
+ <media:thumbnail url="https://i1.ytimg.com/vi/8IP7Y5B2-Io/hqdefault.jpg" width="480" height="360"/>
314
+ <media:description>Presentando .SOY, un nuevo dominio para la comunidad latina. La web está creciendo y .SOY es una manera nueva para expresarte en línea. Para tu sitio web para tu arte, tu negocio o tus ideas -- utiliza .SOY. Visita iam.soy para conseguir tu propio dominio hoy mismo.</media:description>
315
+ <media:community>
316
+ <media:starRating count="1522" average="3.90" min="1" max="5"/>
317
+ <media:statistics views="226952"/>
318
+ </media:community>
319
+ </media:group>
320
+ </entry>
321
+ <entry>
322
+ <id>yt:video:ayFAQ2OoJaA</id>
323
+ <yt:videoId>ayFAQ2OoJaA</yt:videoId>
324
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
325
+ <title>Meet your new Inbox</title>
326
+ <link rel="alternate" href="http://www.youtube.com/watch?v=ayFAQ2OoJaA"/>
327
+ <author>
328
+ <name>Google</name>
329
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
330
+ </author>
331
+ <published>2014-11-19T18:45:37+00:00</published>
332
+ <updated>2015-05-13T18:24:06+00:00</updated>
333
+ <media:group>
334
+ <media:title>Meet your new Inbox</media:title>
335
+ <media:content url="https://www.youtube.com/v/ayFAQ2OoJaA?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
336
+ <media:thumbnail url="https://i2.ytimg.com/vi/ayFAQ2OoJaA/hqdefault.jpg" width="480" height="360"/>
337
+ <media:description>Welcome to the inbox that works for you. Learn about the key features of Inbox by Gmail to help you get started.</media:description>
338
+ <media:community>
339
+ <media:starRating count="26688" average="4.81" min="1" max="5"/>
340
+ <media:statistics views="2068228"/>
341
+ </media:community>
342
+ </media:group>
343
+ </entry>
344
+ <entry>
345
+ <id>yt:video:otCe903imh0</id>
346
+ <yt:videoId>otCe903imh0</yt:videoId>
347
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
348
+ <title>Google Hindi Input</title>
349
+ <link rel="alternate" href="http://www.youtube.com/watch?v=otCe903imh0"/>
350
+ <author>
351
+ <name>Google</name>
352
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
353
+ </author>
354
+ <published>2014-11-14T22:44:47+00:00</published>
355
+ <updated>2015-05-13T14:50:21+00:00</updated>
356
+ <media:group>
357
+ <media:title>Google Hindi Input</media:title>
358
+ <media:content url="https://www.youtube.com/v/otCe903imh0?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
359
+ <media:thumbnail url="https://i4.ytimg.com/vi/otCe903imh0/hqdefault.jpg" width="480" height="360"/>
360
+ <media:description>This video introduces new features of Google Hindi Input, including material design, Hinglish suggestion, full-screen handwriting etc.
361
+
362
+ Download Google Hindi input at:
363
+ https://play.google.com/store/apps/details?id=com.google.android.apps.inputmethod.hindi&amp;hl=en</media:description>
364
+ <media:community>
365
+ <media:starRating count="1586" average="3.83" min="1" max="5"/>
366
+ <media:statistics views="237388"/>
367
+ </media:community>
368
+ </media:group>
369
+ </entry>
370
+ <entry>
371
+ <id>yt:video:8ztbpW3THmI</id>
372
+ <yt:videoId>8ztbpW3THmI</yt:videoId>
373
+ <yt:channelId>UCK8sQmJBp8GCxrOtXWBpyEA</yt:channelId>
374
+ <title>Veterans Make Great Googlers. Find your team: Specialists</title>
375
+ <link rel="alternate" href="http://www.youtube.com/watch?v=8ztbpW3THmI"/>
376
+ <author>
377
+ <name>Google</name>
378
+ <uri>http://www.youtube.com/channel/UCK8sQmJBp8GCxrOtXWBpyEA</uri>
379
+ </author>
380
+ <published>2014-11-11T17:25:52+00:00</published>
381
+ <updated>2015-05-12T16:22:28+00:00</updated>
382
+ <media:group>
383
+ <media:title>Veterans Make Great Googlers. Find your team: Specialists</media:title>
384
+ <media:content url="https://www.youtube.com/v/8ztbpW3THmI?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
385
+ <media:thumbnail url="https://i1.ytimg.com/vi/8ztbpW3THmI/hqdefault.jpg" width="480" height="360"/>
386
+ <media:description>There are many departments at Google that enable our engineering and sales organizations to thrive. Be one of the specialists at Google who plays a vital role in keeping our business running, including hiring, legal, finance and security.
387
+
388
+ http://www.google.com/careers/veterans</media:description>
389
+ <media:community>
390
+ <media:starRating count="592" average="3.97" min="1" max="5"/>
391
+ <media:statistics views="61469"/>
392
+ </media:community>
393
+ </media:group>
394
+ </entry>
395
+ </feed>
@@ -1,8 +1,14 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../lib/feedjira')
2
2
  require 'sample_feeds'
3
+ require 'vcr'
3
4
 
4
5
  SAXMachine.handler = ENV['HANDLER'].to_sym if ENV['HANDLER']
5
6
 
7
+ VCR.configure do |config|
8
+ config.cassette_library_dir = 'fixtures/vcr_cassettes'
9
+ config.hook_into :faraday
10
+ end
11
+
6
12
  RSpec.configure do |c|
7
13
  c.include SampleFeeds
8
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedjira
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix
@@ -11,79 +11,135 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-06-05 00:00:00.000000000 Z
14
+ date: 2016-12-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: sax-machine
17
+ name: faraday
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - "~>"
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: '1.0'
22
+ version: '0.9'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '1.0'
29
+ version: '0.9'
30
30
  - !ruby/object:Gem::Dependency
31
- name: faraday
31
+ name: faraday_middleware
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: '0.9'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0.9'
44
44
  - !ruby/object:Gem::Dependency
45
- name: faraday_middleware
45
+ name: loofah
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - "~>"
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: '0.9'
50
+ version: '2.0'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - "~>"
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: '0.9'
57
+ version: '2.0'
58
58
  - !ruby/object:Gem::Dependency
59
- name: loofah
59
+ name: sax-machine
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - "~>"
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: '2.0'
64
+ version: '1.0'
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - "~>"
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '2.0'
71
+ version: '1.0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: danger
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ - !ruby/object:Gem::Dependency
87
+ name: danger-commit_lint
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ type: :development
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
72
100
  - !ruby/object:Gem::Dependency
73
101
  name: rspec
74
102
  requirement: !ruby/object:Gem::Requirement
75
103
  requirements:
76
- - - "~>"
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ type: :development
108
+ prerelease: false
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ - !ruby/object:Gem::Dependency
115
+ name: rubocop
116
+ requirement: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ - !ruby/object:Gem::Dependency
129
+ name: vcr
130
+ requirement: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
77
133
  - !ruby/object:Gem::Version
78
- version: '3.0'
134
+ version: '0'
79
135
  type: :development
80
136
  prerelease: false
81
137
  version_requirements: !ruby/object:Gem::Requirement
82
138
  requirements:
83
- - - "~>"
139
+ - - ">="
84
140
  - !ruby/object:Gem::Version
85
- version: '3.0'
86
- description: A library designed to retrieve and parse feeds as quickly as possible
141
+ version: '0'
142
+ description:
87
143
  email: feedjira@gmail.com
88
144
  executables: []
89
145
  extensions: []
@@ -91,18 +147,26 @@ extra_rdoc_files: []
91
147
  files:
92
148
  - ".gitignore"
93
149
  - ".rspec"
150
+ - ".rubocop.yml"
94
151
  - ".travis.yml"
95
152
  - CHANGELOG.md
153
+ - Dangerfile
96
154
  - Gemfile
97
155
  - LICENSE
98
156
  - README.md
99
157
  - Rakefile
100
158
  - feedjira.gemspec
159
+ - fixtures/vcr_cassettes/fetch_failure.yml
160
+ - fixtures/vcr_cassettes/parse_error.yml
161
+ - fixtures/vcr_cassettes/success.yml
101
162
  - lib/feedjira.rb
102
163
  - lib/feedjira/core_ext.rb
103
164
  - lib/feedjira/core_ext/date.rb
104
165
  - lib/feedjira/core_ext/string.rb
105
166
  - lib/feedjira/core_ext/time.rb
167
+ - lib/feedjira/date_time_utilities.rb
168
+ - lib/feedjira/date_time_utilities/date_time_language_parser.rb
169
+ - lib/feedjira/date_time_utilities/date_time_pattern_parser.rb
106
170
  - lib/feedjira/feed.rb
107
171
  - lib/feedjira/feed_entry_utilities.rb
108
172
  - lib/feedjira/feed_utilities.rb
@@ -111,17 +175,23 @@ files:
111
175
  - lib/feedjira/parser/atom_entry.rb
112
176
  - lib/feedjira/parser/atom_feed_burner.rb
113
177
  - lib/feedjira/parser/atom_feed_burner_entry.rb
178
+ - lib/feedjira/parser/atom_youtube.rb
179
+ - lib/feedjira/parser/atom_youtube_entry.rb
114
180
  - lib/feedjira/parser/google_docs_atom.rb
115
181
  - lib/feedjira/parser/google_docs_atom_entry.rb
116
182
  - lib/feedjira/parser/itunes_rss.rb
183
+ - lib/feedjira/parser/itunes_rss_category.rb
117
184
  - lib/feedjira/parser/itunes_rss_item.rb
118
185
  - lib/feedjira/parser/itunes_rss_owner.rb
186
+ - lib/feedjira/parser/podlove_chapter.rb
119
187
  - lib/feedjira/parser/rss.rb
120
188
  - lib/feedjira/parser/rss_entry.rb
121
189
  - lib/feedjira/parser/rss_feed_burner.rb
122
190
  - lib/feedjira/parser/rss_feed_burner_entry.rb
191
+ - lib/feedjira/parser/rss_image.rb
123
192
  - lib/feedjira/preprocessor.rb
124
193
  - lib/feedjira/version.rb
194
+ - spec/feedjira/date_time_utilities_spec.rb
125
195
  - spec/feedjira/feed_entry_utilities_spec.rb
126
196
  - spec/feedjira/feed_spec.rb
127
197
  - spec/feedjira/feed_utilities_spec.rb
@@ -129,11 +199,14 @@ files:
129
199
  - spec/feedjira/parser/atom_feed_burner_entry_spec.rb
130
200
  - spec/feedjira/parser/atom_feed_burner_spec.rb
131
201
  - spec/feedjira/parser/atom_spec.rb
202
+ - spec/feedjira/parser/atom_youtube_entry_spec.rb
203
+ - spec/feedjira/parser/atom_youtube_spec.rb
132
204
  - spec/feedjira/parser/google_docs_atom_entry_spec.rb
133
205
  - spec/feedjira/parser/google_docs_atom_spec.rb
134
206
  - spec/feedjira/parser/itunes_rss_item_spec.rb
135
207
  - spec/feedjira/parser/itunes_rss_owner_spec.rb
136
208
  - spec/feedjira/parser/itunes_rss_spec.rb
209
+ - spec/feedjira/parser/podlove_chapter_spec.rb
137
210
  - spec/feedjira/parser/rss_entry_spec.rb
138
211
  - spec/feedjira/parser/rss_feed_burner_entry_spec.rb
139
212
  - spec/feedjira/parser/rss_feed_burner_spec.rb
@@ -142,7 +215,9 @@ files:
142
215
  - spec/sample_feeds.rb
143
216
  - spec/sample_feeds/AmazonWebServicesBlog.xml
144
217
  - spec/sample_feeds/AmazonWebServicesBlogFirstEntryContent.xml
218
+ - spec/sample_feeds/AtomEscapedHTMLInPreTag.xml
145
219
  - spec/sample_feeds/AtomFeedWithSpacesAroundEquals.xml
220
+ - spec/sample_feeds/CRE.xml
146
221
  - spec/sample_feeds/DuplicateContentAtomFeed.xml
147
222
  - spec/sample_feeds/FeedBurnerUrlNoAlternate.xml
148
223
  - spec/sample_feeds/FeedBurnerXHTML.xml
@@ -150,6 +225,7 @@ files:
150
225
  - spec/sample_feeds/GoogleDocsList.xml
151
226
  - spec/sample_feeds/HREFConsideredHarmful.xml
152
227
  - spec/sample_feeds/HREFConsideredHarmfulFirstEntry.xml
228
+ - spec/sample_feeds/ITunesWithSingleQuotedAttributes.xml
153
229
  - spec/sample_feeds/ITunesWithSpacesInAttributes.xml
154
230
  - spec/sample_feeds/PaulDixExplainsNothing.xml
155
231
  - spec/sample_feeds/PaulDixExplainsNothingAlternate.xml
@@ -166,6 +242,7 @@ files:
166
242
  - spec/sample_feeds/atom_with_link_tag_for_url_unmarked.xml
167
243
  - spec/sample_feeds/itunes.xml
168
244
  - spec/sample_feeds/pet_atom.xml
245
+ - spec/sample_feeds/youtube_atom.xml
169
246
  - spec/spec_helper.rb
170
247
  homepage: http://feedjira.com
171
248
  licenses:
@@ -179,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
256
  requirements:
180
257
  - - ">="
181
258
  - !ruby/object:Gem::Version
182
- version: '0'
259
+ version: 1.9.3
183
260
  required_rubygems_version: !ruby/object:Gem::Requirement
184
261
  requirements:
185
262
  - - ">="
@@ -187,11 +264,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
264
  version: '0'
188
265
  requirements: []
189
266
  rubyforge_project:
190
- rubygems_version: 2.4.6
267
+ rubygems_version: 2.5.2
191
268
  signing_key:
192
269
  specification_version: 4
193
270
  summary: A feed fetching and parsing library
194
271
  test_files:
272
+ - spec/feedjira/date_time_utilities_spec.rb
195
273
  - spec/feedjira/feed_entry_utilities_spec.rb
196
274
  - spec/feedjira/feed_spec.rb
197
275
  - spec/feedjira/feed_utilities_spec.rb
@@ -199,11 +277,14 @@ test_files:
199
277
  - spec/feedjira/parser/atom_feed_burner_entry_spec.rb
200
278
  - spec/feedjira/parser/atom_feed_burner_spec.rb
201
279
  - spec/feedjira/parser/atom_spec.rb
280
+ - spec/feedjira/parser/atom_youtube_entry_spec.rb
281
+ - spec/feedjira/parser/atom_youtube_spec.rb
202
282
  - spec/feedjira/parser/google_docs_atom_entry_spec.rb
203
283
  - spec/feedjira/parser/google_docs_atom_spec.rb
204
284
  - spec/feedjira/parser/itunes_rss_item_spec.rb
205
285
  - spec/feedjira/parser/itunes_rss_owner_spec.rb
206
286
  - spec/feedjira/parser/itunes_rss_spec.rb
287
+ - spec/feedjira/parser/podlove_chapter_spec.rb
207
288
  - spec/feedjira/parser/rss_entry_spec.rb
208
289
  - spec/feedjira/parser/rss_feed_burner_entry_spec.rb
209
290
  - spec/feedjira/parser/rss_feed_burner_spec.rb
@@ -212,7 +293,9 @@ test_files:
212
293
  - spec/sample_feeds.rb
213
294
  - spec/sample_feeds/AmazonWebServicesBlog.xml
214
295
  - spec/sample_feeds/AmazonWebServicesBlogFirstEntryContent.xml
296
+ - spec/sample_feeds/AtomEscapedHTMLInPreTag.xml
215
297
  - spec/sample_feeds/AtomFeedWithSpacesAroundEquals.xml
298
+ - spec/sample_feeds/CRE.xml
216
299
  - spec/sample_feeds/DuplicateContentAtomFeed.xml
217
300
  - spec/sample_feeds/FeedBurnerUrlNoAlternate.xml
218
301
  - spec/sample_feeds/FeedBurnerXHTML.xml
@@ -220,6 +303,7 @@ test_files:
220
303
  - spec/sample_feeds/GoogleDocsList.xml
221
304
  - spec/sample_feeds/HREFConsideredHarmful.xml
222
305
  - spec/sample_feeds/HREFConsideredHarmfulFirstEntry.xml
306
+ - spec/sample_feeds/ITunesWithSingleQuotedAttributes.xml
223
307
  - spec/sample_feeds/ITunesWithSpacesInAttributes.xml
224
308
  - spec/sample_feeds/PaulDixExplainsNothing.xml
225
309
  - spec/sample_feeds/PaulDixExplainsNothingAlternate.xml
@@ -236,4 +320,5 @@ test_files:
236
320
  - spec/sample_feeds/atom_with_link_tag_for_url_unmarked.xml
237
321
  - spec/sample_feeds/itunes.xml
238
322
  - spec/sample_feeds/pet_atom.xml
323
+ - spec/sample_feeds/youtube_atom.xml
239
324
  - spec/spec_helper.rb