rbs 0.12.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +8 -4
- data/.gitignore +0 -1
- data/CHANGELOG.md +32 -0
- data/Gemfile +4 -0
- data/README.md +8 -2
- data/Rakefile +9 -2
- data/Steepfile +1 -1
- data/bin/annotate-with-rdoc +1 -1
- data/bin/setup +0 -2
- data/bin/test_runner.rb +15 -1
- data/{stdlib/builtin → core}/array.rbs +124 -120
- data/{stdlib/builtin → core}/basic_object.rbs +54 -54
- data/{stdlib/builtin → core}/binding.rbs +42 -42
- data/core/builtin.rbs +70 -0
- data/{stdlib/builtin → core}/class.rbs +33 -33
- data/{stdlib/builtin → core}/comparable.rbs +0 -0
- data/{stdlib/builtin → core}/complex.rbs +90 -90
- data/{stdlib/builtin → core}/constants.rbs +0 -0
- data/{stdlib/builtin → core}/data.rbs +0 -0
- data/{stdlib/builtin → core}/deprecated.rbs +0 -0
- data/{stdlib/builtin → core}/dir.rbs +0 -0
- data/{stdlib/builtin → core}/encoding.rbs +33 -33
- data/{stdlib/builtin → core}/enumerable.rbs +58 -52
- data/{stdlib/builtin → core}/enumerator.rbs +35 -35
- data/{stdlib/builtin → core}/errno.rbs +0 -0
- data/{stdlib/builtin → core}/errors.rbs +2 -2
- data/{stdlib/builtin → core}/exception.rbs +50 -50
- data/{stdlib/builtin → core}/false_class.rbs +6 -6
- data/{stdlib/builtin → core}/fiber.rbs +14 -14
- data/{stdlib/builtin → core}/fiber_error.rbs +1 -1
- data/{stdlib/builtin → core}/file.rbs +0 -0
- data/{stdlib/builtin → core}/file_test.rbs +0 -0
- data/{stdlib/builtin → core}/float.rbs +161 -161
- data/{stdlib/builtin → core}/gc.rbs +3 -3
- data/{stdlib/builtin → core}/hash.rbs +7 -7
- data/{stdlib/builtin → core}/integer.rbs +0 -0
- data/{stdlib/builtin → core}/io.rbs +88 -88
- data/{stdlib/builtin → core}/kernel.rbs +71 -153
- data/{stdlib/builtin → core}/marshal.rbs +0 -0
- data/{stdlib/builtin → core}/match_data.rbs +1 -1
- data/{stdlib/builtin → core}/math.rbs +0 -0
- data/{stdlib/builtin → core}/method.rbs +19 -19
- data/{stdlib/builtin → core}/module.rbs +13 -13
- data/{stdlib/builtin → core}/nil_class.rbs +20 -20
- data/{stdlib/builtin → core}/numeric.rbs +101 -101
- data/{stdlib/builtin → core}/object.rbs +173 -173
- data/{stdlib/builtin → core}/proc.rbs +91 -91
- data/{stdlib/builtin → core}/process.rbs +0 -0
- data/{stdlib/builtin → core}/random.rbs +1 -1
- data/{stdlib/builtin → core}/range.rbs +3 -5
- data/{stdlib/builtin → core}/rational.rbs +83 -83
- data/{stdlib/builtin → core}/rb_config.rbs +0 -0
- data/{stdlib/builtin → core}/regexp.rbs +0 -0
- data/{stdlib/builtin → core}/ruby_vm.rbs +0 -0
- data/{stdlib/builtin → core}/signal.rbs +7 -7
- data/{stdlib/builtin → core}/string.rbs +10 -10
- data/{stdlib/builtin → core}/string_io.rbs +8 -8
- data/{stdlib/builtin → core}/struct.rbs +1 -1
- data/{stdlib/builtin → core}/symbol.rbs +1 -1
- data/{stdlib/builtin → core}/thread.rbs +189 -189
- data/{stdlib/builtin → core}/thread_group.rbs +2 -2
- data/{stdlib/builtin → core}/time.rbs +0 -0
- data/{stdlib/builtin → core}/trace_point.rbs +0 -0
- data/{stdlib/builtin → core}/true_class.rbs +10 -10
- data/{stdlib/builtin → core}/unbound_method.rbs +0 -0
- data/{stdlib/builtin → core}/warning.rbs +1 -1
- data/docs/CONTRIBUTING.md +1 -0
- data/docs/repo.md +125 -0
- data/docs/syntax.md +50 -6
- data/goodcheck.yml +22 -5
- data/lib/rbs.rb +1 -0
- data/lib/rbs/ast/comment.rb +1 -1
- data/lib/rbs/cli.rb +117 -107
- data/lib/rbs/constant.rb +1 -1
- data/lib/rbs/constant_table.rb +9 -8
- data/lib/rbs/definition_builder.rb +6 -7
- data/lib/rbs/environment.rb +5 -1
- data/lib/rbs/environment_loader.rb +79 -105
- data/lib/rbs/namespace.rb +1 -1
- data/lib/rbs/parser.rb +3148 -0
- data/lib/rbs/parser.y +10 -3
- data/lib/rbs/prototype/rb.rb +38 -6
- data/lib/rbs/prototype/runtime.rb +17 -7
- data/lib/rbs/repository.rb +121 -0
- data/lib/rbs/test/hook.rb +2 -0
- data/lib/rbs/test/setup.rb +5 -3
- data/lib/rbs/test/setup_helper.rb +4 -4
- data/lib/rbs/test/tester.rb +4 -1
- data/lib/rbs/test/type_check.rb +12 -6
- data/lib/rbs/type_name.rb +3 -2
- data/lib/rbs/variance_calculator.rb +2 -2
- data/lib/rbs/vendorer.rb +38 -16
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/writer.rb +25 -15
- data/sig/cli.rbs +58 -0
- data/sig/constant.rbs +21 -0
- data/sig/constant_table.rbs +30 -0
- data/sig/declarations.rbs +2 -2
- data/sig/definition.rbs +2 -2
- data/sig/definition_builder.rbs +6 -5
- data/sig/environment_loader.rbs +100 -0
- data/sig/members.rbs +2 -2
- data/sig/method_types.rbs +1 -1
- data/sig/namespace.rbs +4 -4
- data/sig/parser.rbs +25 -0
- data/sig/polyfill.rbs +42 -0
- data/sig/rbs.rbs +8 -0
- data/sig/repository.rbs +79 -0
- data/sig/substitution.rbs +3 -3
- data/sig/typename.rbs +1 -1
- data/sig/types.rbs +1 -1
- data/sig/vendorer.rbs +44 -0
- data/sig/version.rbs +3 -0
- data/sig/writer.rbs +40 -0
- data/stdlib/abbrev/{abbrev.rbs → 0/abbrev.rbs} +0 -0
- data/stdlib/base64/{base64.rbs → 0/base64.rbs} +1 -1
- data/stdlib/benchmark/{benchmark.rbs → 0/benchmark.rbs} +2 -2
- data/stdlib/{bigdecimal/math → bigdecimal-math/0}/big_math.rbs +0 -0
- data/stdlib/bigdecimal/{big_decimal.rbs → 0/big_decimal.rbs} +0 -0
- data/stdlib/coverage/{coverage.rbs → 0/coverage.rbs} +2 -2
- data/stdlib/csv/{csv.rbs → 0/csv.rbs} +1 -1
- data/stdlib/date/{date.rbs → 0/date.rbs} +4 -4
- data/stdlib/date/{date_time.rbs → 0/date_time.rbs} +1 -1
- data/stdlib/dbm/0/dbm.rbs +277 -0
- data/stdlib/erb/{erb.rbs → 0/erb.rbs} +0 -0
- data/stdlib/fiber/{fiber.rbs → 0/fiber.rbs} +0 -0
- data/stdlib/find/{find.rbs → 0/find.rbs} +12 -12
- data/stdlib/forwardable/{forwardable.rbs → 0/forwardable.rbs} +0 -0
- data/stdlib/ipaddr/{ipaddr.rbs → 0/ipaddr.rbs} +0 -0
- data/stdlib/json/{json.rbs → 0/json.rbs} +0 -0
- data/stdlib/logger/{formatter.rbs → 0/formatter.rbs} +0 -0
- data/stdlib/logger/{log_device.rbs → 0/log_device.rbs} +1 -1
- data/stdlib/logger/{logger.rbs → 0/logger.rbs} +1 -1
- data/stdlib/logger/{period.rbs → 0/period.rbs} +0 -0
- data/stdlib/logger/{severity.rbs → 0/severity.rbs} +0 -0
- data/stdlib/mutex_m/{mutex_m.rbs → 0/mutex_m.rbs} +0 -0
- data/stdlib/pathname/{pathname.rbs → 0/pathname.rbs} +41 -39
- data/stdlib/prime/{integer-extension.rbs → 0/integer-extension.rbs} +0 -0
- data/stdlib/prime/{prime.rbs → 0/prime.rbs} +0 -0
- data/stdlib/pstore/0/pstore.rbs +287 -0
- data/stdlib/pty/{pty.rbs → 0/pty.rbs} +1 -1
- data/stdlib/securerandom/{securerandom.rbs → 0/securerandom.rbs} +0 -0
- data/stdlib/set/{set.rbs → 0/set.rbs} +0 -0
- data/stdlib/tmpdir/{tmpdir.rbs → 0/tmpdir.rbs} +12 -12
- data/stdlib/uri/{file.rbs → 0/file.rbs} +0 -0
- data/stdlib/uri/{generic.rbs → 0/generic.rbs} +2 -2
- data/stdlib/uri/0/http.rbs +158 -0
- data/stdlib/uri/0/https.rbs +108 -0
- data/stdlib/uri/0/ldap.rbs +224 -0
- data/stdlib/uri/0/ldaps.rbs +108 -0
- data/stdlib/zlib/{zlib.rbs → 0/zlib.rbs} +0 -0
- data/steep/Gemfile.lock +13 -17
- metadata +105 -89
- data/stdlib/builtin/builtin.rbs +0 -42
@@ -0,0 +1,108 @@
|
|
1
|
+
# URI is a module providing classes to handle Uniform Resource Identifiers
|
2
|
+
# ([RFC2396](http://tools.ietf.org/html/rfc2396)).
|
3
|
+
#
|
4
|
+
# ## Features
|
5
|
+
#
|
6
|
+
# * Uniform way of handling URIs.
|
7
|
+
# * Flexibility to introduce custom URI schemes.
|
8
|
+
# * Flexibility to have an alternate URI::Parser (or just different patterns
|
9
|
+
# and regexp's).
|
10
|
+
#
|
11
|
+
#
|
12
|
+
# ## Basic example
|
13
|
+
#
|
14
|
+
# require 'uri'
|
15
|
+
#
|
16
|
+
# uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413")
|
17
|
+
# #=> #<URI::HTTP http://foo.com/posts?id=30&limit=5#time=1305298413>
|
18
|
+
#
|
19
|
+
# uri.scheme #=> "http"
|
20
|
+
# uri.host #=> "foo.com"
|
21
|
+
# uri.path #=> "/posts"
|
22
|
+
# uri.query #=> "id=30&limit=5"
|
23
|
+
# uri.fragment #=> "time=1305298413"
|
24
|
+
#
|
25
|
+
# uri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413"
|
26
|
+
#
|
27
|
+
# ## Adding custom URIs
|
28
|
+
#
|
29
|
+
# module URI
|
30
|
+
# class RSYNC < Generic
|
31
|
+
# DEFAULT_PORT = 873
|
32
|
+
# end
|
33
|
+
# @@schemes['RSYNC'] = RSYNC
|
34
|
+
# end
|
35
|
+
# #=> URI::RSYNC
|
36
|
+
#
|
37
|
+
# URI.scheme_list
|
38
|
+
# #=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP,
|
39
|
+
# # "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS,
|
40
|
+
# # "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC}
|
41
|
+
#
|
42
|
+
# uri = URI("rsync://rsync.foo.com")
|
43
|
+
# #=> #<URI::RSYNC rsync://rsync.foo.com>
|
44
|
+
#
|
45
|
+
# ## RFC References
|
46
|
+
#
|
47
|
+
# A good place to view an RFC spec is http://www.ietf.org/rfc.html.
|
48
|
+
#
|
49
|
+
# Here is a list of all related RFC's:
|
50
|
+
# * [RFC822](http://tools.ietf.org/html/rfc822)
|
51
|
+
# * [RFC1738](http://tools.ietf.org/html/rfc1738)
|
52
|
+
# * [RFC2255](http://tools.ietf.org/html/rfc2255)
|
53
|
+
# * [RFC2368](http://tools.ietf.org/html/rfc2368)
|
54
|
+
# * [RFC2373](http://tools.ietf.org/html/rfc2373)
|
55
|
+
# * [RFC2396](http://tools.ietf.org/html/rfc2396)
|
56
|
+
# * [RFC2732](http://tools.ietf.org/html/rfc2732)
|
57
|
+
# * [RFC3986](http://tools.ietf.org/html/rfc3986)
|
58
|
+
#
|
59
|
+
#
|
60
|
+
# ## Class tree
|
61
|
+
#
|
62
|
+
# * URI::Generic (in uri/generic.rb)
|
63
|
+
# * URI::File - (in uri/file.rb)
|
64
|
+
# * URI::FTP - (in uri/ftp.rb)
|
65
|
+
# * URI::HTTP - (in uri/http.rb)
|
66
|
+
# * URI::HTTPS - (in uri/https.rb)
|
67
|
+
#
|
68
|
+
# * URI::LDAP - (in uri/ldap.rb)
|
69
|
+
# * URI::LDAPS - (in uri/ldaps.rb)
|
70
|
+
#
|
71
|
+
# * URI::MailTo - (in uri/mailto.rb)
|
72
|
+
#
|
73
|
+
# * URI::Parser - (in uri/common.rb)
|
74
|
+
# * URI::REGEXP - (in uri/common.rb)
|
75
|
+
# * URI::REGEXP::PATTERN - (in uri/common.rb)
|
76
|
+
#
|
77
|
+
# * URI::Util - (in uri/common.rb)
|
78
|
+
# * URI::Escape - (in uri/common.rb)
|
79
|
+
# * URI::Error - (in uri/common.rb)
|
80
|
+
# * URI::InvalidURIError - (in uri/common.rb)
|
81
|
+
# * URI::InvalidComponentError - (in uri/common.rb)
|
82
|
+
# * URI::BadURIError - (in uri/common.rb)
|
83
|
+
#
|
84
|
+
#
|
85
|
+
#
|
86
|
+
# ## Copyright Info
|
87
|
+
#
|
88
|
+
# Author
|
89
|
+
# : Akira Yamada <akira@ruby-lang.org>
|
90
|
+
# Documentation
|
91
|
+
# : Akira Yamada <akira@ruby-lang.org> Dmitry V. Sabanin <sdmitry@lrn.ru>
|
92
|
+
# Vincent Batts <vbatts@hashbangbash.com>
|
93
|
+
# License
|
94
|
+
# : Copyright (c) 2001 akira yamada <akira@ruby-lang.org> You can redistribute
|
95
|
+
# it and/or modify it under the same term as Ruby.
|
96
|
+
# Revision
|
97
|
+
# : $Id$
|
98
|
+
#
|
99
|
+
#
|
100
|
+
module URI
|
101
|
+
# The default port for HTTPS URIs is 443, and the scheme is 'https:' rather
|
102
|
+
# than 'http:'. Other than that, HTTPS URIs are identical to HTTP URIs;
|
103
|
+
# see URI::HTTP.
|
104
|
+
class HTTPS < HTTP
|
105
|
+
# A Default port of 443 for URI::HTTPS
|
106
|
+
DEFAULT_PORT: Integer
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,224 @@
|
|
1
|
+
# URI is a module providing classes to handle Uniform Resource Identifiers
|
2
|
+
# ([RFC2396](http://tools.ietf.org/html/rfc2396)).
|
3
|
+
#
|
4
|
+
# ## Features
|
5
|
+
#
|
6
|
+
# * Uniform way of handling URIs.
|
7
|
+
# * Flexibility to introduce custom URI schemes.
|
8
|
+
# * Flexibility to have an alternate URI::Parser (or just different patterns
|
9
|
+
# and regexp's).
|
10
|
+
#
|
11
|
+
#
|
12
|
+
# ## Basic example
|
13
|
+
#
|
14
|
+
# require 'uri'
|
15
|
+
#
|
16
|
+
# uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413")
|
17
|
+
# #=> #<URI::HTTP http://foo.com/posts?id=30&limit=5#time=1305298413>
|
18
|
+
#
|
19
|
+
# uri.scheme #=> "http"
|
20
|
+
# uri.host #=> "foo.com"
|
21
|
+
# uri.path #=> "/posts"
|
22
|
+
# uri.query #=> "id=30&limit=5"
|
23
|
+
# uri.fragment #=> "time=1305298413"
|
24
|
+
#
|
25
|
+
# uri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413"
|
26
|
+
#
|
27
|
+
# ## Adding custom URIs
|
28
|
+
#
|
29
|
+
# module URI
|
30
|
+
# class RSYNC < Generic
|
31
|
+
# DEFAULT_PORT = 873
|
32
|
+
# end
|
33
|
+
# @@schemes['RSYNC'] = RSYNC
|
34
|
+
# end
|
35
|
+
# #=> URI::RSYNC
|
36
|
+
#
|
37
|
+
# URI.scheme_list
|
38
|
+
# #=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP,
|
39
|
+
# # "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS,
|
40
|
+
# # "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC}
|
41
|
+
#
|
42
|
+
# uri = URI("rsync://rsync.foo.com")
|
43
|
+
# #=> #<URI::RSYNC rsync://rsync.foo.com>
|
44
|
+
#
|
45
|
+
# ## RFC References
|
46
|
+
#
|
47
|
+
# A good place to view an RFC spec is http://www.ietf.org/rfc.html.
|
48
|
+
#
|
49
|
+
# Here is a list of all related RFC's:
|
50
|
+
# * [RFC822](http://tools.ietf.org/html/rfc822)
|
51
|
+
# * [RFC1738](http://tools.ietf.org/html/rfc1738)
|
52
|
+
# * [RFC2255](http://tools.ietf.org/html/rfc2255)
|
53
|
+
# * [RFC2368](http://tools.ietf.org/html/rfc2368)
|
54
|
+
# * [RFC2373](http://tools.ietf.org/html/rfc2373)
|
55
|
+
# * [RFC2396](http://tools.ietf.org/html/rfc2396)
|
56
|
+
# * [RFC2732](http://tools.ietf.org/html/rfc2732)
|
57
|
+
# * [RFC3986](http://tools.ietf.org/html/rfc3986)
|
58
|
+
#
|
59
|
+
#
|
60
|
+
# ## Class tree
|
61
|
+
#
|
62
|
+
# * URI::Generic (in uri/generic.rb)
|
63
|
+
# * URI::File - (in uri/file.rb)
|
64
|
+
# * URI::FTP - (in uri/ftp.rb)
|
65
|
+
# * URI::HTTP - (in uri/http.rb)
|
66
|
+
# * URI::HTTPS - (in uri/https.rb)
|
67
|
+
#
|
68
|
+
# * URI::LDAP - (in uri/ldap.rb)
|
69
|
+
# * URI::LDAPS - (in uri/ldaps.rb)
|
70
|
+
#
|
71
|
+
# * URI::MailTo - (in uri/mailto.rb)
|
72
|
+
#
|
73
|
+
# * URI::Parser - (in uri/common.rb)
|
74
|
+
# * URI::REGEXP - (in uri/common.rb)
|
75
|
+
# * URI::REGEXP::PATTERN - (in uri/common.rb)
|
76
|
+
#
|
77
|
+
# * URI::Util - (in uri/common.rb)
|
78
|
+
# * URI::Escape - (in uri/common.rb)
|
79
|
+
# * URI::Error - (in uri/common.rb)
|
80
|
+
# * URI::InvalidURIError - (in uri/common.rb)
|
81
|
+
# * URI::InvalidComponentError - (in uri/common.rb)
|
82
|
+
# * URI::BadURIError - (in uri/common.rb)
|
83
|
+
#
|
84
|
+
#
|
85
|
+
#
|
86
|
+
# ## Copyright Info
|
87
|
+
#
|
88
|
+
# Author
|
89
|
+
# : Akira Yamada <akira@ruby-lang.org>
|
90
|
+
# Documentation
|
91
|
+
# : Akira Yamada <akira@ruby-lang.org> Dmitry V. Sabanin <sdmitry@lrn.ru>
|
92
|
+
# Vincent Batts <vbatts@hashbangbash.com>
|
93
|
+
# License
|
94
|
+
# : Copyright (c) 2001 akira yamada <akira@ruby-lang.org> You can redistribute
|
95
|
+
# it and/or modify it under the same term as Ruby.
|
96
|
+
# Revision
|
97
|
+
# : $Id$
|
98
|
+
#
|
99
|
+
#
|
100
|
+
module URI
|
101
|
+
#
|
102
|
+
# LDAP URI SCHEMA (described in RFC2255).
|
103
|
+
# -
|
104
|
+
# ldap://<host>/<dn>[?<attrs>[?<scope>[?<filter>[?<extensions>]]]]
|
105
|
+
# +
|
106
|
+
class LDAP < Generic
|
107
|
+
# A Default port of 389 for URI::LDAP.
|
108
|
+
DEFAULT_PORT: Integer
|
109
|
+
|
110
|
+
# An Array of the available components for URI::LDAP.
|
111
|
+
COMPONENT: Array[Symbol]
|
112
|
+
|
113
|
+
# Scopes available for the starting point.
|
114
|
+
#
|
115
|
+
# * SCOPE_BASE - the Base DN
|
116
|
+
# * SCOPE_ONE - one level under the Base DN, not including the base DN and
|
117
|
+
# not including any entries under this
|
118
|
+
# * SCOPE_SUB - subtrees, all entries at all levels
|
119
|
+
#
|
120
|
+
SCOPE: Array[String]
|
121
|
+
|
122
|
+
#
|
123
|
+
# == Description
|
124
|
+
#
|
125
|
+
# Creates a new URI::LDAP object from components, with syntax checking.
|
126
|
+
#
|
127
|
+
# The components accepted are host, port, dn, attributes,
|
128
|
+
# scope, filter, and extensions.
|
129
|
+
#
|
130
|
+
# The components should be provided either as an Array, or as a Hash
|
131
|
+
# with keys formed by preceding the component names with a colon.
|
132
|
+
#
|
133
|
+
# If an Array is used, the components must be passed in the
|
134
|
+
# order <code>[host, port, dn, attributes, scope, filter, extensions]</code>.
|
135
|
+
#
|
136
|
+
# Example:
|
137
|
+
#
|
138
|
+
# uri = URI::LDAP.build({:host => 'ldap.example.com',
|
139
|
+
# :dn => '/dc=example'})
|
140
|
+
#
|
141
|
+
# uri = URI::LDAP.build(["ldap.example.com", nil,
|
142
|
+
# "/dc=example;dc=com", "query", nil, nil, nil])
|
143
|
+
#
|
144
|
+
def self.build: (Array[nil | String | Integer] args) -> URI::LDAP
|
145
|
+
| ({ host: String, port: Integer?, dn: String, attributes: String?, scope: String?, filter: String?, extensions: String? }) -> URI::LDAP
|
146
|
+
|
147
|
+
#
|
148
|
+
# == Description
|
149
|
+
#
|
150
|
+
# Creates a new URI::LDAP object from generic URI components as per
|
151
|
+
# RFC 2396. No LDAP-specific syntax checking is performed.
|
152
|
+
#
|
153
|
+
# Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+,
|
154
|
+
# +opaque+, +query+, and +fragment+, in that order.
|
155
|
+
#
|
156
|
+
# Example:
|
157
|
+
#
|
158
|
+
# uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil,
|
159
|
+
# "/dc=example;dc=com", nil, "query", nil)
|
160
|
+
#
|
161
|
+
# See also URI::Generic.new.
|
162
|
+
#
|
163
|
+
def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) -> URI::LDAP
|
164
|
+
|
165
|
+
# Private method to cleanup +dn+ from using the +path+ component attribute.
|
166
|
+
def parse_dn: () -> nil
|
167
|
+
|
168
|
+
# Private method to cleanup +attributes+, +scope+, +filter+, and +extensions+
|
169
|
+
# from using the +query+ component attribute.
|
170
|
+
def parse_query: () -> nil
|
171
|
+
|
172
|
+
# Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+.
|
173
|
+
def build_path_query: () -> String
|
174
|
+
|
175
|
+
# Returns dn.
|
176
|
+
def dn: () -> String
|
177
|
+
|
178
|
+
# Private setter for dn +val+.
|
179
|
+
def set_dn: (String val) -> String
|
180
|
+
|
181
|
+
# Setter for dn +val+.
|
182
|
+
def dn=: (String val) -> String
|
183
|
+
|
184
|
+
# Returns attributes.
|
185
|
+
def attributes: () -> String
|
186
|
+
|
187
|
+
# Private setter for attributes +val+.
|
188
|
+
def set_attributes: (String val) -> String
|
189
|
+
|
190
|
+
# Setter for attributes +val+.
|
191
|
+
def attributes=: (String val) -> String
|
192
|
+
|
193
|
+
# Returns scope.
|
194
|
+
def scope: () -> String
|
195
|
+
|
196
|
+
# Private setter for scope +val+.
|
197
|
+
def set_scope: (String val) -> String
|
198
|
+
|
199
|
+
# Setter for scope +val+.
|
200
|
+
def scope=: (String val) -> String
|
201
|
+
|
202
|
+
# Returns filter.
|
203
|
+
def filter: () -> String
|
204
|
+
|
205
|
+
# Private setter for filter +val+.
|
206
|
+
def set_filter: (String val) -> String
|
207
|
+
|
208
|
+
# Setter for filter +val+.
|
209
|
+
def filter=: (String val) -> String
|
210
|
+
|
211
|
+
# Returns extensions.
|
212
|
+
def extensions: () -> untyped
|
213
|
+
|
214
|
+
# Private setter for extensions +val+.
|
215
|
+
def set_extensions: (String val) -> String
|
216
|
+
|
217
|
+
# Setter for extensions +val+.
|
218
|
+
def extensions=: (String val) -> String
|
219
|
+
|
220
|
+
# Checks if URI has a path.
|
221
|
+
# For URI::LDAP this will return +false+.
|
222
|
+
def hierarchical?: () -> ::FalseClass
|
223
|
+
end
|
224
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# URI is a module providing classes to handle Uniform Resource Identifiers
|
2
|
+
# ([RFC2396](http://tools.ietf.org/html/rfc2396)).
|
3
|
+
#
|
4
|
+
# ## Features
|
5
|
+
#
|
6
|
+
# * Uniform way of handling URIs.
|
7
|
+
# * Flexibility to introduce custom URI schemes.
|
8
|
+
# * Flexibility to have an alternate URI::Parser (or just different patterns
|
9
|
+
# and regexp's).
|
10
|
+
#
|
11
|
+
#
|
12
|
+
# ## Basic example
|
13
|
+
#
|
14
|
+
# require 'uri'
|
15
|
+
#
|
16
|
+
# uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413")
|
17
|
+
# #=> #<URI::HTTP http://foo.com/posts?id=30&limit=5#time=1305298413>
|
18
|
+
#
|
19
|
+
# uri.scheme #=> "http"
|
20
|
+
# uri.host #=> "foo.com"
|
21
|
+
# uri.path #=> "/posts"
|
22
|
+
# uri.query #=> "id=30&limit=5"
|
23
|
+
# uri.fragment #=> "time=1305298413"
|
24
|
+
#
|
25
|
+
# uri.to_s #=> "http://foo.com/posts?id=30&limit=5#time=1305298413"
|
26
|
+
#
|
27
|
+
# ## Adding custom URIs
|
28
|
+
#
|
29
|
+
# module URI
|
30
|
+
# class RSYNC < Generic
|
31
|
+
# DEFAULT_PORT = 873
|
32
|
+
# end
|
33
|
+
# @@schemes['RSYNC'] = RSYNC
|
34
|
+
# end
|
35
|
+
# #=> URI::RSYNC
|
36
|
+
#
|
37
|
+
# URI.scheme_list
|
38
|
+
# #=> {"FILE"=>URI::File, "FTP"=>URI::FTP, "HTTP"=>URI::HTTP,
|
39
|
+
# # "HTTPS"=>URI::HTTPS, "LDAP"=>URI::LDAP, "LDAPS"=>URI::LDAPS,
|
40
|
+
# # "MAILTO"=>URI::MailTo, "RSYNC"=>URI::RSYNC}
|
41
|
+
#
|
42
|
+
# uri = URI("rsync://rsync.foo.com")
|
43
|
+
# #=> #<URI::RSYNC rsync://rsync.foo.com>
|
44
|
+
#
|
45
|
+
# ## RFC References
|
46
|
+
#
|
47
|
+
# A good place to view an RFC spec is http://www.ietf.org/rfc.html.
|
48
|
+
#
|
49
|
+
# Here is a list of all related RFC's:
|
50
|
+
# * [RFC822](http://tools.ietf.org/html/rfc822)
|
51
|
+
# * [RFC1738](http://tools.ietf.org/html/rfc1738)
|
52
|
+
# * [RFC2255](http://tools.ietf.org/html/rfc2255)
|
53
|
+
# * [RFC2368](http://tools.ietf.org/html/rfc2368)
|
54
|
+
# * [RFC2373](http://tools.ietf.org/html/rfc2373)
|
55
|
+
# * [RFC2396](http://tools.ietf.org/html/rfc2396)
|
56
|
+
# * [RFC2732](http://tools.ietf.org/html/rfc2732)
|
57
|
+
# * [RFC3986](http://tools.ietf.org/html/rfc3986)
|
58
|
+
#
|
59
|
+
#
|
60
|
+
# ## Class tree
|
61
|
+
#
|
62
|
+
# * URI::Generic (in uri/generic.rb)
|
63
|
+
# * URI::File - (in uri/file.rb)
|
64
|
+
# * URI::FTP - (in uri/ftp.rb)
|
65
|
+
# * URI::HTTP - (in uri/http.rb)
|
66
|
+
# * URI::HTTPS - (in uri/https.rb)
|
67
|
+
#
|
68
|
+
# * URI::LDAP - (in uri/ldap.rb)
|
69
|
+
# * URI::LDAPS - (in uri/ldaps.rb)
|
70
|
+
#
|
71
|
+
# * URI::MailTo - (in uri/mailto.rb)
|
72
|
+
#
|
73
|
+
# * URI::Parser - (in uri/common.rb)
|
74
|
+
# * URI::REGEXP - (in uri/common.rb)
|
75
|
+
# * URI::REGEXP::PATTERN - (in uri/common.rb)
|
76
|
+
#
|
77
|
+
# * URI::Util - (in uri/common.rb)
|
78
|
+
# * URI::Escape - (in uri/common.rb)
|
79
|
+
# * URI::Error - (in uri/common.rb)
|
80
|
+
# * URI::InvalidURIError - (in uri/common.rb)
|
81
|
+
# * URI::InvalidComponentError - (in uri/common.rb)
|
82
|
+
# * URI::BadURIError - (in uri/common.rb)
|
83
|
+
#
|
84
|
+
#
|
85
|
+
#
|
86
|
+
# ## Copyright Info
|
87
|
+
#
|
88
|
+
# Author
|
89
|
+
# : Akira Yamada <akira@ruby-lang.org>
|
90
|
+
# Documentation
|
91
|
+
# : Akira Yamada <akira@ruby-lang.org> Dmitry V. Sabanin <sdmitry@lrn.ru>
|
92
|
+
# Vincent Batts <vbatts@hashbangbash.com>
|
93
|
+
# License
|
94
|
+
# : Copyright (c) 2001 akira yamada <akira@ruby-lang.org> You can redistribute
|
95
|
+
# it and/or modify it under the same term as Ruby.
|
96
|
+
# Revision
|
97
|
+
# : $Id$
|
98
|
+
#
|
99
|
+
#
|
100
|
+
module URI
|
101
|
+
# The default port for LDAPS URIs is 636, and the scheme is 'ldaps:' rather
|
102
|
+
# than 'ldap:'. Other than that, LDAPS URIs are identical to LDAP URIs;
|
103
|
+
# see URI::LDAP.
|
104
|
+
class LDAPS < LDAP
|
105
|
+
# A Default port of 636 for URI::LDAPS
|
106
|
+
DEFAULT_PORT: Integer
|
107
|
+
end
|
108
|
+
end
|
File without changes
|
data/steep/Gemfile.lock
CHANGED
@@ -1,19 +1,7 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../../steep
|
3
|
-
specs:
|
4
|
-
steep (0.27.0)
|
5
|
-
activesupport (>= 5.1)
|
6
|
-
ast_utils (~> 0.3.0)
|
7
|
-
language_server-protocol (~> 3.14.0.2)
|
8
|
-
listen (~> 3.1)
|
9
|
-
parser (~> 2.7.0)
|
10
|
-
rainbow (>= 2.2.2, < 4.0)
|
11
|
-
rbs (~> 0.11.0)
|
12
|
-
|
13
1
|
GEM
|
14
2
|
remote: https://rubygems.org/
|
15
3
|
specs:
|
16
|
-
activesupport (6.0.3.
|
4
|
+
activesupport (6.0.3.3)
|
17
5
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
6
|
i18n (>= 0.7, < 2)
|
19
7
|
minitest (~> 5.1)
|
@@ -32,13 +20,21 @@ GEM
|
|
32
20
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
33
21
|
rb-inotify (~> 0.9, >= 0.9.10)
|
34
22
|
minitest (5.14.2)
|
35
|
-
parser (2.7.1.
|
23
|
+
parser (2.7.1.5)
|
36
24
|
ast (~> 2.4.1)
|
37
25
|
rainbow (3.0.0)
|
38
26
|
rb-fsevent (0.10.4)
|
39
27
|
rb-inotify (0.10.1)
|
40
28
|
ffi (~> 1.0)
|
41
|
-
rbs (0.
|
29
|
+
rbs (0.12.2)
|
30
|
+
steep (0.28.0)
|
31
|
+
activesupport (>= 5.1)
|
32
|
+
ast_utils (~> 0.3.0)
|
33
|
+
language_server-protocol (~> 3.14.0.2)
|
34
|
+
listen (~> 3.1)
|
35
|
+
parser (~> 2.7.0)
|
36
|
+
rainbow (>= 2.2.2, < 4.0)
|
37
|
+
rbs (~> 0.12.0)
|
42
38
|
thor (1.0.1)
|
43
39
|
thread_safe (0.3.6)
|
44
40
|
tzinfo (1.2.7)
|
@@ -49,7 +45,7 @@ PLATFORMS
|
|
49
45
|
ruby
|
50
46
|
|
51
47
|
DEPENDENCIES
|
52
|
-
steep
|
48
|
+
steep
|
53
49
|
|
54
50
|
BUNDLED WITH
|
55
|
-
2.1.
|
51
|
+
2.1.4
|