ruby_doc_updates-20110513-1526_vbatts.patch

Vincent Batts, 05/14/2011 12:29 AM

Download (6.19 KB)

View differences:

lib/uri.rb
2 2
# URI support for Ruby
3 3
#
4 4
# Author:: Akira Yamada <akira@ruby-lang.org>
5
# Documentation:: Akira Yamada <akira@ruby-lang.org>, Dmitry V. Sabanin <sdmitry@lrn.ru>
5
# Documentation::
6
#   Akira Yamada <akira@ruby-lang.org>
7
#   Dmitry V. Sabanin <sdmitry@lrn.ru>
8
#   Vincent Batts <vbatts@hashbangbash.com>
6 9
# License::
7 10
#  Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
8 11
#  You can redistribute it and/or modify it under the same term as Ruby.
9
# Revision:: $Id$
10 12
#
11
# See URI for documentation
13
#
14
# == Developer Documentation
15
#
16
# === Class tree
17
#
18
# - URI::Generic (in uri/generic.rb)
19
#   - URI::FTP - (in uri/ftp.rb)
20
#   - URI::HTTP - (in uri/http.rb)
21
#     - URI::HTTPS - (in uri/https.rb)
22
#   - URI::LDAP - (in uri/ldap.rb)
23
#     - URI::LDAPS - (in uri/ldaps.rb)
24
#   - URI::MailTo - (in uri/mailto.rb)
25
# - URI::Parser - (in uri/common.rb)
26
# - URI::REGEXP - (in uri/common.rb)
27
#   - URI::REGEXP::PATTERN - (in uri/common.rb)
28
# - URI::Util - (in uri/common.rb)
29
# - URI::Escape - (in uri/common.rb)
30
# - URI::Error - (in uri/common.rb)
31
#   - URI::InvalidURIError - (in uri/common.rb)
32
#   - URI::InvalidComponentError - (in uri/common.rb)
33
#   - URI::BadURIError - (in uri/common.rb)
34
#
35
#
36
# == URI
37
#
38
# === Introduction
39
#
40
# URI is a module providing classes to handle Uniform Resource Identifiers (RFC2396)
41
#
42
# === Features
43
#
44
# * Uniform handling of handling URIs
45
# * Flexibility to introduce custom URI schemes
46
# * Flexibility to have an alternate URI::Parser (or just different patterns and regexp's)
47
#
48
# === Basic example
49
#
50
#   require 'uri'
51
#
52
#   uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413")
53
#   #=> #<URI::HTTP:0x00000000b14880 URL:http://foo.com/posts?id=30&limit=5#time=1305298413>
54
#   uri.scheme
55
#   #=> "http"
56
#   uri.host
57
#   #=> "foo.com"
58
#   uri.path
59
#   #=> "/posts"
60
#   uri.query
61
#   #=> "id=30&limit=5"
62
#   uri.fragment
63
#   #=> "time=1305298413"
64
#
65
#   uri.to_s
66
#   #=> "http://foo.com/posts?id=30&limit=5#time=1305298413"
67
#
68
# === Next step example
69
#
70
#   module URI
71
#     class RSYNC < Generic
72
#       DEFAULT_PORT = 873
73
#     end
74
#     @@schemes['RSYNC'] = RSYNC
75
#   end
76
#   #=> URI::RSYNC
77
#
78
#   URI.scheme_list
79
#   #=> {"FTP"=>URI::FTP, "HTTP"=>URI::HTTP, "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS, "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC}
80
#
81
#   uri = URI("rsync://rysnc.foo.com")
82
#   #=> #<URI::RSYNC:0x00000000f648c8 URL:rsync://rsync.foo.com>
83
#
84
# == RFC References
85
#
86
# A good place to view an RFC spec is http://www.ietf.org/rfc.html
87
#
88
# Here is a list of all related RFC's.
89
# - RFC822
90
# - RFC1738
91
# - RFC2255
92
# - RFC2368
93
# - RFC2373
94
# - RFC2396
95
# - RFC2732
96
# - RFC3986
97
#
12 98
#
13 99

  
14 100
module URI
lib/uri/common.rb
1 1
# = uri/common.rb
2 2
#
3 3
# Author:: Akira Yamada <akira@ruby-lang.org>
4
# Revision:: $Id$
5 4
# License::
6 5
#   You can redistribute it and/or modify it under the same term as Ruby.
7 6
#
7
# See URI for general documentation
8
#
9
#
8 10

  
9 11
module URI
10 12
  # 
