feedjira 2.1.4 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/feedjira/parser/itunes_rss.rb +1 -0
- data/lib/feedjira/parser/itunes_rss_item.rb +4 -0
- data/lib/feedjira/version.rb +1 -1
- data/spec/feedjira/feed_spec.rb +2 -0
- data/spec/feedjira/parser/itunes_rss_item_spec.rb +16 -0
- data/spec/feedjira/parser/itunes_rss_spec.rb +4 -0
- data/spec/sample_feeds/itunes.xml +13 -0
- metadata +60 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b8cec1f08ed12a497f98c7e4b622f8ab06b688a75e968175dd985ad93cfd4bd
|
4
|
+
data.tar.gz: 1015179ce20e86b0a02253411e02e9b78bf0294c8f18a8e2fba3fc92c5c04b01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba84e098bed14b11cf07a816500ff853e3337039bce117abf1bedc17d28d5bc3072d39bb43f747580f8c48de57417df23284fb0d71eb1d79d9f35896ae5c2f5c
|
7
|
+
data.tar.gz: 8ab31a4eb8427f70d5f26f817c3296a5ab5ea650b1885d4ac5f9518cb7c85fc852ccd29923b29c2f3300f67c6efa558de44a2f4290314ba9b206fe428b6ca13e
|
data/CHANGELOG.md
CHANGED
@@ -31,6 +31,7 @@ module Feedjira
|
|
31
31
|
element :"itunes:explicit", as: :itunes_explicit
|
32
32
|
element :"itunes:complete", as: :itunes_complete
|
33
33
|
element :"itunes:keywords", as: :itunes_keywords
|
34
|
+
element :"itunes:type", as: :itunes_type
|
34
35
|
|
35
36
|
# New URL for the podcast feed
|
36
37
|
element :"itunes:new_feed_url", as: :itunes_new_feed_url
|
@@ -24,6 +24,10 @@ module Feedjira
|
|
24
24
|
element :"itunes:image", value: :href, as: :itunes_image
|
25
25
|
element :"itunes:isClosedCaptioned", as: :itunes_closed_captioned
|
26
26
|
element :"itunes:order", as: :itunes_order
|
27
|
+
element :"itunes:season", as: :itunes_season
|
28
|
+
element :"itunes:episode", as: :itunes_episode
|
29
|
+
element :"itunes:title", as: :itunes_title
|
30
|
+
element :"itunes:episodeType", as: :itunes_episode_type
|
27
31
|
|
28
32
|
# If summary is not present, use the description tag
|
29
33
|
element :"itunes:summary", as: :itunes_summary
|
data/lib/feedjira/version.rb
CHANGED
data/spec/feedjira/feed_spec.rb
CHANGED
@@ -145,6 +145,7 @@ describe Feedjira::Feed do
|
|
145
145
|
expect(feed.entries.size).to eq 3
|
146
146
|
end
|
147
147
|
|
148
|
+
# rubocop:disable Metrics/LineLength
|
148
149
|
it 'does not fail if multiple published dates exist and some are unparseable' do
|
149
150
|
expect(Feedjira.logger).to receive(:warn).once
|
150
151
|
|
@@ -154,6 +155,7 @@ describe Feedjira::Feed do
|
|
154
155
|
expect(feed.entries.first.published).to eq published
|
155
156
|
expect(feed.entries.size).to eq 2
|
156
157
|
end
|
158
|
+
# rubocop:enable Metrics/LineLength
|
157
159
|
end
|
158
160
|
|
159
161
|
context "when there's no available parser" do
|
@@ -12,6 +12,10 @@ describe Feedjira::Parser::ITunesRSSItem do
|
|
12
12
|
expect(@item.title).to eq 'Shake Shake Shake Your Spices'
|
13
13
|
end
|
14
14
|
|
15
|
+
it 'should parse the itunes title' do
|
16
|
+
expect(@item.itunes_title).to eq 'Shake Shake Shake Your Spices'
|
17
|
+
end
|
18
|
+
|
15
19
|
it 'should parse the author' do
|
16
20
|
expect(@item.itunes_author).to eq 'John Doe'
|
17
21
|
end
|
@@ -25,6 +29,18 @@ describe Feedjira::Parser::ITunesRSSItem do
|
|
25
29
|
expect(@item.itunes_summary).to eq summary
|
26
30
|
end
|
27
31
|
|
32
|
+
it 'should parse the itunes season' do
|
33
|
+
expect(@item.itunes_season).to eq '1'
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should parse the itunes episode number' do
|
37
|
+
expect(@item.itunes_episode).to eq '3'
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should parse the itunes episode type' do
|
41
|
+
expect(@item.itunes_episode_type).to eq 'full'
|
42
|
+
end
|
43
|
+
|
28
44
|
it 'should parse the enclosure' do
|
29
45
|
expect(@item.enclosure_length).to eq '8727310'
|
30
46
|
expect(@item.enclosure_type).to eq 'audio/x-m4a'
|
@@ -95,6 +95,10 @@ module Feedjira::Parser
|
|
95
95
|
]
|
96
96
|
end
|
97
97
|
|
98
|
+
it 'should parse the itunes type' do
|
99
|
+
expect(@feed.itunes_type).to eq 'episodic'
|
100
|
+
end
|
101
|
+
|
98
102
|
it 'should parse the summary' do
|
99
103
|
summary = 'All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our Podcast in the iTunes Music Store' # rubocop:disable Metrics/LineLength
|
100
104
|
expect(@feed.itunes_summary).to eq summary
|
@@ -9,6 +9,7 @@
|
|
9
9
|
<copyright>℗ & © 2005 John Doe & Family</copyright>
|
10
10
|
<lastBuildDate>Sat, 07 Sep 2002 09:42:31 GMT</lastBuildDate>
|
11
11
|
<ttl>60</ttl>
|
12
|
+
<itunes:type>episodic</itunes:type>
|
12
13
|
<itunes:subtitle>A show about everything</itunes:subtitle>
|
13
14
|
<itunes:new-feed-url>http://example.com/new.xml</itunes:new-feed-url>
|
14
15
|
<itunes:author>John Doe</itunes:author>
|
@@ -39,6 +40,10 @@
|
|
39
40
|
</itunes:category>
|
40
41
|
<item>
|
41
42
|
<title>Shake Shake Shake Your Spices</title>
|
43
|
+
<itunes:title>Shake Shake Shake Your Spices</itunes:title>
|
44
|
+
<itunes:episodeType>full</itunes:episodeType>
|
45
|
+
<itunes:season>1</itunes:season>
|
46
|
+
<itunes:episode>3</itunes:episode>
|
42
47
|
<itunes:author>John Doe</itunes:author>
|
43
48
|
<itunes:subtitle>A short primer on table spices</itunes:subtitle>
|
44
49
|
<itunes:summary>This week we talk about salt and pepper shakers, comparing and contrasting pour rates, construction materials, and overall aesthetics. Come and join the party!</itunes:summary>
|
@@ -55,6 +60,10 @@
|
|
55
60
|
|
56
61
|
<item>
|
57
62
|
<title>Socket Wrench Shootout</title>
|
63
|
+
<itunes:title>Socket Wrench Shootout</itunes:title>
|
64
|
+
<itunes:episodeType>full</itunes:episodeType>
|
65
|
+
<itunes:season>1</itunes:season>
|
66
|
+
<itunes:episode>2</itunes:episode>
|
58
67
|
<itunes:author>Jane Doe</itunes:author>
|
59
68
|
<itunes:subtitle>Comparing socket wrenches is fun!</itunes:subtitle>
|
60
69
|
<itunes:summary>This week we talk about metric vs. old english socket wrenches. Which one is better? Do you really need both? Get all of your answers here.</itunes:summary>
|
@@ -68,6 +77,10 @@
|
|
68
77
|
|
69
78
|
<item>
|
70
79
|
<title>Red, Whine, & Blue</title>
|
80
|
+
<itunes:title>Red, Whine, & Blue</itunes:title>
|
81
|
+
<itunes:episodeType>full</itunes:episodeType>
|
82
|
+
<itunes:season>1</itunes:season>
|
83
|
+
<itunes:episode>1</itunes:episode>
|
71
84
|
<itunes:author>Various</itunes:author>
|
72
85
|
<itunes:subtitle>Red + Blue != Purple</itunes:subtitle>
|
73
86
|
<itunes:summary>This week we talk about surviving in a Red state if you are a Blue person. Or vice versa.</itunes:summary>
|
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.
|
4
|
+
version: 2.2.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: 2018-
|
14
|
+
date: 2018-09-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|
@@ -283,8 +283,64 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
283
|
version: '0'
|
284
284
|
requirements: []
|
285
285
|
rubyforge_project:
|
286
|
-
rubygems_version: 2.7.
|
286
|
+
rubygems_version: 2.7.6
|
287
287
|
signing_key:
|
288
288
|
specification_version: 4
|
289
289
|
summary: A feed fetching and parsing library
|
290
|
-
test_files:
|
290
|
+
test_files:
|
291
|
+
- spec/feedjira/configuration_spec.rb
|
292
|
+
- spec/feedjira/date_time_utilities_spec.rb
|
293
|
+
- spec/feedjira/feed_entry_utilities_spec.rb
|
294
|
+
- spec/feedjira/feed_spec.rb
|
295
|
+
- spec/feedjira/feed_utilities_spec.rb
|
296
|
+
- spec/feedjira/parser/atom_entry_spec.rb
|
297
|
+
- spec/feedjira/parser/atom_feed_burner_entry_spec.rb
|
298
|
+
- spec/feedjira/parser/atom_feed_burner_spec.rb
|
299
|
+
- spec/feedjira/parser/atom_spec.rb
|
300
|
+
- spec/feedjira/parser/atom_youtube_entry_spec.rb
|
301
|
+
- spec/feedjira/parser/atom_youtube_spec.rb
|
302
|
+
- spec/feedjira/parser/google_docs_atom_entry_spec.rb
|
303
|
+
- spec/feedjira/parser/google_docs_atom_spec.rb
|
304
|
+
- spec/feedjira/parser/itunes_rss_item_spec.rb
|
305
|
+
- spec/feedjira/parser/itunes_rss_owner_spec.rb
|
306
|
+
- spec/feedjira/parser/itunes_rss_spec.rb
|
307
|
+
- spec/feedjira/parser/podlove_chapter_spec.rb
|
308
|
+
- spec/feedjira/parser/rss_entry_spec.rb
|
309
|
+
- spec/feedjira/parser/rss_feed_burner_entry_spec.rb
|
310
|
+
- spec/feedjira/parser/rss_feed_burner_spec.rb
|
311
|
+
- spec/feedjira/parser/rss_spec.rb
|
312
|
+
- spec/feedjira/preprocessor_spec.rb
|
313
|
+
- spec/sample_feeds.rb
|
314
|
+
- spec/sample_feeds/AmazonWebServicesBlog.xml
|
315
|
+
- spec/sample_feeds/AmazonWebServicesBlogFirstEntryContent.xml
|
316
|
+
- spec/sample_feeds/AtomEscapedHTMLInPreTag.xml
|
317
|
+
- spec/sample_feeds/AtomFeedWithSpacesAroundEquals.xml
|
318
|
+
- spec/sample_feeds/CRE.xml
|
319
|
+
- spec/sample_feeds/DuplicateContentAtomFeed.xml
|
320
|
+
- spec/sample_feeds/FeedBurnerUrlNoAlternate.xml
|
321
|
+
- spec/sample_feeds/FeedBurnerXHTML.xml
|
322
|
+
- spec/sample_feeds/FeedjiraBlog.xml
|
323
|
+
- spec/sample_feeds/GiantRobotsSmashingIntoOtherGiantRobots.xml
|
324
|
+
- spec/sample_feeds/GoogleDocsList.xml
|
325
|
+
- spec/sample_feeds/HREFConsideredHarmful.xml
|
326
|
+
- spec/sample_feeds/HREFConsideredHarmfulFirstEntry.xml
|
327
|
+
- spec/sample_feeds/ITunesWithSingleQuotedAttributes.xml
|
328
|
+
- spec/sample_feeds/ITunesWithSpacesInAttributes.xml
|
329
|
+
- spec/sample_feeds/InvalidDateFormat.xml
|
330
|
+
- spec/sample_feeds/PaulDixExplainsNothing.xml
|
331
|
+
- spec/sample_feeds/PaulDixExplainsNothingAlternate.xml
|
332
|
+
- spec/sample_feeds/PaulDixExplainsNothingFirstEntryContent.xml
|
333
|
+
- spec/sample_feeds/PaulDixExplainsNothingWFW.xml
|
334
|
+
- spec/sample_feeds/SamRuby.xml
|
335
|
+
- spec/sample_feeds/TechCrunch.xml
|
336
|
+
- spec/sample_feeds/TechCrunchFirstEntry.xml
|
337
|
+
- spec/sample_feeds/TechCrunchFirstEntryDescription.xml
|
338
|
+
- spec/sample_feeds/TenderLovemaking.xml
|
339
|
+
- spec/sample_feeds/TenderLovemakingFirstEntry.xml
|
340
|
+
- spec/sample_feeds/TrotterCashionHome.xml
|
341
|
+
- spec/sample_feeds/TypePadNews.xml
|
342
|
+
- spec/sample_feeds/atom_with_link_tag_for_url_unmarked.xml
|
343
|
+
- spec/sample_feeds/itunes.xml
|
344
|
+
- spec/sample_feeds/pet_atom.xml
|
345
|
+
- spec/sample_feeds/youtube_atom.xml
|
346
|
+
- spec/spec_helper.rb
|