Граф коммитов

68 Коммитов

Автор SHA1 Сообщение Дата
kou 671e1d890a * lib/rss/rss.rb (RSS::BaseModel): Remove needless codes.
[Bug #12773][ruby-dev:49813]
  Reported by Kazuhiro NISHIYAMA. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-18 13:51:57 +00:00
normal 778bbac8ac stdlib: avoid extra calls to eliminate "\n" from Base64
We may use the '0' (zero) to avoid adding the line feed.
Furthermore, the '*' (asterisk) modifier is not needed for
a single-element arrays.

* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
  eliminate chomp
* lib/net/http.rb (connect): eliminate delete
* lib/net/http/header.rb (basic_encode): ditto
* lib/net/imap.rb (authenticate): eliminate gsub
  (self.encode_utf7): shorten delete arg
* lib/net/smtp.rb (base64_encode): eliminate gsub
* lib/open-uri.rb (OpenURI.open_http): eliminate delete
* lib/rss/rss.rb: ditto
* lib/securerandom.rb (base64): ditto
  (urlsafe_base64): eliminate delete!
* lib/webrick/httpauth/digestauth.rb (split_param_value):
  eliminate chop
* lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete
  (setup_upstream_proxy_authentication): ditto
  [ruby-core:72666] [Feature #11938]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-10 00:35:43 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu b38b57cb54 rss.rb: don't substitute, just search
* lib/rss/rss.rb (Time#w3cdtf): don't substitute, just search
  zeros at EOS.  [ruby-core:70667] [Bug #11509]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 03:58:07 +00:00
nobu 88083fa47e rss.rb: fix usec width
* lib/rss/rss.rb (Time#w3cdtf): fix zero-trimmed width of fraction
  digits.  [ruby-core:70667] [Bug #11509]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 02:39:55 +00:00
akr a18177d5ed * lib/time.rb (Time.force_zone!): New private method.
(Time.make_time): Use Time.force_zone!.
  (Time.strptime): Ditto.
  (Time.rfc2822): Ditto.
  (Time.xmlschema): Ditto.

* lib/rss/rss.rb (Time.w3cdtf): Use Time.force_zone!.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-04 09:01:19 +00:00
akr c4f29a6576 * lib/time.rb (make_time): Produce fixed-offset time object if
appropriate.
  (Time.strptime): Use d[:zone] instead of d[:offset].

* lib/rss/rss.rb (Time.w3cdtf): Produce fixed-offset time object if
  appropriate.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-03 15:23:29 +00:00
zzak 2c5dcdf0b4 * lib/{rake,rdoc,rss}/*, test/rexml/test_listener.rb: [DOC] Fix typos
by @dvsuresh [Fixes GH-486] https://github.com/ruby/ruby/pull/486


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 15:00:29 +00:00
zzak 34cbe5ac06 * lib/rss/rss.rb: [DOC] document Time#w3cdtf by @steveklabnik
[Bug #8821] ありがとうかににく


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 05:52:43 +00:00
zzak 2572a9bf83 * lib/rss/rss.rb: [DOC] Document for constants by Steve Klabnik
[ruby-core:56705] [Bug #8798]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19 17:11:19 +00:00
marcandre 6f64d9eb56 * lib/cgi/core.rb: Use symbols instead of strings for
{const_,instance_variable_}{get,set}. [#7161]

* lib/drb/drb.rb: ditto.

* lib/ipaddr.rb: ditto.

* lib/irb/workspace.rb: ditto.

* lib/monitor.rb: ditto.

* lib/rss/maker/base.rb: ditto.

* lib/rss/rss.rb: ditto.

* lib/xmlrpc/parser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16 16:55:29 +00:00
nobu e6c5b9f308 revert r37326 "remove string literal concatenation"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 14:06:31 +00:00
nobu db1f7079b6 remove string literal concatenation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-25 10:07:22 +00:00
nobu d371e3583e * lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain 7bbf2f3085 * lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
	  Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
	  Patch by Jason Dew [Ruby 1.9 - Feature #4718]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
drbrain 78e06ab194 * lib/rss/atom.rb (module RSS): Document URIs. Patch by Mark Turner.
[Ruby 1.9 - #4671]
	* lib/rss/rss.rb (module RSS):  Document exception classes.  Patch by
	  Mark Turner.  [Ruby 1.9 - #4671]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-12 20:17:29 +00:00
marcandre f3e3547407 * lib/*.rb: Remove unused variable warnings.
Patch by Run Paint [ruby-core:30991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 20:59:01 +00:00
kou 23c14c3613 * 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/trunk@23866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27 04:41:36 +00:00
kou 4ed361e0db * lib/rss/rss.rb, test/rss/test_version.rb (RSS::VERSION): 0.2.5 -> 0.2.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-16 08:48:38 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
kou b9f895e9c8 * lib/rss/rss.rb, test/rss/test_version.rb (RSS::VERSION): 0.2.4 -> 0.2.5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 08:32:10 +00:00
kou 9d968bc221 * lib/rss/rss.rb (RSS::VERSION), test/rss/test_version.rb:
0.2.3 -> 0.2.4.

* lib/rss/maker.rb, lib/rss/maker/, test/rss/test_maker_2.0.rb:
  fixed a bug that RSS::Maker.make("0.9")'s item doesn't make some
  elements if description is missed.
  Reported by Michael Auzenne. Thanks!!!

* lib/rss/maker/0.9.rb, test/rss/test_maker_0.9.rb:
  RSS::Maker.make("0.9") generates RSS 0.92 not RSS 0.91.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-11 08:24:18 +00:00
kou 9343a2deb3 * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.2 -> 0.2.3.
* lib/rss/parser.rb, test/rss/test_parser.rb: supported "-" in tag name.
  Reported by Ray Chen. Thanks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 04:20:47 +00:00
gotoyuzo 06591ad6b1 * lib/rss/parser.rb, lib/rss/atom.rb, lib/rss/rss.rb,
test/rss/rss-assertions.rb, test/rss/test_atom.rb: use
  pack/unpack("m") instead of base64 library.

* lib/webrick/httpproxy.rb: use delete("\n") instead of chomp/chop
  because the result of pack("m") might be multi-line.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 13:37:10 +00:00
kou 4fab2c7526 * 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
2007-12-02 06:45:53 +00:00
kou 79041dfc8d * lib/rss/content.rb, lib/rss/content/, lib/rss/maker/content.rb,
test/rss/test_content.rb, test/rss/test_maker_content.rb,
  test/rss/rss-testcase.rb (RSS::TestCase): supported
  content:encoded with RSS 2.0.
  Suggested by Sam Lown. Thanks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-02 11:58:03 +00:00
kou a7f1c72e90 * lib/rss/rss.rb, test/rss/test_version.rb: 0.2.0 -> 0.2.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-02 11:49:20 +00:00
kou 1b56bcce22 * lib/rss.rb, lib/rss/, test/rss/:
- 0.1.9 -> 0.2.0.
  - supported Slash module.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-15 04:41:28 +00:00
kou 3349fd5826 * lib/rss/rss.rb: 0.1.8 -> 0.1.9.
* test/rss/test_version.rb: followed the above change.

* lib/rss/parser.rb: fixed a bug that handles unintended elements.
  Thanks to Takuo Yonezawa. [ruby-list:43841]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-13 15:06:58 +00:00
kou 71976790ec * lib/rss, sample/rss, test/rss:
- 0.1.7 -> 0.1.8.
  - supported <itunes:XXX>.
  - reverted backward incompatibility API changes introduced 0.1.7.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-05 03:03:05 +00:00
kou 966a25465a * lib/rss, test/rss:
- supported Atom.
  - bumped version 0.1.6 to 0.1.7.
* sample/rss/convert.rb: added new sample.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-17 10:13:25 +00:00
kou 8bc63849d5 * lib/rss/rss.rb, lib/rss/parser.rb: followed current Ruby
specification. [ruby-dev:30274]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 11:38:13 +00:00
kou cbcb626ee5 * lib/rss/rss.rb, lib/rss/parser.rb: removed needless code for
backward compatibility.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 11:33:50 +00:00
kou 254670b3bc * 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.

* test/rss/test_content.rb: use #__send__ instead of #funcall for
  no private method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-25 03:54:29 +00:00
kou 456ba712fe * lib/rss/rss.rb: improved type conversion.
* lib/rss/1.0.rb: ditto.
* lib/rss/0.9.rb: ditto.
* lib/rss/2.0.rb: ditto.
* lib/rss/image.rb: ditto.
* lib/rss/syndication.rb: ditto.

* test/rss/test_2.0.rb: added type conversion tests.
* test/rss/test_accessor.rb: ditto.
* test/rss/test_to_s.rb: ditto.
* test/rss/test_syndication.rb: ditto.
* test/rss/test_setup_maker_2.0.rb: ditto.
* test/rss/test_setup_maker_1.0.rb: ditto.
* test/rss/test_setup_maker_0.9.rb: ditto.
* test/rss/test_maker_sy.rb: ditto.
* test/rss/test_maker_image.rb: ditto.
* test/rss/test_maker_2.0.rb: ditto.
* test/rss/test_maker_0.9.rb: ditto.
* test/rss/test_image.rb: ditto.

* test/rss/test_maker_1.0.rb: use assert instead of assert_equal.

* test/rss/rss-assertions.rb: improved type conversion assertions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-25 03:43:48 +00:00
kou 73cd292fcd * lib/rss/: use #__send__ instead of #send.
* test/rss/: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23 09:49:02 +00:00
kou 4ef7ec62ca * 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/trunk@9596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23 09:24:17 +00:00
kou f988ceb53b * lib/rss/rss.rb: fixed a indentation bug.
* lib/rss/taxonomy.rb: fixed <taxo:topic> #to_s bug.
* test/rss/test_taxonomy.rb: added a #to_s test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23 08:44:05 +00:00
kou 88a13516ec * lib/rss/rss.rb : removed needless argument 'prefix'.
* lib/rss/parser.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-17 04:53:59 +00:00
kou 0d2c16d145 * lib/rss/rss.rb (RSS::VERSION): 0.1.5 -> 0.1.6.
* test/rss/test_version.rb (RSS::TestVersion#test_version): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-15 16:29:02 +00:00
nobu cd5c822ac8 * lib: do not use __send__ to access private methods. [ruby-dev:26935]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-02 14:53:02 +00:00
kou b2270e5535 * 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/trunk@8820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 06:14:48 +00:00
kou cff37c6dcc * lib/rss/rss.rb (RSS::VERSION): 0.1.4 -> 0.1.5.
* test/rss/test_version.rb (RSS::TestVersion#test_version):
  ditto.

* lib/rss/0.9.rb (RSS::Rss::Channel::Item::Category):
  domain attribute of <category> is optional. Thanks to
  Chris Lee <clee@kde.org>.

* test/rss/test_parser.rb (RSS::TestParser#test_category20):
  adjusted test case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-08 06:51:21 +00:00
kou c56355fbdc * lib/rss/rss.rb (RSS::VERSION): 0.1.3 -> 0.1.4.
* lib/rss/rss.rb (RSS::Element#converter): fixed converter
  transmission bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-13 14:48:00 +00:00
kou d12dff187a * lib/rss/dublincore.rb: supported multiple DublinCore items.
* 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/maker/base.rb: added default current_element implementation.

* lib/rss/maker/dublincore.rb: supported multiple DublinCore items.

* lib/rss/maker/image.rb: supproted new DublinCore API.

* 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 DublinCore items.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-05 06:42:03 +00:00
kou 73a9963ddf * lib/rss: supported Image module.
http://web.resource.org/rss/1.0/modules/image/


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-03 15:31:57 +00:00
kou bd4fd26fda * lib/rss/rss.rb (RSS::Element#convert): added.
* lib/rss/rss.rb: convert -> need_convert.
* lib/rss/1.0.rb: ditto.
* lib/rss/0.9.rb: ditto.
* lib/rss/2.0.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-02 13:00:31 +00:00
kou e1e5eda547 * lib/rss/rss.rb (RSS::VERSION): 0.1.2 -> 0.1.3.
* lib/rss/rss.rb: accept inheritance. [ruby-talk:126104]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-15 04:46:20 +00:00
kou 500bd1f033 * lib/rss/rss.rb: removed empty lines from output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-04 09:55:29 +00:00
kou 636e37fcb9 * lib/rss/rss.rb (RSS::VERSION): 0.1.1 -> 0.1.2
* lib/rss/rss.rb: #item=/#set_item and so on are obsolete.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-04 09:53:01 +00:00