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

22 commits

Author SHA1 Message Date
kou
3e621acadc * lib/rss/parser.rb, lib/rss/utils.rb: added documents.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-19 14:54:52 +00:00
kou
36237de137 * lib/rss/parser.rb: updated documents by a patch from
Hugh Sasse <hgs at dmu.ac.uk>. [ruby-core:8194]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-13 11:35:17 +00:00
kou
6cfd4dd122 * lib/rss/rss.rb: automatically detected attributes.
* lib/rss/0.9.rb: removed #_attrs.
* lib/rss/1.0.rb: ditto.
* lib/rss/2.0.rb: ditto.
* lib/rss/image.rb: ditto.
* lib/rss/taxonomy.rb: ditto.
* lib/rss/trackback.rb: ditto.

* lib/rss/parser.rb: followed new internal API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-18 15:06:55 +00:00
kou
63c3fd6aa2 * lib/rss/rss.rb: RSS::Element#initialize accepts initial
attributes.
* lib/rss/0.9.rb: ditto.
* lib/rss/1.0.rb: ditto.
* lib/rss/2.0.rb: ditto.
* lib/rss/dublincore.rb: ditto.
* lib/rss/image.rb: ditto.
* lib/rss/taxonomy.rb: ditto.
* lib/rss/trackback.rb: ditto.

* lib/rss/utils.rb: added Utils.element_initialize_arguments? to
  detect backward compatibility initial arguments.

* lib/rss/parser.rb: user initial attributes to initialize
  RSS::Element.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-18 13:42:43 +00:00
kou
c849d2692b * lib/rss/rss.rb: improved ignore_unknown_element
handling. RSS::NotExpectedTagError provides tag URI.
* lib/rss/parser.rb: ditto.
* lib/rss/0.9.rb: ditto.
* lib/rss/1.0.rb: ditto.
* lib/rss/content.rb: ditto.
* lib/rss/dublincore.rb: ditto.
* lib/rss/image.rb: ditto.
* lib/rss/syndication.rb: ditto.
* lib/rss/taxonomy.rb: ditto.
* lib/rss/trackback.rb: ditto.

* test/rss/rss-assertions.rb: checked URI of not expected tag too.
* test/rss/test_parser.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-18 09:22:12 +00:00
kou
e49a4c952c * lib/rss/rss.rb: changed empty namespace URI representation to ""
from nil.
* lib/rss/parser.rb: ditto.
* lib/rss/0.9.rb: ditto.
* lib/rss/1.0.rb: ditto.
* lib/rss/2.0.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-18 09:11:03 +00:00
kou
6a594b159a * lib/rss/parser.rb: removed a guard for requiring open-uri.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-18 09:05:27 +00:00
kou
3a55515ee8 * lib/rss/rss.rb: fixed typo: except -> expect
* lib/rss/parser.rb: ditto.
* test/rss/rss-assertions.rb: ditto.
* test/rss/test_parser.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-18 09:03:36 +00:00
kou
02cce7ed82 * lib/rss/rss.rb (Kernel#funcall): removed.
* lib/rss/parser.rb (Kernel.URI): removed.

* lib/rss/maker/: supported
    xxx.new_yyy do |yyy|
      yyy.zzz = zzz
      ...
    end
  style and this style became the style of the recommendation.

  Old style
    yyy = xxx.new_yyy
    yyy.zzz = zzz
    ...
  is supported too but this style isn't recommended.
  [ruby-talk:197284]

* test/rss/test_*maker*.rb: used new recommended style.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 01:28:46 +00:00
kou
463c6a218f * lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/rss.rb: added backward compatibility codes.
* lib/rss/parser.rb: ditto.
* test/rss/test_parser.rb: ditto.
* test/rss/test_2.0.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 01:04:31 +00:00
kou
88dd1e4c99 * lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/parser.rb: added entity handling type predicate.
* lib/rss/rexmlparser.rb: ditto.
* lib/rss/xmlparser.rb: ditto.
* lib/rss/xmlscanner.rb: ditto.

* lib/rss/xmlscanner.rb: more robust entity handling.

* test/rss/test_parser.rb: added an entity handling test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 00:51:31 +00:00
kou
e85f8c7829 * lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/: use #__send__ instead of #send.
* test/rss/: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 00:49:38 +00:00
kou
b8bc7eb644 * lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* lib/rss/rss.rb : removed needless argument 'prefix'.
* lib/rss/parser.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 00:11:27 +00:00
nobu
f42208b70c * lib: do not use __send__ to access private methods. [ruby-dev:26935]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-02 14:53:02 +00:00
kou
efcd6ef586 * lib/rss/parser.rb (RSS::Parser#initialize): accept HTTP/FTP
URI and local file path too.

* test/rss/test_parser.rb (RSS::TestParser#test_parse): test
  for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 05:41: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
10fd0951d1 * lib/rss/parser.rb (RSS::ListenerMixin::tag_end):
fixed invalid namespace handling bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-14 15:01:05 +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
kou
b4634f935a * lib/rss/: untabified.
* test/rss/: untabified.
* lib/rss/0.9.rb (RSS::Rss#to_s): inent -> indent.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-16 04:51:15 +00:00
kou
6b988d9fab * lib/rss: supported prety print.
* test/rss/test_1.0.rb: added test for calculating default indent size.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-16 04:39:58 +00:00
kou
1909f5f1b1 * lib/rss/{rss,parser,0.9,1.0,2.0}.rb: supported RSS 0.9x/2.0
validation and validation which disregard order of elements.
  * test/rss/test_parser.rb: added tests for RSS 0.9x/2.0
    validation.
  * test/rss/{test_trackback,rss-testcase}.rb: fixed no good method
    name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-08 13:54:07 +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