feed-abstract 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{feed-abstract}
8
- s.version = "0.0.5"
7
+ s.name = "feed-abstract"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{Daniel Collis-Puro}]
12
- s.date = %q{2011-09-07}
13
- s.description = %q{This library creates a common object graph for the RSS/Atom/RDF parsing classes in the ruby standard library. This allows you parse different feed formats and get back the same (or at least a very similar) set of results - item authors are accessible under an "author(s)" attribute, categories/tags/subjects are accessible under "category(ies)" attributes, etc. We do our best to make sure the data makes sense, too - RSS items lack an "updated" attribute, so we use "pubDate" to populate it. }
14
- s.email = [%q{djcp@cyber.law.harvard.edu}]
11
+ s.authors = ["Daniel Collis-Puro"]
12
+ s.date = "2011-09-15"
13
+ s.description = "This library creates a common object graph for the RSS/Atom/RDF parsing classes in the ruby standard library. This allows you parse different feed formats and get back the same (or at least a very similar) set of results - item authors are accessible under an \"author(s)\" attribute, categories/tags/subjects are accessible under \"category(ies)\" attributes, etc. We do our best to make sure the data makes sense, too - RSS items lack an \"updated\" attribute, so we use \"pubDate\" to populate it. "
14
+ s.email = ["djcp@cyber.law.harvard.edu"]
15
15
  s.extra_rdoc_files = [
16
16
  "README.rdoc"
17
17
  ]
@@ -46,13 +46,14 @@ Gem::Specification.new do |s|
46
46
  "spec/test_data/feedburner.rss",
47
47
  "spec/test_data/katanapg.atom",
48
48
  "spec/test_data/oa.africa.rss",
49
+ "spec/test_data/pyblosxom.atom",
49
50
  "spec/test_data/zotero.rss"
50
51
  ]
51
- s.homepage = %q{https://github.com/berkmancenter/feed-abstract}
52
- s.rdoc_options = [%q{--charset=UTF-8}]
53
- s.require_paths = [%q{lib}]
54
- s.rubygems_version = %q{1.8.6}
55
- s.summary = %q{Abstracts RSS/Atom/RDF parsing features from the ruby standard lib into a common object graph.}
52
+ s.homepage = "https://github.com/berkmancenter/feed-abstract"
53
+ s.rdoc_options = ["--charset=UTF-8"]
54
+ s.require_paths = ["lib"]
55
+ s.rubygems_version = "1.8.10"
56
+ s.summary = "Abstracts RSS/Atom/RDF parsing features from the ruby standard lib into a common object graph."
56
57
 
57
58
  if s.respond_to? :specification_version then
58
59
  s.specification_version = 3
@@ -65,6 +66,8 @@ Gem::Specification.new do |s|
65
66
  s.add_development_dependency(%q<rspec>, [">= 0"])
66
67
  s.add_development_dependency(%q<rspec>, [">= 0"])
67
68
  s.add_development_dependency(%q<rspec>, [">= 0"])
69
+ s.add_development_dependency(%q<rspec>, [">= 0"])
70
+ s.add_development_dependency(%q<rspec>, [">= 0"])
68
71
  else
69
72
  s.add_dependency(%q<feed-abstract>, [">= 0"])
70
73
  s.add_dependency(%q<rspec>, [">= 0"])
@@ -73,6 +76,8 @@ Gem::Specification.new do |s|
73
76
  s.add_dependency(%q<rspec>, [">= 0"])
74
77
  s.add_dependency(%q<rspec>, [">= 0"])
75
78
  s.add_dependency(%q<rspec>, [">= 0"])
79
+ s.add_dependency(%q<rspec>, [">= 0"])
80
+ s.add_dependency(%q<rspec>, [">= 0"])
76
81
  end
77
82
  else
78
83
  s.add_dependency(%q<feed-abstract>, [">= 0"])
@@ -82,6 +87,8 @@ Gem::Specification.new do |s|
82
87
  s.add_dependency(%q<rspec>, [">= 0"])
83
88
  s.add_dependency(%q<rspec>, [">= 0"])
84
89
  s.add_dependency(%q<rspec>, [">= 0"])
90
+ s.add_dependency(%q<rspec>, [">= 0"])
91
+ s.add_dependency(%q<rspec>, [">= 0"])
85
92
  end
86
93
  end
87
94
 
@@ -12,7 +12,7 @@ module FeedAbstract
12
12
  # The authors list as an array.
13
13
  def authors
14
14
  return [] if @feed.channel.dc_publishers.empty?
15
- @feed.channel.dc_publishers
15
+ @feed.channel.dc_publishers.reject{|au| au == '' || au.match(/^\s+$/)}
16
16
  end
17
17
 
18
18
  # The authors list as a string, joined with a comma.
@@ -33,7 +33,7 @@ module FeedAbstract
33
33
  # The category list as an array.
34
34
  def categories
35
35
  return [] if @feed.channel.dc_subjects.empty?
36
- @feed.channel.dc_subjects.collect{|c| c.content}
36
+ @feed.channel.dc_subjects.collect{|c| c.content}.reject{|c| c == '' || c.match(/^\s+$/)}
37
37
  end
38
38
 
39
39
  # The category list as a string, joined with a comma.
@@ -61,7 +61,7 @@ module FeedAbstract
61
61
  # The authors (a merge of the RSS managingEditor and dc:publisher elements) as an array.
62
62
  def authors
63
63
  return [] if @feed.channel.managingEditor.nil? && @feed.channel.dc_publishers.empty?
64
- [@feed.channel.managingEditor, @feed.channel.dc_publishers].flatten.uniq
64
+ [@feed.channel.managingEditor, @feed.channel.dc_publishers].flatten.uniq.compact.reject{|au| au == '' || au.match(/^\s+$/)}
65
65
  end
66
66
 
67
67
  # The author list joined with a comma.
@@ -73,13 +73,13 @@ module FeedAbstract
73
73
  # The category list (a merge of the RSS category and dc:subject elements) as an array.
74
74
  def categories
75
75
  return [] if @feed.channel.categories.empty? && @feed.channel.dc_subjects.empty?
76
- [@feed.channel.categories, @feed.channel.dc_subjects].flatten.uniq.collect{|c| c.content}
76
+ [@feed.channel.categories, @feed.channel.dc_subjects].flatten.uniq.compact.collect{|c| c.content}.reject{|c| c == '' || c.match(/^\s+$/)}
77
77
  end
78
78
 
79
79
  # The category list as a string, joined with a comma.
80
80
  def category
81
- return '' if @feed.channel.categories.empty?
82
- @feed.channel.categories.collect{|c| c.content}.join(', ')
81
+ return '' if self.categories.empty?
82
+ self.categories.join(', ')
83
83
  end
84
84
 
85
85
  # A URL to an icon representing this feed.
@@ -23,7 +23,7 @@ module FeedAbstract
23
23
  # The contributor list as an array.
24
24
  def contributors
25
25
  return [] if @item.contributors.empty?
26
- @item.contributors.collect{|c| c.name.content}
26
+ @item.contributors.reject{|con| con.name.content == '' || con.name.content.match(/^\s+$/)}.collect{|c| c.name.content}
27
27
  end
28
28
 
29
29
  #The contributor list as a string joined with a comma.
@@ -6,7 +6,7 @@ module FeedAbstract
6
6
 
7
7
  # The author list (from the dc:creator element) as an array.
8
8
  def authors
9
- (@item.dc_creators.empty?) ? [] : @item.dc_creators.collect{|c| c.content}
9
+ (@item.dc_creators.empty?) ? [] : @item.dc_creators.collect{|c| c.content}.reject{|au| au == '' || au.match(/^\s+$/)}
10
10
  end
11
11
 
12
12
  # The author list as a string, joined with a comma.
@@ -18,7 +18,7 @@ module FeedAbstract
18
18
  # The category list (parsed from the dc:subject element) as an array.
19
19
  def categories
20
20
  return [] if @item.dc_subjects.empty?
21
- @item.dc_subjects.collect{|c| c.content}
21
+ @item.dc_subjects.collect{|c| c.content}.reject{|c| c == '' || c.match(/^\s+$/)}
22
22
  end
23
23
 
24
24
  # The category list as a string, joined with a comma.
@@ -33,7 +33,7 @@ module FeedAbstract
33
33
 
34
34
  # The author list (a merge of the RSS author and dc:creator elements) as an array.
35
35
  def authors
36
- [@item.author, @item.dc_creators.collect{|c| c.content}].flatten.uniq.compact
36
+ [@item.author, @item.dc_creators.collect{|c| c.content}].flatten.uniq.compact.reject{|au| au == '' || au.match(/^\s+$/)}
37
37
  end
38
38
 
39
39
  # The author list as a string, joined with a comma.
@@ -43,7 +43,7 @@ module FeedAbstract
43
43
 
44
44
  # The contributors (parsed from the dc:contributor element) as an array.
45
45
  def contributors
46
- (@item.dc_contributors.empty?) ? [] : @item.dc_contributors
46
+ (@item.dc_contributors.empty?) ? [] : @item.dc_contributors.reject{|au| au == '' || au.match(/^\s+$/)}
47
47
  end
48
48
 
49
49
  # The contributor list as a string joined with a comma.
@@ -54,7 +54,7 @@ module FeedAbstract
54
54
  # The category list as an array.
55
55
  def categories
56
56
  return [] if @item.categories.empty?
57
- @item.categories.collect{|c| c.content}
57
+ @item.categories.collect{|c| c.content}.reject{|c| c == '' || c.match(/^\s+$/)}
58
58
  end
59
59
 
60
60
  # The category list as a string, joined with a comma.
@@ -38,7 +38,7 @@ module FeedAbstractMixins
38
38
  # An array of author names
39
39
  def authors
40
40
  return [] if @source.authors.empty?
41
- @source.authors.collect{|au| au.name.content}
41
+ @source.authors.collect{|au| au.name.content}.reject{|au| au == '' || au.match(/^\s+$/)}
42
42
  end
43
43
 
44
44
  # The authors list as a string, joined with a comma.
@@ -50,7 +50,7 @@ module FeedAbstractMixins
50
50
  # The categories list as an array.
51
51
  def categories
52
52
  return [] if @source.categories.empty?
53
- @source.categories.collect{|c| c.term}
53
+ @source.categories.collect{|c| c.term}.reject{|c| c == '' || c.match(/^\s+$/)}
54
54
  end
55
55
 
56
56
  # The categories list as a string joined with a comma.
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module FeedAbstract
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
@@ -17,6 +17,7 @@ module FeedAbstract
17
17
  it { @delicious.channel.should respond_to att}
18
18
  it { @zotero.channel.should respond_to att}
19
19
  it { @feedburner.channel.should respond_to att}
20
+ it { @pyblosxom.channel.should respond_to att}
20
21
 
21
22
  it { @docatom.channel.send(att).should_not == false}
22
23
  it { @kpgatom.channel.send(att).should_not == false}
@@ -26,6 +27,7 @@ module FeedAbstract
26
27
  it { @delicious.channel.send(att).should_not == false}
27
28
  it { @zotero.channel.send(att).should_not == false}
28
29
  it { @feedburner.channel.send(att).should_not == false}
30
+ it { @pyblosxom.channel.send(att).should_not == false}
29
31
  end
30
32
 
31
33
  it "should have the correct title" do
@@ -37,6 +39,7 @@ module FeedAbstract
37
39
  @delicious.channel.title.should == 'Delicious/djcp'
38
40
  @zotero.channel.title.should == 'Zotero / PROS Paper Group / Items'
39
41
  @feedburner.channel.title.should == 'CNN.com'
42
+ @pyblosxom.channel.title.should == 'Copyrighteous'
40
43
  end
41
44
 
42
45
  it "should have the correct subtitle and description" do
@@ -63,6 +66,9 @@ module FeedAbstract
63
66
 
64
67
  @feedburner.channel.description.should == 'CNN.com delivers up-to-the-minute news and information on the latest top stories, weather, entertainment, politics and more.'
65
68
  @feedburner.channel.subtitle.should == 'CNN.com delivers up-to-the-minute news and information on the latest top stories, weather, entertainment, politics and more.'
69
+
70
+ @pyblosxom.channel.description.should == "\n\n"
71
+ @pyblosxom.channel.subtitle.should == "\n\n"
66
72
  end
67
73
 
68
74
  it "should have the correct link" do
@@ -74,6 +80,7 @@ module FeedAbstract
74
80
  @delicious.channel.link.should == 'http://www.delicious.com/djcp'
75
81
  @zotero.channel.link.should == 'https://api.zotero.org/groups/52650/items'
76
82
  @feedburner.channel.link.should == 'http://www.cnn.com/?eref=rss_topstories'
83
+ @pyblosxom.channel.link.should == 'http://mako.cc/copyrighteous'
77
84
  end
78
85
 
79
86
  it "should have the correct generator" do
@@ -85,6 +92,7 @@ module FeedAbstract
85
92
  @delicious.channel.generator.should == 'Delicious'
86
93
  @zotero.channel.generator.should == 'Zotero'
87
94
  @feedburner.channel.generator.should == ''
95
+ @pyblosxom.channel.generator.should == "\nPyBlosxom http://pyblosxom.sourceforge.net/ 1.5rc2 20100803\n"
88
96
  end
89
97
 
90
98
  it "should have the correct language" do
@@ -96,6 +104,7 @@ module FeedAbstract
96
104
  @delicious.channel.language.should == ''
97
105
  @zotero.channel.language.should == ''
98
106
  @feedburner.channel.language.should == 'en-us'
107
+ @pyblosxom.channel.language.should == 'en'
99
108
  end
100
109
 
101
110
  it "should have the correct authors" do
@@ -107,6 +116,7 @@ module FeedAbstract
107
116
  @delicious.channel.authors.should == []
108
117
  @zotero.channel.authors.should == []
109
118
  @feedburner.channel.authors.should == []
119
+ @pyblosxom.channel.authors.should == ['Benjamin Mako Hill']
110
120
 
111
121
  @docatom.channel.author.should == 'Doc Searls'
112
122
  @kpgatom.channel.author.should == 'Nick Pappas'
@@ -116,6 +126,7 @@ module FeedAbstract
116
126
  @delicious.channel.author.should == ''
117
127
  @zotero.channel.author.should == ''
118
128
  @feedburner.channel.author.should == ''
129
+ @pyblosxom.channel.author.should == 'Benjamin Mako Hill'
119
130
 
120
131
  end
121
132
 
@@ -128,15 +139,17 @@ module FeedAbstract
128
139
  @delicious.channel.categories.should == []
129
140
  @zotero.channel.categories.should == []
130
141
  @feedburner.channel.categories.should == []
142
+ @pyblosxom.channel.categories.should == []
131
143
 
132
144
  @docatom.channel.category.should == ''
133
145
  @kpgatom.channel.category.should == 'photos'
134
- @djcprss2.channel.category.should == 'Tech, Open Source'
146
+ @djcprss2.channel.category.should == 'Tech, Open Source, oa.africa, oa.test'
135
147
  @djcprss92.channel.category.should == ''
136
148
  @oa.channel.category.should == 'oa.africa, oa.test'
137
149
  @delicious.channel.category.should == ''
138
150
  @zotero.channel.category.should == ''
139
151
  @feedburner.channel.category.should == ''
152
+ @pyblosxom.channel.category.should == ''
140
153
  end
141
154
 
142
155
  it "should have the correct icon" do
@@ -148,6 +161,7 @@ module FeedAbstract
148
161
  @delicious.channel.icon.should == ''
149
162
  @zotero.channel.icon.should == ''
150
163
  @feedburner.channel.icon.should == 'http://i2.cdn.turner.com/cnn/.element/img/1.0/logo/cnn.logo.rss.gif'
164
+ @pyblosxom.channel.icon.should == ''
151
165
  end
152
166
 
153
167
  it "should have the correct logo" do
@@ -159,6 +173,7 @@ module FeedAbstract
159
173
  @delicious.channel.logo.should == ''
160
174
  @zotero.channel.logo.should == ''
161
175
  @feedburner.channel.logo.should == 'http://i2.cdn.turner.com/cnn/.element/img/1.0/logo/cnn.logo.rss.gif'
176
+ @pyblosxom.channel.logo.should == ''
162
177
  end
163
178
 
164
179
  it "should have the correct rights" do
@@ -170,6 +185,7 @@ module FeedAbstract
170
185
  @delicious.channel.rights.should == ''
171
186
  @zotero.channel.rights.should == ''
172
187
  @feedburner.channel.rights.should == ' 2011 Cable News Network LP, LLLP.'
188
+ @pyblosxom.channel.rights.should == 'Creative Commons Attribution-ShareAlike'
173
189
  end
174
190
 
175
191
  it "should have the correct updated value" do
@@ -181,6 +197,7 @@ module FeedAbstract
181
197
  @delicious.channel.updated.should == ''
182
198
  @zotero.channel.updated.should == Time.parse('2011-09-02T17:16:11Z')
183
199
  @feedburner.channel.updated.should == Time.parse('Sat, 03 Sep 2011 16:14:16 EDT')
200
+ @pyblosxom.channel.updated.should == Time.parse('2011-09-15T05:21:00Z')
184
201
  end
185
202
 
186
203
  it "should have the correct guid" do
@@ -192,6 +209,7 @@ module FeedAbstract
192
209
  @delicious.channel.guid.should == 'http://www.delicious.com/djcp'
193
210
  @zotero.channel.guid.should == 'http://zotero.org/groups/52650/items'
194
211
  @feedburner.channel.guid.should == 'http://www.cnn.com/?eref=rss_topstories'
212
+ @pyblosxom.channel.guid.should == 'http://mako.cc/copyrighteous/'
195
213
  end
196
214
  end
197
215
  end
@@ -30,6 +30,8 @@ module FeedAbstract
30
30
  @deliciousitem.title.should == 'aspic and other delights'
31
31
  @zoteroitem.title.should == 'An experimental application of the Delphi method to the use of experts'
32
32
  @feedburneritem.title.should == 'Did Libya help CIA with renditions of terror suspects?'
33
+ @pyblosxomitem.title.should == "Anxiety\n"
34
+
33
35
  end
34
36
 
35
37
  it "should have the correct summary" do
@@ -44,6 +46,8 @@ module FeedAbstract
44
46
  @feedburneritem.summary.should == %q|Documents seized at Libyan intelligence headquarters have unearthed insights into the CIA's surprisingly close relationship with counterparts in the Gadhafi regime.<div class="feedflare">
45
47
  <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=sV5N-C76mOM:9JZ1FBt9fS4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=sV5N-C76mOM:9JZ1FBt9fS4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=sV5N-C76mOM:9JZ1FBt9fS4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?i=sV5N-C76mOM:9JZ1FBt9fS4:V_sGLiPBpWU" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=sV5N-C76mOM:9JZ1FBt9fS4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=qj6IDK7rITs" border="0"></img></a> <a href="http://rss.cnn.com/~ff/rss/cnn_topstories?a=sV5N-C76mOM:9JZ1FBt9fS4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/rss/cnn_topstories?i=sV5N-C76mOM:9JZ1FBt9fS4:gIN9vFwOqvQ" border="0"></img></a>
46
48
  </div><img src="http://feeds.feedburner.com/~r/rss/cnn_topstories/~4/sV5N-C76mOM" height="1" width="1"/>|
49
+
50
+ @pyblosxomitem.summary.should == ""
47
51
  end
48
52
 
49
53
  it "should have the correct content" do
@@ -93,6 +97,7 @@ module FeedAbstract
93
97
  </table>
94
98
  </div>|
95
99
  @feedburneritem.content.should == ''
100
+ @pyblosxomitem.content.should == %Q|<div><a href='http://www.flickr.com/photos/nffcnnr/401047557/' target='_blank'><img src='http://farm1.static.flickr.com/137/401047557_1dda26e16f.jpg' width=350 alt='MailBoxes by nffcnnr, on Flickr' title='MailBoxes by nffcnnr, on Flickr' border='0'/></a><br/><a href='http://creativecommons.org/licenses/by/2.0/' target='_blank'><img src='http://i.creativecommons.org/l/by/2.0/80x15.png' alt='Creative Commons Attribution 2.0 Generic License' title='Creative Commons Attribution 2.0 Generic License' border='0' align='left'></a>&nbsp;&nbsp;by&nbsp;<a href='http://www.flickr.com/people/nffcnnr/' target='_blank'>&nbsp;nffcnnr</a><a href='http://www.imagecodr.org/' target='_blank'>&nbsp;</a></div><p>I am haunted by the nagging fear that I have mailboxes, tucked into a\ndark corner of an office somewhere, and perhaps even full of checks\nand important documents, that I don't know exist.</p>\n|
96
101
  end
97
102
 
98
103
  it "should have the correct link" do
@@ -103,6 +108,7 @@ module FeedAbstract
103
108
  @deliciousitem.link.should == 'http://aspicandotherdelights.tumblr.com/'
104
109
  @zoteroitem.link.should == 'https://api.zotero.org/groups/52650/items/FHDJ5PXZ'
105
110
  @feedburneritem.link.should == 'http://rss.cnn.com/~r/rss/cnn_topstories/~3/sV5N-C76mOM/index.html'
111
+ @pyblosxomitem.link.should == 'http://mako.cc/copyrighteous/20110913-00'
106
112
  end
107
113
 
108
114
  it "should have the correct author" do
@@ -113,6 +119,7 @@ module FeedAbstract
113
119
  @deliciousitem.author.should == 'djcp'
114
120
  @zoteroitem.author.should == 'ingle.atul'
115
121
  @feedburneritem.author.should == ''
122
+ @pyblosxomitem.author.should == ''
116
123
  end
117
124
 
118
125
  it "should have the correct authors" do
@@ -123,6 +130,7 @@ module FeedAbstract
123
130
  @deliciousitem.authors.should == ['djcp']
124
131
  @zoteroitem.authors.should == ['ingle.atul']
125
132
  @feedburneritem.authors.should == []
133
+ @pyblosxomitem.authors.should == []
126
134
  end
127
135
 
128
136
  it "should have the correct contributor" do
@@ -133,6 +141,7 @@ module FeedAbstract
133
141
  @deliciousitem.contributor.should == ''
134
142
  @zoteroitem.contributor.should == ''
135
143
  @feedburneritem.contributor.should == ''
144
+ @pyblosxomitem.contributor.should == ''
136
145
  end
137
146
 
138
147
  it "should have the correct contributors" do
@@ -143,6 +152,7 @@ module FeedAbstract
143
152
  @deliciousitem.contributors.should == []
144
153
  @zoteroitem.contributors.should == []
145
154
  @feedburneritem.contributors.should == []
155
+ @pyblosxomitem.contributors.should == []
146
156
  end
147
157
 
148
158
  it "should have the correct category" do
@@ -153,6 +163,7 @@ module FeedAbstract
153
163
  @deliciousitem.category.should == 'cooking, oddness'
154
164
  @zoteroitem.category.should == ''
155
165
  @feedburneritem.category.should == ''
166
+ @pyblosxomitem.category.should == ''
156
167
  end
157
168
 
158
169
  it "should have the correct categories" do
@@ -163,6 +174,7 @@ module FeedAbstract
163
174
  @deliciousitem.categories.should == ['cooking', 'oddness']
164
175
  @zoteroitem.categories.should == []
165
176
  @feedburneritem.categories.should == []
177
+ @pyblosxomitem.categories.should == []
166
178
  end
167
179
 
168
180
  it "should have the correct rights" do
@@ -173,6 +185,7 @@ module FeedAbstract
173
185
  @deliciousitem.rights.should == ''
174
186
  @zoteroitem.rights.should == ''
175
187
  @feedburneritem.rights.should == ''
188
+ @pyblosxomitem.rights.should == ''
176
189
  end
177
190
 
178
191
  it "should have been updated at the correct time" do
@@ -183,6 +196,7 @@ module FeedAbstract
183
196
  @deliciousitem.updated.should == Time.parse('Fri, 19 Aug 2011 00:56:26 +0000')
184
197
  @zoteroitem.updated.should == Time.parse('2011-09-02T17:16:11Z')
185
198
  @feedburneritem.updated.should == Time.parse('Sat, 03 Sep 2011 16:11:39 EDT')
199
+ @pyblosxomitem.updated.should == Time.parse('2011-09-15T05:21:00Z')
186
200
  end
187
201
 
188
202
  it "should have been published at the proper time" do
@@ -193,6 +207,7 @@ module FeedAbstract
193
207
  @deliciousitem.published.should == Time.parse('Fri, 19 Aug 2011 00:56:26 +0000')
194
208
  @zoteroitem.published.should == Time.parse('2011-09-02T17:14:22Z')
195
209
  @feedburneritem.published.should == Time.parse('Sat, 03 Sep 2011 16:11:39 EDT')
210
+ @pyblosxomitem.published.should == Time.parse('2011-09-15T05:21:00Z')
196
211
  end
197
212
 
198
213
  it "should have the proper guid" do
@@ -203,6 +218,7 @@ module FeedAbstract
203
218
  @deliciousitem.guid.should == 'http://www.delicious.com/url/6e0504ca698232809a0b5065e8b83031#djcp'
204
219
  @zoteroitem.guid.should == 'http://zotero.org/groups/pros_paper/items/FHDJ5PXZ'
205
220
  @feedburneritem.guid.should == 'http://www.cnn.com/2011/WORLD/africa/09/03/libya.west.spies/index.html?eref=rss_topstories'
221
+ @pyblosxomitem.guid.should == 'http://mako.cc/copyrighteous/2011/09/15/20110913-00'
206
222
  end
207
223
 
208
224
  end
@@ -15,6 +15,7 @@ module FeedAbstract
15
15
  it "should recognize atom feeds properly" do
16
16
  @docatom.channel.class.should == Channel::Atom
17
17
  @kpgatom.channel.class.should == Channel::Atom
18
+ @pyblosxom.channel.class.should == Channel::Atom
18
19
  end
19
20
 
20
21
  it "should recognize rss feeds properly" do
data/spec/spec_helper.rb CHANGED
@@ -12,8 +12,9 @@ def instantiate_feeds
12
12
  @delicious = FeedAbstract::Feed.new(File.open('spec/test_data/djcp_delicious.rss'))
13
13
  @zotero = FeedAbstract::Feed.new(File.open('spec/test_data/zotero.rss'))
14
14
  @feedburner = FeedAbstract::Feed.new(File.open('spec/test_data/feedburner.rss'))
15
+ @pyblosxom = FeedAbstract::Feed.new(File.open('spec/test_data/pyblosxom.atom'))
15
16
 
16
- @all_feeds = [@docatom, @kpgatom, @djcprss2, @djcprss92, @oa, @delicious, @zotero, @feedburner]
17
+ @all_feeds = [@docatom, @kpgatom, @djcprss2, @djcprss92, @oa, @delicious, @zotero, @feedburner,@pyblosxom]
17
18
  end
18
19
 
19
20
  def instantiate_example_items
@@ -24,4 +25,5 @@ def instantiate_example_items
24
25
  @deliciousitem = @delicious.items.first
25
26
  @zoteroitem = @zotero.items.first
26
27
  @feedburneritem = @feedburner.items.first
28
+ @pyblosxomitem = @pyblosxom.items.first
27
29
  end