mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge r24865:23867 from trunk.
* NEWS, lib/rss/maker/base.rb, test/rss/test_maker_2.0.rb: add item.guid.permanent_link? and item.guid.permanent_link=. * NEWS: rss: 0.2.5 -> 0.2.7. * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.6 -> 0.2.7. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fb743c08aa
commit
7b998913fe
6 changed files with 45 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
Sat Jun 27 13:47:19 2009 Kouhei Sutou <kou@cozmixng.org>
|
||||
|
||||
* NEWS, lib/rss/maker/base.rb, test/rss/test_maker_2.0.rb: add
|
||||
item.guid.permanent_link? and item.guid.permanent_link=.
|
||||
|
||||
* NEWS: rss: 0.2.5 -> 0.2.7.
|
||||
|
||||
* lib/rss/rss.rb, test/rss/test_version.rb: 0.2.6 -> 0.2.7.
|
||||
|
||||
Fri Jun 26 11:02:28 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (CXX_EXT): cygwin's filesystem (= Windows) is case
|
||||
|
|
7
NEWS
7
NEWS
|
@ -144,7 +144,7 @@ with all sufficient information, see the ChangeLog file.
|
|||
|
||||
* rss
|
||||
|
||||
* 0.2.4 -> 0.2.5
|
||||
* 0.2.4 -> 0.2.7.
|
||||
|
||||
* RSS::Maker.make
|
||||
* raise an exception not returns nil for invalid feed making.
|
||||
|
@ -156,6 +156,11 @@ with all sufficient information, see the ChangeLog file.
|
|||
* RSS::Maker.supported?(version)
|
||||
* new method to check whether given version is supported.
|
||||
|
||||
* RSS::Maker: item.guid.permanent_link?
|
||||
* new alias of item.guid.isPermaLink
|
||||
* RSS::Maker: item.guid.permanent_link=
|
||||
* new alias of item.guid.isPermaLink=
|
||||
|
||||
* REXML
|
||||
|
||||
* REXML::Document.entity_expansion_limit=
|
||||
|
|
|
@ -746,6 +746,14 @@ module RSS
|
|||
attr_accessor element
|
||||
add_need_initialize_variable(element)
|
||||
end
|
||||
|
||||
def permanent_link?
|
||||
isPermaLink
|
||||
end
|
||||
|
||||
def permanent_link=(bool)
|
||||
self.isPermaLink = bool
|
||||
end
|
||||
end
|
||||
|
||||
class EnclosureBase < Base
|
||||
|
|
|
@ -53,7 +53,7 @@ require "rss/xml-stylesheet"
|
|||
|
||||
module RSS
|
||||
|
||||
VERSION = "0.2.6"
|
||||
VERSION = "0.2.7"
|
||||
|
||||
URI = "http://purl.org/rss/1.0/"
|
||||
|
||||
|
|
|
@ -488,6 +488,26 @@ module RSS
|
|||
assert_equal(content, guid.content)
|
||||
end
|
||||
|
||||
def test_guid_permanent_link
|
||||
content = "http://inessential.com/2002/09/01.php#a2"
|
||||
|
||||
rss = RSS::Maker.make("2.0") do |maker|
|
||||
setup_dummy_channel(maker)
|
||||
setup_dummy_item(maker)
|
||||
|
||||
guid = maker.items.last.guid
|
||||
assert_equal(nil, guid.permanent_link?)
|
||||
assert_equal(guid.isPermaLink, guid.permanent_link?)
|
||||
guid.permanent_link = true
|
||||
assert_equal(true, guid.permanent_link?)
|
||||
assert_equal(guid.isPermaLink, guid.permanent_link?)
|
||||
guid.content = content
|
||||
end
|
||||
guid = rss.channel.items.last.guid
|
||||
assert_equal(true, guid.isPermaLink)
|
||||
assert_equal(content, guid.content)
|
||||
end
|
||||
|
||||
def test_not_valid_guid
|
||||
content = "http://inessential.com/2002/09/01.php#a2"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ require "rss-testcase"
|
|||
module RSS
|
||||
class TestVersion < TestCase
|
||||
def test_version
|
||||
assert_equal("0.2.6", ::RSS::VERSION)
|
||||
assert_equal("0.2.7", ::RSS::VERSION)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue