зеркало из https://github.com/github/ruby.git
* lib/rss/dublincore.rb (RSS::DublicCoreModel#date{,=}): added
convenient methods. * lib/rss/0.9.rb (RSS::Rss::Channel#date{,=}): ditto. * lib/rss/2.0.rb (RSS::Rss::Channel::Item#date{,=}): ditto. * test/rss/: added tests for the convenient methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8b8973761c
Коммит
1a22e46d60
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Sun Feb 13 23:13:46 2005 Kouhei Sutou <kou@cozmixng.org>
|
||||
|
||||
* lib/rss/dublincore.rb (RSS::DublicCoreModel#date{,=}): added
|
||||
convenient methods.
|
||||
|
||||
* lib/rss/0.9.rb (RSS::Rss::Channel#date{,=}): ditto.
|
||||
|
||||
* lib/rss/2.0.rb (RSS::Rss::Channel::Item#date{,=}): ditto.
|
||||
|
||||
* test/rss/: added tests for the convenient methods.
|
||||
|
||||
Sun Feb 13 23:12:47 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_thread_start_0): restore prot_tag before rewinding.
|
||||
|
|
|
@ -113,6 +113,8 @@ module RSS
|
|||
install_date_element(x, 'rfc822')
|
||||
install_model(x, occurs)
|
||||
end
|
||||
alias date pubDate
|
||||
alias date= pubDate=
|
||||
|
||||
[
|
||||
["skipDays", "?"],
|
||||
|
|
|
@ -78,6 +78,8 @@ EOT
|
|||
install_date_element(x, 'rfc822')
|
||||
install_model(x, occurs)
|
||||
end
|
||||
alias date pubDate
|
||||
alias date= pubDate=
|
||||
|
||||
[
|
||||
["guid", '?'],
|
||||
|
|
|
@ -26,6 +26,8 @@ module RSS
|
|||
%w(date).each do |x|
|
||||
install_date_element("\#{DC_PREFIX}_\#{x}", 'w3cdtf', x)
|
||||
end
|
||||
alias date #{DC_PREFIX}_date
|
||||
alias date= #{DC_PREFIX}_date=
|
||||
EOC
|
||||
end
|
||||
|
||||
|
|
|
@ -90,6 +90,11 @@ EOR
|
|||
end
|
||||
@rss.send(parent).send("dc_#{name}=", t.iso8601)
|
||||
assert_equal(t, @rss.send(parent).send("dc_#{name}"))
|
||||
assert_equal(t, @rss.send(parent).date)
|
||||
|
||||
@rss.send(parent).date = value
|
||||
assert_equal(value, @rss.send(parent).date)
|
||||
assert_equal(value, @rss.send(parent).send("dc_#{name}"))
|
||||
else
|
||||
@rss.send(parent).send("dc_#{name}=", new_value)
|
||||
assert_equal(new_value, @rss.send(parent).send("dc_#{name}"))
|
||||
|
|
|
@ -102,6 +102,7 @@ module RSS
|
|||
assert_equal(rating, channel.rating)
|
||||
assert_equal(docs, channel.docs)
|
||||
assert_equal(pubDate, channel.pubDate)
|
||||
assert_equal(pubDate, channel.date)
|
||||
assert_equal(lastBuildDate, channel.lastBuildDate)
|
||||
|
||||
skipDays.each_with_index do |day, i|
|
||||
|
|
|
@ -110,6 +110,7 @@ module RSS
|
|||
assert_equal(rating, channel.rating)
|
||||
assert_equal(docs, channel.docs)
|
||||
assert_equal(pubDate, channel.pubDate)
|
||||
assert_equal(pubDate, channel.date)
|
||||
assert_equal(lastBuildDate, channel.lastBuildDate)
|
||||
|
||||
skipDays.each_with_index do |day, i|
|
||||
|
@ -385,6 +386,7 @@ module RSS
|
|||
assert_equal("#{author}#{i}", item.author)
|
||||
assert_equal("#{comments}#{i}", item.comments)
|
||||
assert_equal(pubDate, item.pubDate)
|
||||
assert_equal(pubDate, item.date)
|
||||
end
|
||||
|
||||
rss = RSS::Maker.make("2.0") do |maker|
|
||||
|
@ -411,6 +413,7 @@ module RSS
|
|||
assert_equal("#{author}#{i}", item.author)
|
||||
assert_equal("#{comments}#{i}", item.comments)
|
||||
assert_equal(pubDate, item.pubDate)
|
||||
assert_equal(pubDate, item.date)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче