mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/branches/ruby_1_8@7965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2847325f99
commit
cb375567f6
7 changed files with 26 additions and 0 deletions
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 22:43:03 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
Sun Feb 13 22:43:03 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
||||||
|
|
||||||
* lib/drb/drb.rb (DRbServer): add default_safe_level, safe_level,
|
* lib/drb/drb.rb (DRbServer): add default_safe_level, safe_level,
|
||||||
|
|
|
@ -113,6 +113,8 @@ module RSS
|
||||||
install_date_element(x, 'rfc822')
|
install_date_element(x, 'rfc822')
|
||||||
install_model(x, occurs)
|
install_model(x, occurs)
|
||||||
end
|
end
|
||||||
|
alias date pubDate
|
||||||
|
alias date= pubDate=
|
||||||
|
|
||||||
[
|
[
|
||||||
["skipDays", "?"],
|
["skipDays", "?"],
|
||||||
|
|
|
@ -78,6 +78,8 @@ EOT
|
||||||
install_date_element(x, 'rfc822')
|
install_date_element(x, 'rfc822')
|
||||||
install_model(x, occurs)
|
install_model(x, occurs)
|
||||||
end
|
end
|
||||||
|
alias date pubDate
|
||||||
|
alias date= pubDate=
|
||||||
|
|
||||||
[
|
[
|
||||||
["guid", '?'],
|
["guid", '?'],
|
||||||
|
|
|
@ -26,6 +26,8 @@ module RSS
|
||||||
%w(date).each do |x|
|
%w(date).each do |x|
|
||||||
install_date_element("\#{DC_PREFIX}_\#{x}", 'w3cdtf', x)
|
install_date_element("\#{DC_PREFIX}_\#{x}", 'w3cdtf', x)
|
||||||
end
|
end
|
||||||
|
alias date #{DC_PREFIX}_date
|
||||||
|
alias date= #{DC_PREFIX}_date=
|
||||||
EOC
|
EOC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,11 @@ EOR
|
||||||
end
|
end
|
||||||
@rss.send(parent).send("dc_#{name}=", t.iso8601)
|
@rss.send(parent).send("dc_#{name}=", t.iso8601)
|
||||||
assert_equal(t, @rss.send(parent).send("dc_#{name}"))
|
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
|
else
|
||||||
@rss.send(parent).send("dc_#{name}=", new_value)
|
@rss.send(parent).send("dc_#{name}=", new_value)
|
||||||
assert_equal(new_value, @rss.send(parent).send("dc_#{name}"))
|
assert_equal(new_value, @rss.send(parent).send("dc_#{name}"))
|
||||||
|
|
|
@ -102,6 +102,7 @@ module RSS
|
||||||
assert_equal(rating, channel.rating)
|
assert_equal(rating, channel.rating)
|
||||||
assert_equal(docs, channel.docs)
|
assert_equal(docs, channel.docs)
|
||||||
assert_equal(pubDate, channel.pubDate)
|
assert_equal(pubDate, channel.pubDate)
|
||||||
|
assert_equal(pubDate, channel.date)
|
||||||
assert_equal(lastBuildDate, channel.lastBuildDate)
|
assert_equal(lastBuildDate, channel.lastBuildDate)
|
||||||
|
|
||||||
skipDays.each_with_index do |day, i|
|
skipDays.each_with_index do |day, i|
|
||||||
|
|
|
@ -110,6 +110,7 @@ module RSS
|
||||||
assert_equal(rating, channel.rating)
|
assert_equal(rating, channel.rating)
|
||||||
assert_equal(docs, channel.docs)
|
assert_equal(docs, channel.docs)
|
||||||
assert_equal(pubDate, channel.pubDate)
|
assert_equal(pubDate, channel.pubDate)
|
||||||
|
assert_equal(pubDate, channel.date)
|
||||||
assert_equal(lastBuildDate, channel.lastBuildDate)
|
assert_equal(lastBuildDate, channel.lastBuildDate)
|
||||||
|
|
||||||
skipDays.each_with_index do |day, i|
|
skipDays.each_with_index do |day, i|
|
||||||
|
@ -385,6 +386,7 @@ module RSS
|
||||||
assert_equal("#{author}#{i}", item.author)
|
assert_equal("#{author}#{i}", item.author)
|
||||||
assert_equal("#{comments}#{i}", item.comments)
|
assert_equal("#{comments}#{i}", item.comments)
|
||||||
assert_equal(pubDate, item.pubDate)
|
assert_equal(pubDate, item.pubDate)
|
||||||
|
assert_equal(pubDate, item.date)
|
||||||
end
|
end
|
||||||
|
|
||||||
rss = RSS::Maker.make("2.0") do |maker|
|
rss = RSS::Maker.make("2.0") do |maker|
|
||||||
|
@ -411,6 +413,7 @@ module RSS
|
||||||
assert_equal("#{author}#{i}", item.author)
|
assert_equal("#{author}#{i}", item.author)
|
||||||
assert_equal("#{comments}#{i}", item.comments)
|
assert_equal("#{comments}#{i}", item.comments)
|
||||||
assert_equal(pubDate, item.pubDate)
|
assert_equal(pubDate, item.pubDate)
|
||||||
|
assert_equal(pubDate, item.date)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue