feedjira 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b88451721d838b83ae68e58043481e104794532a
4
- data.tar.gz: 21e9e6e48a552ced54dd1e8129b4cf10d7e64659
3
+ metadata.gz: df82fcf653407746793598413fa1b78748514fb8
4
+ data.tar.gz: 8a6265667aa45ef3ce86c91873bdb0c0206279dd
5
5
  SHA512:
6
- metadata.gz: f2fc99f45a03df848dc588481d75a84963a782f8555fb3a321397c6f12a67cc66b2bbde226c46a34fb9fcedf9b197d7d23933b6e5fc89ba80fd29f31ccd4c374
7
- data.tar.gz: f5492b704021be34b4ea414c1b7697aa3b0fd72a18e26eee887c58d65a3322afac186daba0d786929011f92f8c3537df60c1b2047736a91b1aa78a519e495cad
6
+ metadata.gz: 560f045916204c4c4f9588fc2802ec2cd2ee53d987075a6f7b17edb20f4be681dfe8321589f045e25972cb5310ed439981f1e1518dd53369327e9ff120ffeca6
7
+ data.tar.gz: 13d1fb86f7397ab6c0cd3409d0953c315981e30e5a63d4ba39b1048cde6c8791f835619d4344c513cacdae3eda8449c50e875d8d909ce0c6d0a727446ce2f659
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Feedjira Changelog
2
2
 
