rbs 0.12.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -1
  3. data/.gitignore +0 -1
  4. data/CHANGELOG.md +31 -0
  5. data/Gemfile +3 -0
  6. data/README.md +8 -2
  7. data/Rakefile +2 -2
  8. data/Steepfile +1 -0
  9. data/bin/annotate-with-rdoc +1 -1
  10. data/bin/setup +0 -2
  11. data/docs/CONTRIBUTING.md +1 -0
  12. data/docs/syntax.md +50 -6
  13. data/goodcheck.yml +22 -5
  14. data/lib/rbs/ast/comment.rb +1 -1
  15. data/lib/rbs/cli.rb +12 -4
  16. data/lib/rbs/constant.rb +1 -1
  17. data/lib/rbs/constant_table.rb +9 -8
  18. data/lib/rbs/definition_builder.rb +6 -7
  19. data/lib/rbs/environment.rb +5 -1
  20. data/lib/rbs/environment_loader.rb +12 -12
  21. data/lib/rbs/namespace.rb +1 -1
  22. data/lib/rbs/parser.rb +3148 -0
  23. data/lib/rbs/parser.y +10 -3
  24. data/lib/rbs/prototype/rb.rb +38 -6
  25. data/lib/rbs/prototype/runtime.rb +17 -7
  26. data/lib/rbs/test/hook.rb +2 -0
  27. data/lib/rbs/test/setup_helper.rb +4 -4
  28. data/lib/rbs/test/tester.rb +4 -1
  29. data/lib/rbs/test/type_check.rb +12 -6
  30. data/lib/rbs/type_name.rb +1 -1
  31. data/lib/rbs/variance_calculator.rb +2 -2
  32. data/lib/rbs/version.rb +1 -1
  33. data/lib/rbs/writer.rb +25 -15
  34. data/sig/constant.rbs +21 -0
  35. data/sig/constant_table.rbs +30 -0
  36. data/sig/declarations.rbs +2 -2
  37. data/sig/definition.rbs +2 -2
  38. data/sig/definition_builder.rbs +4 -5
  39. data/sig/environment_loader.rbs +54 -0
  40. data/sig/members.rbs +2 -2
  41. data/sig/method_types.rbs +1 -1
  42. data/sig/namespace.rbs +4 -4
  43. data/sig/parser.rbs +25 -0
  44. data/sig/substitution.rbs +3 -3
  45. data/sig/typename.rbs +1 -1
  46. data/sig/types.rbs +1 -1
  47. data/sig/version.rbs +3 -0
  48. data/sig/writer.rbs +40 -0
  49. data/stdlib/base64/base64.rbs +1 -1
  50. data/stdlib/benchmark/benchmark.rbs +2 -2
  51. data/stdlib/builtin/array.rbs +124 -120
  52. data/stdlib/builtin/basic_object.rbs +54 -54
  53. data/stdlib/builtin/binding.rbs +42 -42
  54. data/stdlib/builtin/builtin.rbs +28 -0
  55. data/stdlib/builtin/class.rbs +33 -33
  56. data/stdlib/builtin/complex.rbs +90 -90
  57. data/stdlib/builtin/encoding.rbs +33 -33
  58. data/stdlib/builtin/enumerable.rbs +58 -52
  59. data/stdlib/builtin/enumerator.rbs +35 -35
  60. data/stdlib/builtin/errors.rbs +2 -2
  61. data/stdlib/builtin/exception.rbs +50 -50
  62. data/stdlib/builtin/false_class.rbs +6 -6
  63. data/stdlib/builtin/fiber.rbs +14 -14
  64. data/stdlib/builtin/fiber_error.rbs +1 -1
  65. data/stdlib/builtin/float.rbs +161 -161
  66. data/stdlib/builtin/gc.rbs +3 -3
  67. data/stdlib/builtin/hash.rbs +7 -7
  68. data/stdlib/builtin/io.rbs +88 -88
  69. data/stdlib/builtin/kernel.rbs +71 -153
  70. data/stdlib/builtin/match_data.rbs +1 -1
  71. data/stdlib/builtin/method.rbs +19 -19
  72. data/stdlib/builtin/module.rbs +13 -13
  73. data/stdlib/builtin/nil_class.rbs +20 -20
  74. data/stdlib/builtin/numeric.rbs +101 -101
  75. data/stdlib/builtin/object.rbs +173 -173
  76. data/stdlib/builtin/proc.rbs +91 -91
  77. data/stdlib/builtin/random.rbs +1 -1
  78. data/stdlib/builtin/range.rbs +3 -5
  79. data/stdlib/builtin/rational.rbs +83 -83
  80. data/stdlib/builtin/signal.rbs +7 -7
  81. data/stdlib/builtin/string.rbs +10 -10
  82. data/stdlib/builtin/string_io.rbs +8 -8
  83. data/stdlib/builtin/struct.rbs +1 -1
  84. data/stdlib/builtin/symbol.rbs +1 -1
  85. data/stdlib/builtin/thread.rbs +189 -189
  86. data/stdlib/builtin/thread_group.rbs +2 -2
  87. data/stdlib/builtin/true_class.rbs +10 -10
  88. data/stdlib/builtin/warning.rbs +1 -1
  89. data/stdlib/coverage/coverage.rbs +2 -2
  90. data/stdlib/csv/csv.rbs +1 -1
  91. data/stdlib/date/date.rbs +4 -4
  92. data/stdlib/date/date_time.rbs +1 -1
  93. data/stdlib/find/find.rbs +12 -12
  94. data/stdlib/logger/log_device.rbs +1 -1
  95. data/stdlib/logger/logger.rbs +1 -1
  96. data/stdlib/pathname/pathname.rbs +41 -39
  97. data/stdlib/pstore/pstore.rbs +287 -0
  98. data/stdlib/pty/pty.rbs +5 -29
  99. data/stdlib/tmpdir/tmpdir.rbs +12 -12
  100. data/stdlib/uri/generic.rbs +2 -2
  101. data/stdlib/uri/http.rbs +158 -0
  102. data/stdlib/uri/https.rbs +108 -0
  103. data/stdlib/uri/ldap.rbs +224 -0
  104. data/stdlib/uri/ldaps.rbs +108 -0
  105. data/steep/Gemfile.lock +13 -17
  106. metadata +13 -3
