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 +1 -1
- data/lib/microformat.rb +1 -1
- data/test/fixtures/stoneship.html +1 -1
- data/test/hcard_test.rb +5 -1
- metadata +1 -1
data/Rakefile
CHANGED
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
|
-
|
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’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
|
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
|