......
633 635
      DEFAULT_PARSER.unescape(*arg)
634 636
    end
635 637
    alias decode unescape
636
  end
638
  end # module Escape
637 639

  
638 640
  extend Escape
639 641
  include REGEXP
......
977 979
    end
978 980
    ary
979 981
  end
980
end
982
end # module URI
981 983

  
982 984
module Kernel
983 985

  
lib/uri/ftp.rb
1
#
2 1
# = uri/ftp.rb
3 2
#
4 3
# Author:: Akira Yamada <akira@ruby-lang.org>
5 4
# License:: You can redistribute it and/or modify it under the same term as Ruby.
6
# Revision:: $Id$
5
#
6
# See URI for general documentation
7 7
#
8 8

  
9 9
require 'uri/generic'
lib/uri/generic.rb
1

  
2
#
3 1
# = uri/generic.rb
4 2
#
5 3
# Author:: Akira Yamada <akira@ruby-lang.org>
6 4
# License:: You can redistribute it and/or modify it under the same term as Ruby.
7
# Revision:: $Id$
5
#
6
# See URI for general documentation
8 7
#
9 8

  
10 9
require 'uri/common'
lib/uri/http.rb
1
#
2 1
# = uri/http.rb
3 2
#
4 3
# Author:: Akira Yamada <akira@ruby-lang.org>
5 4
# License:: You can redistribute it and/or modify it under the same term as Ruby.
6
# Revision:: $Id$
5
#
6
# See URI for general documentation
7 7
#
8 8

  
9 9
require 'uri/generic'
lib/uri/https.rb
1
#
2 1
# = uri/https.rb
3 2
#
4 3
# Author:: Akira Yamada <akira@ruby-lang.org>
5 4
# License:: You can redistribute it and/or modify it under the same term as Ruby.
6
# Revision:: $Id$
5
#
6
# See URI for general documentation
7 7
#
8 8

  
9 9
require 'uri/http'
lib/uri/ldap.rb
1
#
2 1
# = uri/ldap.rb
3 2
#
4 3
# Author::
5 4
#  Takaaki Tateishi <ttate@jaist.ac.jp>
6 5
#  Akira Yamada <akira@ruby-lang.org>
7
# License::
8
#   URI::LDAP is copyrighted free software by Takaaki Tateishi and Akira Yamada.
9
#   You can redistribute it and/or modify it under the same term as Ruby.
10
# Revision:: $Id$
6
# License:: You can redistribute it and/or modify it under the same term as Ruby.
7
#
8
# See URI for general documentation
11 9
#
12 10

  
13 11
require 'uri/generic'
lib/uri/ldaps.rb
1
# = uri/ldap.rb
2
#
3
# License:: You can redistribute it and/or modify it under the same term as Ruby.
4
#
5
# See URI for general documentation
6
#
7

  
1 8
require 'uri/ldap'
2 9

  
3 10
module URI
lib/uri/mailto.rb
1
#
2 1
# = uri/mailto.rb
3 2
#
4 3
# Author:: Akira Yamada <akira@ruby-lang.org>
5 4
# License:: You can redistribute it and/or modify it under the same term as Ruby.
6
# Revision:: $Id$
5
#
6
# See URI for general documentation
7 7
#
8 8

  
9 9
require 'uri/generic'