mofo 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
3
 
4
- version = '0.2.3'
4
+ version = '0.2.4'
5
5
  svn_repo = 'svn+ssh://chris@errtheblog.com/svn/projects/mofo'
6
6
 
7
7
  begin
data/lib/microformat.rb CHANGED
@@ -234,7 +234,7 @@ class Microformat
234
234
  when 'a' then element['href']
235
235
  when 'object' then element['value']
236
236
  end
237
- url[/^http/] ? url : @base_url.to_s + url
237
+ url[/^http/] ? url : @base_url.to_s + url if url.respond_to?(:[])
238
238
  elsif target.is_a? Array
239
239
  target.inject(nil) do |found, klass|
240
240
  klass = klass.respond_to?(:find) ? klass : nil
@@ -60,7 +60,7 @@
60
60
  <h3>The Interview <a href="#interview" class="permalink" rel="bookmark">#</a></h3>
61
61
 
62
62
  <ol class="interview">
63
- <li class="question"><cite class="sender vcard"><span class="nickname">Zeus12345</span></cite>: <q>Will we be able to visit any parts of D&#8217;ni in Uru Prime?</q></li>
63
+ <li class="question"><cite class="sender vcard"><span class="nickname">Zeus12345</span><span class="logo"><img src="/some/logo.gif" /></cite>: <q>Will we be able to visit any parts of D&#8217;ni in Uru Prime?</q></div></li>
64
64
  <li class="answer"><cite class="sender vcard"><span class="fn">Rand Miller</span></cite>: <q> Yep! The DRC is making some parts of the cavern available. Small areas at first and then more as time passes.</q></li>
65
65
 
66
66
  <li class="question"><cite class="sender vcard"><span class="nickname">Coren</span></cite>: <q>Will we be able to create our own ages?</q></li>
data/test/hcard_test.rb CHANGED
@@ -112,11 +112,15 @@ context "The parsed Stoneship hCard objects" do
112
112
  $stoneship ||= HCard.find(:all => fixture(:stoneship))
113
113
  end
114
114
 
115
- specify "should ony have String nicknames" do
115
+ specify "should only have String nicknames" do
116
116
  $stoneship.collect { |h| h.nickname }.compact.uniq.each do |nickname|
117
117
  nickname.should.be.an.instance_of String
118
118
  end
119
119
  end
120
+
121
+ specify "should ignore broken urls" do
122
+ $stoneship.first.logo.should.be.nil
123
+ end
120
124
  end
121
125
 
122
126
  context "The parsed simple hCard object" do
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: mofo
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.3
6
+ version: 0.2.4
7
7
  date: 2007-04-30 00:00:00 -07:00
8
8
  summary: mofo is a ruby microformat parser
9
9
  require_paths: