1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

15 commits

Author SHA1 Message Date
kou
faeff623e0 * lib/rss/rss.rb (Hash#merge, Enumerable#sort_by): removed.
* lib/rss/rss.rb (RSS::RootElementMixin#to_xml): added.
  [ruby-talk:197284]

  We can convert RSS version easily like the following:
    rss10 = RSS::Parser.parse(File.read("1.0.rdf"))
    File.open("2.0.rss", "w") {|f| f.print(rss10.to_xml("2.0"))}

* test/rss/test_1.0.rb: added #to_xml test.
* test/rss/test_2.0.rb: ditto.

* test/rss/rss-testcase.rb: added some helper methods that
  generates sample RSS 2.0.

* sample/rss/convert.rb: added a sample script to convert RSS format.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 01:37:08 +00:00
kou
4a396a8b7a * lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/maker/taxonomy.rb: implemented taxonomy module for RSS
  Maker.
* lib/rss/taxonomy.rb: supported RSS Maker.
* lib/rss/maker.rb: added taxonomy module support.

* lib/rss/rss.rb: adjusted to other element API.
* lib/rss/1.0.rb: adjusted to other element API but backward
  compatibility is reserved.
* lib/rss/0.9.rb: ditto.

* test/rss/test_maker_taxo.rb: added test case for taxonomy module
  for RSS Maker.
* test/rss/test_setup_maker_1.0.rb: added tests for taxo:topic.

* test/rss/test_setup_maker_1.0.rb: added backward compatibility
  test.
* test/rss/test_setup_maker_0.9.rb: ditto.
* test/rss/test_setup_maker_2.0.rb: ditto.

* test/rss/rss-testcase.rb: added convenience method for setting
  up taxo:topic.
* test/rss/rss-assertions.rb: added assertion for taxo:topic.

* sample/rss/blend.rb: followed new API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 00:26:41 +00:00
kou
d953cb4324 * sample/rss/tdiary_plugin: removed. because the plugin
is imported in the tDiary plugin packages.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 13:16:32 +00:00
(no author)
c83264c3f9 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 06:14:49 +00:00
kou
aeac7335ea * lib/rss/rss.rb: moved copyright description to lib/rss.rb.
* lib/rss.rb: added for convenience.

* sample/rss/re_read.rb: added #to_s sample.

* sample/rss/blend.rb: use 'require "rss"' instead of 'require "rss/*"'.
* sample/rss/list_description.rb: ditto.
* sample/rss/rss_recent.rb: ditto.
* sample/rss/tdiary-plugin/rss-recent.rb: ditto.

* sample/rss/tdiary-plugin/rss-recent.rb: 0.0.6 -> 0.0.7.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 06:14:48 +00:00
kou
c1445968f6 * sample/rss/tdiary_plugin/rss-recent.rb (rss_recent_cache_rss):
use the first date information of items as site date information
  if channel doesn't have date information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-16 08:04:50 +00:00
(no author)
c91bc62162 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-09 05:47:34 +00:00
kou
837d5acbd4 * sample/rss/tdiary_plugin/rss-recent.rb: supported configuration
via Web browser.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-09 05:47:33 +00:00
kou
80861909e6 * lib/rss: backoported from HEAD.
* lib/rss: refactored.
  - gave a name to 'x'.
  - undef_method -> remove_method for avoiding a warning in ruby 1.6.


* lib/rss/parser.rb: @@setter -> @@setters.

* lib/rss/parser.rb
  (RSS::BaseListener.register_uri)
  (RSS::BaseListener.uri_registered?)
  (RSS::BaseListener.install_get_text_element):
  swapped the first argument and the second argument.

* lib/rss/taxonomy.rb: swapped the first argument and the second
  argument for RSS::BaseListener.install_get_text_element.
* lib/rss/image.rb: ditto.
* lib/rss/syndication.rb: ditto.
* lib/rss/dublincore.rb: ditto.
* lib/rss/parser.rb: ditto.
* lib/rss/1.0.rb: ditto.
* lib/rss/2.0.rb: ditto.
* lib/rss/0.9.rb: ditto.
* lib/rss/content.rb: ditto.

* lib/rss/parser.rb
  (RSS::BaseListener.install_setter)
  (RSS::BaseListener.register_uri): changed fallback way.

* lib/rss/parser.rb: added class name registry for complex model
  elements. (ex. have childlen elements, have some attributes and
  a child element and so on.)


* lib/rss/dublincore.rb: supported multiple Dublin Core items.
* lib/rss/maker/dublincore.rb: ditto.
* lib/rss/maker/image.rb: supproted new Dublin Core API.
* lib/rss/maker/base.rb: added default current_element implementation.
* lib/rss/trackback.rb (RSS::TrackBackUtils.new_with_value_if_need):
  moved to RSS::Utils.

* lib/rss/utils.rb (RSS::Utils.new_with_value_if_need):
  moved from RSS::TrackBackUtils.

* lib/rss/maker/image.rb: fixed invalid argument of
  add_need_initialize_variable bug.
* lib/rss/maker/trackback.rb: ditto.

* lib/rss/rss.rb (Hash#merge): added for ruby 1.6.
* lib/rss/rss.rb (RSS::BaseModel.date_writer): changed to accept nil
  for date value.


* test/test_dublincore.rb: added tests for plural accessor and
  multiple Dublin Core items.

* test/test_setup_maker_1.0.rb: fixed swapped actual and expected
  values.

* test/rss/rss-assertions.rb (assert_multiple_dublin_core): added
  an assertion for testing multiple Dublin Core items.

* test/rss/test_maker_dc.rb (test_rss10_multiple): added a test
  for making multiple Dublin Core items.

* test/rss/test_maker_dc.rb (test_date): added a test for #date=
  and #dc_date=.


* sample/rss/tdiary_plugin/rss-recent.rb:
  new option: @options['rss-recent.use-image-link']:
  use image as link instread of text if available.

* sample/rss/tdiary_plugin/rss-recent.rb (RSS_RECENT_VERSION):
  0.0.5 -> 0.0.6.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-09 03:09:52 +00:00
kou
7113425b7f * sample/rss/tdiary_plugin/rss-recent.rb: added site information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-03 02:52:55 +00:00
kou
bcf72db844 * lib/rss, test/rss, sample/rss: backported from CVS HEAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 12:58:36 +00:00
(no author)
9a851dc157 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 06:22:42 +00:00
kou
278b27a1a9 * sample/rss/tdiary_plugin/rss-recent.rb: supported Hiki.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-27 13:40:47 +00:00
(no author)
d26fe5ce2e This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-27 03:23:29 +00:00
(no author)
84035542b7 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-01 16:09:55 +00:00