3
+ ## 1.5.0
4
+
5
+ * Enhancements
6
+ * Handle XHTML content in summary and title [#250][]
7
+
8
+ [#250]: https://github.com/feedjira/feedjira/pull/250
9
+
3
10
  ## 1.4.0
4
11
 
5
12
  * General
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [code-climate-badge]: https://codeclimate.com/github/feedjira/feedjira.png
6
6
  [code-climate]: https://codeclimate.com/github/feedjira/feedjira
7
7
 
8
- Feedjira (formerly Feedzilla) is a Ruby library designed to fetch and parse
8
+ Feedjira (formerly Feedzirra) is a Ruby library designed to fetch and parse
9
9
  feeds as quickly as possible. Version 1.0 was recently released and with it an
10
10
  [awesome new website][f].
11
11
 
@@ -18,7 +18,7 @@ module Feedjira
18
18
  end
19
19
 
20
20
  def content_nodes
21
- doc.search 'entry > content[type="xhtml"]'
21
+ doc.search 'entry > content[type="xhtml"], entry > summary[type="xhtml"], entry > title[type="xhtml"]'
22
22
  end
23
23
 
24
24
  def raw_html(node)
@@ -1,3 +1,3 @@
1
1
  module Feedjira
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.0'
3
3
  end
@@ -72,6 +72,8 @@ describe Feedjira::Parser::Atom do
72
72
  feed = Feedjira::Parser::Atom.parse sample_atom_xhtml_feed
73
73
  entry = feed.entries.first
74
74
 
75
+ expect(entry.title).to match /\<i/
76
+ expect(entry.summary).to match /\<b/
75
77
  expect(entry.content).to match /\A\<p/
76
78
  end
77
79
 
@@ -14,6 +14,8 @@ describe Feedjira::Preprocessor do
14
14
  processor = Feedjira::Preprocessor.new sample_atom_xhtml_feed
15
15
  escaped = processor.to_xml
16
16
 
17
- expect(escaped.split("\n")[26]).to match /&lt;p&gt;$/
17
+ expect(escaped.split("\n")[10]).to match /&lt;i&gt;dogs&lt;\/i&gt;/ #title
18
+ expect(escaped.split("\n")[16]).to match /&lt;b&gt;XHTML&lt;\/b&gt;/ #summary
19
+ expect(escaped.split("\n")[26]).to match /&lt;p&gt;$/ #content
18
20
  end
19
21
  end
@@ -8,13 +8,13 @@
8
8
  <subtitle>Product reviews of dog and cat toys, food, treat, collars, leashes, grooming supplies and more!</subtitle>
9
9
  <generator uri="http://www.typepad.com/">TypePad</generator>
10
10
  <entry>
11
- <title>Sentry Calming Collar for dogs</title>
11
+ <title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Sentry Calming Collar for <i>dogs</i></div></title>
12
12
  <link rel="alternate" type="text/html" href="http://www.petsecretshopper.com/2012/12/sentry-calming-collar.html" />
13
13
  <link rel="replies" type="text/html" href="http://www.petsecretshopper.com/2012/12/sentry-calming-collar.html" thr:count="1" thr:updated="2013-01-18T13:46:38-08:00" />
14
14
  <id>tag:typepad.com,2003:post-6a010535222d03970c017d3f3c659c970c</id>
15
15
  <published>2012-12-27T10:32:37-08:00</published>
16
16
  <updated>2013-02-14T12:55:04-08:00</updated>
17
- <summary>With all of our kids home for the holidays our house has turned in to Grand Central Station. The abundance of noise and chaos agitates our very sensitive Great Dane, Shakespeare, to the point that he jumps up on folks, paces back and forth, and barks for no apparent reason....</summary>
17
+ <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">This is <b>XHTML</b> content.</div></summary>
18
18
  <author>
19
19
  <name>dogtime</name>
20
20
  </author>
@@ -22,8 +22,8 @@
22
22
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
23
23
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
24
24
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
25
-
26
-
25
+
26
+
27
27
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
28
28
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
29
29
  <a class="asset-img-link" href="http://www.obama-dog.com/.a/6a010535222d03970c017d3f3c6976970c-pi" style="float: left;"><img alt="Sentry Calming Collar for dogs" class="asset asset-image at-xid-6a010535222d03970c017d3f3c6976970c" src="http://www.obama-dog.com/.a/6a010535222d03970c017d3f3c6976970c-250wi" style="width: 220px; margin: 0px 5px 5px 0px;" title="Sentry Calming Collar for dogs" /></a>With all of our kids home for the holidays our house has turned in to Grand Central Station. The abundance of noise and chaos agitates our very sensitive Great Dane, Shakespeare, to the point that he jumps up on folks, paces back and forth, and barks for no apparent reason. A super time to test <a href="http://www.petco.com/product/109324/Sentry-Calming-Collar-for-Dogs.aspx" target="_blank" title="Sentry Calming Collar for dogs">Sentry&#39;s Calming Collar for dogs</a>!</p>
@@ -65,13 +65,13 @@ about this review post and leave the URL to your blog post in a comment on this
65
65
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
66
66
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
67
67
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
68
-
69
-
68
+
69
+
70
70
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
71
71
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
72
72
  <a class="asset-img-link" href="http://www.mypet.com/#" target="_blank" title="MyPet.com&#39;s Vote for Vaccination"><img alt="MyPet.com&#39;s Vote for Vaccination Campaign" class="asset asset-image at-xid-6a010535222d03970c017ee5c5ab92970d" src="http://www.obama-dog.com/.a/6a010535222d03970c017ee5c5ab92970d-350wi" style="width: 350px; display: block; margin-left: auto; margin-right: auto;" title="MyPet.com&#39;s Vote for Vaccination Campaign" /></a><br />Vaccinating your pet can save her from contracting a variety of nasty illnesses including rabies. The pet loving folks at <a href="http://www.mypet.com/#" target="_blank" title="MyPet.com">MyPet.com</a> are encouraging all pet owners to join their Vote for Vaccination campaign to learn more about the benefits of vaccinations and which vaccinations best suit your pet&#39;s lifestyle. </p>
73
- <p>To see which vaccines your pet may need, take <a href="http://www.mypet.com/#Pet_Owners_Risk" target="_blank" title="Risk Assesment Quiz">MyPet.com&#39;s risk
74
- assessment quiz</a> and discuss the results with your veterinarian to
73
+ <p>To see which vaccines your pet may need, take <a href="http://www.mypet.com/#Pet_Owners_Risk" target="_blank" title="Risk Assesment Quiz">MyPet.com&#39;s risk
74
+ assessment quiz</a> and discuss the results with your veterinarian to
75
75
  develop a personalized vaccination schedule for your cat or dog.</p>
76
76
  <p><strong>Vaccination tips:</strong></p>
77
77
  <ul>
@@ -119,8 +119,8 @@ pet healthy</li>
119
119
  <category scheme="http://www.sixapart.com/ns/types#category" term="Dogs" />
120
120
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
121
121
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
122
-
123
-
122
+
123
+
124
124
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
125
125
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
126
126
  <a class="asset-img-link" href="http://yads.zedo.com/ads2/c?a=1339743;g=0;c=809000000;i=0;x=8192;n=809;s=2;k=http://www.mypet.com/dogflu" target="_blank"><img alt="Dog Flu (Canine Influenza)" class="asset asset-image at-xid-6a010535222d03970c017c32997d05970b" src="http://www.obama-dog.com/.a/6a010535222d03970c017c32997d05970b-300wi" style="width: 300px; display: block; margin-left: auto; margin-right: auto;" title="Dog Flu (Canine Influenza)" /></a><br />If you&#39;ve ever wondered if your dog can get the flu, the answer is yes! While it&#39;s not the same strain of flu virus that humans contract, it&#39;s just as serious and worthy of special shout-out to my followers.</p>
@@ -156,7 +156,7 @@ weeks. Other signs include fever, runny nose, fatigue, and loss of appetite.</li
156
156
  human flu, dog flu can lead to more serious conditions like pneumonia. Up to 8%
157
157
  of dogs that get the flu can die from the infection.</li>
158
158
  <li>Recognizing
159
- the signs of dog flu is not enough to prevent spreading the disease.
159
+ the signs of dog flu is not enough to prevent spreading the disease.
160
160
  <ul>
161
161
  <li>About
162
162
  20% of infected dogs will show no signs of disease but can still spread CIV to
@@ -211,8 +211,8 @@ on Canine Influenza check out <a href="http://yads.zedo.com/ads2/c?a=1339743;g=0
211
211
  <category scheme="http://www.sixapart.com/ns/types#category" term="Games" />
212
212
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
213
213
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
214
-
215
-
214
+
215
+
216
216
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
217
217
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
218
218
  <a class="asset-img-link" href="http://www.petcarerx.com/search/search.aspx?q=A-Door-Able" target="_blank"><img alt="A-Door-able bouncing cat toy" class="asset asset-image at-xid-6a010535222d03970c017c3287edd0970b" src="http://www.obama-dog.com/.a/6a010535222d03970c017c3287edd0970b-350wi" style="width: 350px; display: block; margin-left: auto; margin-right: auto;" title="A-Door-able bouncing cat toy" /></a>We have two 3 month old kittens, Atticus and Scout (brother &amp; sister), who are always looking for something to play with. We&#39;ve bombed with a variety of cat toys but it was a happy day indeed when my daughter brought home an A-Door-able kitty toy to amuse them.</p>
@@ -250,8 +250,8 @@ on Canine Influenza check out <a href="http://yads.zedo.com/ads2/c?a=1339743;g=0
250
250
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
251
251
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
252
252
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
253
-
254
-
253
+
254
+
255
255
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
256
256
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
257
257
  <a class="asset-img-link" href="http://www.petmate.com/curvations-pet-tote" target="_blank"><img alt="Petmate Curvations Tote" class="asset asset-image at-xid-6a010535222d03970c017c32624591970b" src="http://www.obama-dog.com/.a/6a010535222d03970c017c32624591970b-350wi" style="width: 350px; display: block; margin-left: auto; margin-right: auto;" title="Petmate Curvations Tote" /></a><br />When we visited <a href="http://www.petmate.com/curvations-pet-tote" target="_blank" title="Petmate">Petmate&#39;s</a> booth at this year&#39;s Global Pet Expo in Orlando, we were like kids in a candy store. So many new products to check-out, including their latest pet carrier design, the Curvations Pet Tote. We like the hip design, the sleek look, comfy padded shoulder strap and, the removable, <span style="text-decoration: underline;">washable</span> pet bed. </p>
@@ -289,8 +289,8 @@ pet!&quot;</p>
289
289
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
290
290
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
291
291
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
292
-
293
-
292
+
293
+
294
294
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
295
295
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
296
296
  <a class="asset-img-link" href="http://www.obama-dog.com/.a/6a010535222d03970c017d3c6d1f16970c-pi"><img alt="Fat Cat Foodies &amp; Kitty Hoots Boogie Mat" class="asset asset-image at-xid-6a010535222d03970c017d3c6d1f16970c" src="http://www.obama-dog.com/.a/6a010535222d03970c017d3c6d1f16970c-320wi" style="display: block; margin-left: auto; margin-right: auto;" title="Fat Cat Foodies &amp; Kitty Hoots Boogie Mat" /></a></p>
@@ -330,8 +330,8 @@ be the catnip!!&#0160; We will definitely keep this around filled with fresh cat
330
330
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
331
331
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
332
332
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
333
-
334
-
333
+
334
+
335
335
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
336
336
  <div xmlns="http://www.w3.org/1999/xhtml"><p>by Guest Blogger Patrick Holwell</p>
337
337
  <p>
@@ -385,8 +385,8 @@ Atticus and Scout recommend it heartily!</span></p>
385
385
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
386
386
  <category scheme="http://www.sixapart.com/ns/types#category" term="Television" />
387
387
  <category scheme="http://www.sixapart.com/ns/types#category" term="Video Reviews" />
388
-
389
-
388
+
389
+
390
390
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
391
391
  <div xmlns="http://www.w3.org/1999/xhtml"><p>
392
392
  <a class="asset-img-link" href="http://channel.nationalgeographic.com/wild/dog-whisperer/" target="_blank"><img alt="Cesar Millan the Dog Whisperer on Nat Geo Wild" class="asset asset-image at-xid-6a010535222d03970c0177449a9b15970d" src="http://www.obama-dog.com/.a/6a010535222d03970c0177449a9b15970d-350wi" style="width: 350px; display: block; margin-left: auto; margin-right: auto;" title="Cesar Millan the Dog Whisperer on Nat Geo Wild" /></a><br />The <a href="http://channel.nationalgeographic.com/wild/dog-whisperer/interactives/diagnose-that-dog/" target="_blank" title="Dog Whisperer - Diagnose that dog!">Dog Whisperer</a> has become so much a part of our culture that I catch my sister trying to &quot;Tssst!&quot; her grand-dog into behaving as I try &quot;Tsst-zing!&quot; my husband into doing the same. I imagine there are millions of Dog Whisperer devotees, just like us, who are also doing their darndest to mimic <a href="http://channel.nationalgeographic.com/wild/dog-whisperer/" target="_blank" title="Cesar Millan">Cesar&#39;s </a>mystical methods. LOL!</p>
@@ -407,8 +407,8 @@ Atticus and Scout recommend it heartily!</span></p>
407
407
  <param name="allowfullscreen" value="true" />
408
408
  </object>
409
409
  &#0160;</p>
410
- <p>As another season of the <a href="http://tvblogs.nationalgeographic.com/blog/dog-whisperer/" target="_blank" title="Dog Whisperer blog">Dog Whisperer</a> comes to a close we thank our
411
- lucky liver treats for Cesar&#39;s serene supervision as we delved deeper
410
+ <p>As another season of the <a href="http://tvblogs.nationalgeographic.com/blog/dog-whisperer/" target="_blank" title="Dog Whisperer blog">Dog Whisperer</a> comes to a close we thank our
411
+ lucky liver treats for Cesar&#39;s serene supervision as we delved deeper
412
412
  into the canine psyche. Only two episodes left and we&#39;re here to tell you that they were worth the wait!</p>
413
413
  <p>Tonight&#39;s episode, &quot;Hollywood Hounds&quot; features fitness guru, <a class="zem_slink" href="http://www.jillianmichaels.com" rel="homepage" target="_blank" title="Jillian Michaels (personal trainer)">Jillian Michaels</a>, and her <a href="http://dogtime.com/dog-breeds/chihuahua" target="_blank" title="Chihuahua Breed Profile">Chihuahua</a>, Richard, who is in desparate need of a mental &quot;chill pill.&quot; Jillian is in the process of adopting a two year old daughter and doesn&#39;t want to fear for her new babe&#39;s safety around her pup.</p>
414
414
  <p>Next we visit <a class="zem_slink" href="http://www.kelseylive.com/" rel="homepage" target="_blank" title="Kelsey Grammer">Kelsey Grammer</a> and his wife, Kayte, whose dogs, Elvis and George, have a propensity for pottying indoors rather than dirtying their outdoor play-space. Will Cesar be able to save the day <span style="text-decoration: underline;">and</span> the carpet?</p>
@@ -439,8 +439,8 @@ into the canine psyche. Only two episodes left and we&#39;re here to tell you th
439
439
  <category scheme="http://www.sixapart.com/ns/types#category" term="Games" />
440
440
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
441
441
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
442
-
443
-
442
+
443
+
444
444
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
445
445
  <div xmlns="http://www.w3.org/1999/xhtml"><p>by Guest Blogger: Peoria Cat Tales</p>
446
446
  <p>
@@ -476,8 +476,8 @@ You can purchase the BOLT Laser Toy for $19.95 at <a href="http://www.mythreecat
476
476
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pet Supplies" />
477
477
  <category scheme="http://www.sixapart.com/ns/types#category" term="Pets" />
478
478
  <category scheme="http://www.sixapart.com/ns/types#category" term="Reviews" />
479
-
480
-
479
+
480
+
481
481
  <content type="xhtml" xml:lang="en-US" xml:base="http://www.petsecretshopper.com/">
482
482
  <div xmlns="http://www.w3.org/1999/xhtml"><p><a class="asset-img-link" href="http://www.bynaturepetfoods.com/productpages/catmain.php" target="_blank"><img alt="By Nature Natural Pet Foods" class="asset asset-image at-xid-6a010535222d03970c0167684cbb16970b" src="http://www.obama-dog.com/.a/6a010535222d03970c0167684cbb16970b-300wi" style="width: 300px; display: block; margin-left: auto; margin-right: auto;" title="By Nature Natural Pet Foods" /></a>Cats are notoriously finicky eaters and the members of our Kitty Review Crew are no exception. We&#39;re never quite sure how they&#39;re going to react to new foods or treats, however their reaction to an unguarded bag of <a href="http://www.bynaturepetfoods.com/productpages/catmain.php" target="_blank" title="By Nature Adult Cat Formula">By Nature&#39;s Adult Dry Cat Food</a> left on the living room floor made their opinions quite clear.</p>
483
483
  <p><a class="asset-img-link" href="http://www.bynaturepetfoods.com/productpages/catmain.php" style="float: right;" target="_blank"><img alt="Exhibit A: Buddha and the torn bag of By Nature cat food" class="asset asset-image at-xid-6a010535222d03970c01761641ef0d970c" src="http://www.obama-dog.com/.a/6a010535222d03970c01761641ef0d970c-200wi" style="width: 180px; margin: 0px 0px 5px 5px;" title="Exhibit A: Buddha and the torn bag of By Nature cat food" /></a>I submit the photo (right) as Exhibit A. As you can see, I found the bag of food covered in tiny tooth marks, torn open, and missing a considerable amount of its contents.&#0160;</p>
@@ -491,7 +491,7 @@ You can purchase the BOLT Laser Toy for $19.95 at <a href="http://www.mythreecat
491
491
 
492
492
 
493
493
  </entry>
494
-
494
+
495
495
  </feed>
496
496
 
497
497
  <!-- ph=1 -->
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: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-09-05 00:00:00.000000000 Z
14
+ date: 2014-10-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sax-machine