@@ -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
@@ -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.2)
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.4)
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.11.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.3
51
+ 2.1.4
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-15 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RBS is the language for type signatures for Ruby and standard library
14
14
  definitions.
@@ -101,6 +101,8 @@ files:
101
101
  - sig/buffer.rbs
102
102
  - sig/builtin_names.rbs
103
103
  - sig/comment.rbs
104
+ - sig/constant.rbs
105
+ - sig/constant_table.rbs
104
106
  - sig/declarations.rbs
105
107
  - sig/definition.rbs
106
108
  - sig/definition_builder.rbs
@@ -110,6 +112,7 @@ files:
110
112
  - sig/members.rbs
111
113
  - sig/method_types.rbs
112
114
  - sig/namespace.rbs
115
+ - sig/parser.rbs
113
116
  - sig/polyfill.rbs
114
117
  - sig/rbs.rbs
115
118
  - sig/substitution.rbs
@@ -118,6 +121,8 @@ files:
118
121
  - sig/types.rbs
119
122
  - sig/util.rbs
120
123
  - sig/variance_calculator.rbs
124
+ - sig/version.rbs
125
+ - sig/writer.rbs
121
126
  - stdlib/abbrev/abbrev.rbs
122
127
  - stdlib/base64/base64.rbs
123
128
  - stdlib/benchmark/benchmark.rbs
@@ -198,12 +203,17 @@ files:
198
203
  - stdlib/pathname/pathname.rbs
199
204
  - stdlib/prime/integer-extension.rbs
200
205
  - stdlib/prime/prime.rbs
206
+ - stdlib/pstore/pstore.rbs
201
207
  - stdlib/pty/pty.rbs
202
208
  - stdlib/securerandom/securerandom.rbs
203
209
  - stdlib/set/set.rbs
204
210
  - stdlib/tmpdir/tmpdir.rbs
205
211
  - stdlib/uri/file.rbs
206
212
  - stdlib/uri/generic.rbs
213
+ - stdlib/uri/http.rbs
214
+ - stdlib/uri/https.rbs
215
+ - stdlib/uri/ldap.rbs
216
+ - stdlib/uri/ldaps.rbs
207
217
  - stdlib/zlib/zlib.rbs
208
218
  - steep/Gemfile
209
219
  - steep/Gemfile.lock
@@ -230,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
240
  - !ruby/object:Gem::Version
231
241
  version: '0'
232
242
  requirements: []
233
- rubygems_version: 3.2.0.rc.1
243
+ rubygems_version: 3.1.2
234
244
  signing_key:
235
245
  specification_version: 4
236
246
  summary: Type signature for Ruby.