diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-02 06:45:53 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-02 06:45:53 +0000 |
commit | 4fab2c7526c160bef4db28871864c53c60a6c587 (patch) | |
tree | c44b5c4c7419fbd7542760e29ce3f8ab517e4ebe | |
parent | f3e3ce4c8241e1c6aa2afca5468d7fb69b93c47b (diff) |
* lib/rss/rss.rb, test/rss/test_version.rb: 0.2.1 -> 0.2.2.
* lib/rss/maker/itunes.rb: fixed new_itunes_category.
* lib/rss/maker/taxonomy.rb: new_taxo_topic -> new_topic because
of consistency.
* test/rss/test_maker_itunes.rb, test/rss/test_itunes.rb: removed
needless UTF-8 characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | lib/rss/maker/itunes.rb | 6 | ||||
-rw-r--r-- | lib/rss/maker/taxonomy.rb | 3 | ||||
-rw-r--r-- | lib/rss/parser.rb | 5 | ||||
-rw-r--r-- | lib/rss/rss.rb | 2 | ||||
-rw-r--r-- | test/rss/test_itunes.rb | 2 | ||||
-rw-r--r-- | test/rss/test_version.rb | 2 |
7 files changed, 22 insertions, 9 deletions
@@ -1,3 +1,14 @@ +Sun Dec 2 15:42:16 2007 Kouhei Sutou <[email protected]> + + * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.1 -> 0.2.2. + + * lib/rss/maker/itunes.rb: fixed new_itunes_category. + * lib/rss/maker/taxonomy.rb: new_taxo_topic -> new_topic because + of consistency. + + * test/rss/test_maker_itunes.rb, test/rss/test_itunes.rb: removed + needless UTF-8 characters. + Sun Dec 2 15:18:37 2007 Koichi Sasada <[email protected]> * insnhelper.ci (vm_callee_setup_arg): fix error message. diff --git a/lib/rss/maker/itunes.rb b/lib/rss/maker/itunes.rb index f02db28824..7c5049129d 100644 --- a/lib/rss/maker/itunes.rb +++ b/lib/rss/maker/itunes.rb @@ -27,7 +27,7 @@ module RSS full_plural_name = "#{RSS::ITUNES_PREFIX}_#{plural_name}" klass_name = "ITunes#{Utils.to_class_name(name)}" plural_klass_name = "ITunes#{Utils.to_class_name(plural_name)}" - def_elements_class_accessor(klass, full_name, full_plural_name, + def_elements_class_accessor(klass, name, full_name, full_plural_name, klass_name, plural_klass_name, recommended_attribute_name) end @@ -55,7 +55,7 @@ module RSS klass.def_csv_element(full_name) end - def def_elements_class_accessor(klass, full_name, full_plural_name, + def def_elements_class_accessor(klass, name, full_name, full_plural_name, klass_name, plural_klass_name, recommended_attribute_name=nil) if recommended_attribute_name @@ -66,7 +66,7 @@ module RSS end klass.module_eval(<<-EOC, __FILE__, __LINE__ + 1) def new_#{full_name}(text=nil) - #{full_name} = @#{full_plural_name}.new_#{full_name} + #{full_name} = @#{full_plural_name}.new_#{name} #{full_name}.text = text if block_given? yield #{full_name} diff --git a/lib/rss/maker/taxonomy.rb b/lib/rss/maker/taxonomy.rb index 798b239df9..211603840f 100644 --- a/lib/rss/maker/taxonomy.rb +++ b/lib/rss/maker/taxonomy.rb @@ -66,7 +66,8 @@ EOC end class TaxonomyTopicsBase < Base - def_array_element("taxo_topic", nil, "TaxonomyTopic") + def_array_element("topic", nil, "TaxonomyTopic") + alias_method(:new_taxo_topic, :new_topic) # For backward compatibility class TaxonomyTopicBase < Base include DublinCoreModel diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index 5856bddf29..b716dd8bdf 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -365,8 +365,9 @@ module RSS def start_else_element(local, prefix, attrs, ns) class_name = self.class.class_name(_ns(ns, prefix), local) current_class = @last_element.class - if current_class.const_defined?(class_name, false) or - current_class.constants.include?(class_name.to_sym) + if class_name and + (current_class.const_defined?(class_name, false) or + current_class.constants.include?(class_name.to_sym)) next_class = current_class.const_get(class_name) start_have_something_element(local, prefix, attrs, ns, next_class) else diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index 93fe24d562..0242a2a6a4 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -53,7 +53,7 @@ require "rss/xml-stylesheet" module RSS - VERSION = "0.2.1" + VERSION = "0.2.2" URI = "http://purl.org/rss/1.0/" diff --git a/test/rss/test_itunes.rb b/test/rss/test_itunes.rb index 3663e2c77a..283459d910 100644 --- a/test/rss/test_itunes.rb +++ b/test/rss/test_itunes.rb @@ -338,7 +338,7 @@ module RSS "of your answers here.", readers, &rss20_maker) _assert_itunes_summary("This week we talk about surviving in a " + - "Red state if you’re a Blue person. Or " + + "Red state if you're a Blue person. Or " + "vice versa.", readers, &rss20_maker) end diff --git a/test/rss/test_version.rb b/test/rss/test_version.rb index 5605638434..a602caf103 100644 --- a/test/rss/test_version.rb +++ b/test/rss/test_version.rb @@ -3,7 +3,7 @@ require "rss-testcase" module RSS class TestVersion < TestCase def test_version - assert_equal("0.2.1", ::RSS::VERSION) + assert_equal("0.2.2", ::RSS::VERSION) end end end |