rbs 2.0.0.pre1 → 2.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -2
- data/lib/rbs/version.rb +1 -1
- data/stdlib/uri/0/generic.rbs +34 -34
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d69ba0591c817c21a42f8bcd95f993fda8574e753f48bf05fd03f34dfa77b65b
|
4
|
+
data.tar.gz: 07dfb19e31c6d275bf51ce0391d161befde331dcdbc071bf8455239b94be9aaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c5efd986d31b8fbcbc0c50b7625fc743dbf3de0f82ef955909644653d6ec41ca9208fb89f5e0d2359a76f82f15aa627aeccc6ac43a62d9589c818a5d38fa12e
|
7
|
+
data.tar.gz: de8bab99ebb3a68ed3d61e261900d822e5f1fee8c5678bea38fd3e2e180138909181da2a769b147497e069c6c6b813edb24eef83f1a433cffc3c6ed79beeee23
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
### Bounded Generics
|
8
8
|
|
9
|
-
RBS 2.0 ships with _bounded generics_, which improves the expressiveness of the language by adding new syntax to define
|
9
|
+
RBS 2.0 ships with _bounded generics_, which improves the expressiveness of the language by adding a new syntax to define constraints on type parameters.
|
10
10
|
|
11
11
|
```rbs
|
12
12
|
class PrettyPrint[T < _Output]
|
@@ -28,7 +28,31 @@ It means _`T` has to be compatible with `_Output` interface._
|
|
28
28
|
|
29
29
|
See [the PR for details](https://github.com/ruby/rbs/pull/844).
|
30
30
|
|
31
|
-
|
31
|
+
### RBS Collection manager
|
32
|
+
|
33
|
+
RBS Collection feature is generally available on RBS 2.0. In short, it is Bundler for RBS. You can manage RBSs of standard libraries and third party gems with `rbs collection` subcommand.
|
34
|
+
|
35
|
+
```bash
|
36
|
+
$ rbs collection init
|
37
|
+
created: rbs_collection.yaml
|
38
|
+
|
39
|
+
# The `install` command set up RBS files and creates `rbs_collection.lock.yaml` file
|
40
|
+
$ rbs collection install
|
41
|
+
Installing actionpack:6.0 (actionpack@ce6664cec73)
|
42
|
+
(...snip...)
|
43
|
+
Using tsort:0 (/path/to/rbs-2.0.0/stdlib/tsort/0)
|
44
|
+
It's done! 21 gems' RBSs now installed.
|
45
|
+
|
46
|
+
# Now you can use `rbs`, `typeprof` and `steep` commands with the dependencies out of the box!
|
47
|
+
$ rbs validate
|
48
|
+
$ typeprof app.rb
|
49
|
+
$ steep check
|
50
|
+
```
|
51
|
+
|
52
|
+
RBS 2.0 also introduces `manifest.yaml` to declare the dependencies from your gems to standard libraries explicitly.
|
53
|
+
See [the documentation](https://github.com/ruby/rbs/blob/master/docs/collection.md) for more information.
|
54
|
+
|
55
|
+
### Breaking changes
|
32
56
|
|
33
57
|
This version contains a bug fix, which potentially breaks the compatibility with older versions.
|
34
58
|
The super class names in class definitions are now resolved in _outer_ context.
|
data/lib/rbs/version.rb
CHANGED
data/stdlib/uri/0/generic.rbs
CHANGED
@@ -193,14 +193,14 @@ module URI
|
|
193
193
|
#
|
194
194
|
# Creates a new URI::Generic instance from ``generic'' components without check.
|
195
195
|
#
|
196
|
-
def initialize: (String scheme, String userinfo, String host, Integer port,
|
196
|
+
def initialize: (String? scheme, String? userinfo, String? host, (String | Integer)? port, nil registry, String? path, String? opaque, String? query, String? fragment, ?untyped parser, ?boolish arg_check) -> void
|
197
197
|
|
198
198
|
#
|
199
199
|
# Returns the scheme component of the URI.
|
200
200
|
#
|
201
201
|
# URI("http://foo/bar/baz").scheme #=> "http"
|
202
202
|
#
|
203
|
-
attr_reader scheme: String
|
203
|
+
attr_reader scheme: String?
|
204
204
|
|
205
205
|
# Returns the host component of the URI.
|
206
206
|
#
|
@@ -222,14 +222,14 @@ module URI
|
|
222
222
|
# URI("http://[::1]/bar/baz").host #=> "[::1]"
|
223
223
|
# URI("http://[::1]/bar/baz").hostname #=> "::1"
|
224
224
|
#
|
225
|
-
attr_reader host: String
|
225
|
+
attr_reader host: String?
|
226
226
|
|
227
227
|
# Returns the port component of the URI.
|
228
228
|
#
|
229
229
|
# URI("http://foo/bar/baz").port #=> 80
|
230
230
|
# URI("http://foo:8080/bar/baz").port #=> 8080
|
231
231
|
#
|
232
|
-
attr_reader port: Integer
|
232
|
+
attr_reader port: Integer?
|
233
233
|
|
234
234
|
def registry: () -> nil
|
235
235
|
|
@@ -237,13 +237,13 @@ module URI
|
|
237
237
|
#
|
238
238
|
# URI("http://foo/bar/baz").path #=> "/bar/baz"
|
239
239
|
#
|
240
|
-
attr_reader path: String
|
240
|
+
attr_reader path: String?
|
241
241
|
|
242
242
|
# Returns the query component of the URI.
|
243
243
|
#
|
244
244
|
# URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar"
|
245
245
|
#
|
246
|
-
attr_reader query: String
|
246
|
+
attr_reader query: String?
|
247
247
|
|
248
248
|
# Returns the opaque part of the URI.
|
249
249
|
#
|
@@ -280,13 +280,13 @@ module URI
|
|
280
280
|
#
|
281
281
|
# Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME.
|
282
282
|
#
|
283
|
-
def check_scheme: (String v) -> true
|
283
|
+
def check_scheme: (String? v) -> true
|
284
284
|
|
285
285
|
# Protected setter for the scheme component +v+.
|
286
286
|
#
|
287
287
|
# See also URI::Generic.scheme=.
|
288
288
|
#
|
289
|
-
def set_scheme: (String v) -> String
|
289
|
+
def set_scheme: (String? v) -> String?
|
290
290
|
|
291
291
|
#
|
292
292
|
# == Args
|
@@ -309,7 +309,7 @@ module URI
|
|
309
309
|
# uri.scheme = "https"
|
310
310
|
# uri.to_s #=> "https://my.example.com"
|
311
311
|
#
|
312
|
-
def scheme=: (String v) -> String
|
312
|
+
def scheme=: (String? v) -> String?
|
313
313
|
|
314
314
|
#
|
315
315
|
# Checks the +user+ and +password+.
|
@@ -338,12 +338,12 @@ module URI
|
|
338
338
|
# Can not have a registry or opaque component defined,
|
339
339
|
# with a user component defined.
|
340
340
|
#
|
341
|
-
def check_password: (String v, ?String user) -> (String | true)
|
341
|
+
def check_password: (String? v, ?String user) -> (String? | true)
|
342
342
|
|
343
343
|
#
|
344
344
|
# Sets userinfo, argument is string like 'name:pass'.
|
345
345
|
#
|
346
|
-
def userinfo=: (String? userinfo) ->
|
346
|
+
def userinfo=: (String? userinfo) -> String?
|
347
347
|
|
348
348
|
#
|
349
349
|
# == Args
|
@@ -366,7 +366,7 @@ module URI
|
|
366
366
|
# uri.user = "sam"
|
367
367
|
# uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com"
|
368
368
|
#
|
369
|
-
def user=: (String user) -> String
|
369
|
+
def user=: (String? user) -> String?
|
370
370
|
|
371
371
|
#
|
372
372
|
# == Args
|
@@ -389,26 +389,26 @@ module URI
|
|
389
389
|
# uri.password = "V3ry_S3nsit1ve"
|
390
390
|
# uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com"
|
391
391
|
#
|
392
|
-
def password=: (String password) -> String
|
392
|
+
def password=: (String? password) -> String?
|
393
393
|
|
394
394
|
# Protected setter for the +user+ component, and +password+ if available
|
395
395
|
# (with validation).
|
396
396
|
#
|
397
397
|
# See also URI::Generic.userinfo=.
|
398
398
|
#
|
399
|
-
def set_userinfo: (String user, ?String? password) ->
|
399
|
+
def set_userinfo: (String? user, ?String? password) -> [String?, String?]
|
400
400
|
|
401
401
|
# Protected setter for the user component +v+.
|
402
402
|
#
|
403
403
|
# See also URI::Generic.user=.
|
404
404
|
#
|
405
|
-
def set_user: (String v) -> String
|
405
|
+
def set_user: (String? v) -> String?
|
406
406
|
|
407
407
|
# Protected setter for the password component +v+.
|
408
408
|
#
|
409
409
|
# See also URI::Generic.password=.
|
410
410
|
#
|
411
|
-
def set_password: (String v) -> String
|
411
|
+
def set_password: (String? v) -> String?
|
412
412
|
|
413
413
|
# Returns the userinfo +ui+ as <code>[user, password]</code>
|
414
414
|
# if properly formatted as 'user:password'.
|
@@ -421,10 +421,10 @@ module URI
|
|
421
421
|
def userinfo: () -> String?
|
422
422
|
|
423
423
|
# Returns the user component.
|
424
|
-
def user: () -> String
|
424
|
+
def user: () -> String?
|
425
425
|
|
426
426
|
# Returns the password component.
|
427
|
-
def password: () -> String
|
427
|
+
def password: () -> String?
|
428
428
|
|
429
429
|
#
|
430
430
|
# Checks the host +v+ component for RFC2396 compliance
|
@@ -433,13 +433,13 @@ module URI
|
|
433
433
|
# Can not have a registry or opaque component defined,
|
434
434
|
# with a host component defined.
|
435
435
|
#
|
436
|
-
def check_host: (String v) ->
|
436
|
+
def check_host: (String? v) -> true?
|
437
437
|
|
438
438
|
# Protected setter for the host component +v+.
|
439
439
|
#
|
440
440
|
# See also URI::Generic.host=.
|
441
441
|
#
|
442
|
-
def set_host: (String v) -> String
|
442
|
+
def set_host: (String? v) -> String?
|
443
443
|
|
444
444
|
#
|
445
445
|
# == Args
|
@@ -462,7 +462,7 @@ module URI
|
|
462
462
|
# uri.host = "foo.com"
|
463
463
|
# uri.to_s #=> "http://foo.com"
|
464
464
|
#
|
465
|
-
def host=: (String v) -> String
|
465
|
+
def host=: (String? v) -> String?
|
466
466
|
|
467
467
|
# Extract the host part of the URI and unwrap brackets for IPv6 addresses.
|
468
468
|
#
|
@@ -473,7 +473,7 @@ module URI
|
|
473
473
|
# uri.hostname #=> "::1"
|
474
474
|
# uri.host #=> "[::1]"
|
475
475
|
#
|
476
|
-
def hostname: () -> String
|
476
|
+
def hostname: () -> String?
|
477
477
|
|
478
478
|
# Sets the host part of the URI as the argument with brackets for IPv6 addresses.
|
479
479
|
#
|
@@ -487,7 +487,7 @@ module URI
|
|
487
487
|
# If the argument seems to be an IPv6 address,
|
488
488
|
# it is wrapped with brackets.
|
489
489
|
#
|
490
|
-
def hostname=: (String v) -> String
|
490
|
+
def hostname=: (String? v) -> String?
|
491
491
|
|
492
492
|
#
|
493
493
|
# Checks the port +v+ component for RFC2396 compliance
|
@@ -496,13 +496,13 @@ module URI
|
|
496
496
|
# Can not have a registry or opaque component defined,
|
497
497
|
# with a port component defined.
|
498
498
|
#
|
499
|
-
def check_port: (Integer v) ->
|
499
|
+
def check_port: ((String | Integer)? v) -> true?
|
500
500
|
|
501
501
|
# Protected setter for the port component +v+.
|
502
502
|
#
|
503
503
|
# See also URI::Generic.port=.
|
504
504
|
#
|
505
|
-
def set_port: (Integer v) -> Integer
|
505
|
+
def set_port: ((String | Integer)? v) -> (String | Integer)?
|
506
506
|
|
507
507
|
#
|
508
508
|
# == Args
|
@@ -525,7 +525,7 @@ module URI
|
|
525
525
|
# uri.port = 8080
|
526
526
|
# uri.to_s #=> "http://my.example.com:8080"
|
527
527
|
#
|
528
|
-
def port=: (Integer v) -> Integer
|
528
|
+
def port=: ((String | Integer)? v) -> (String | Integer)?
|
529
529
|
|
530
530
|
def check_registry: (String v) -> nil
|
531
531
|
|
@@ -541,13 +541,13 @@ module URI
|
|
541
541
|
# Can not have a opaque component defined,
|
542
542
|
# with a path component defined.
|
543
543
|
#
|
544
|
-
def check_path: (String v) -> true
|
544
|
+
def check_path: (String? v) -> true
|
545
545
|
|
546
546
|
# Protected setter for the path component +v+.
|
547
547
|
#
|
548
548
|
# See also URI::Generic.path=.
|
549
549
|
#
|
550
|
-
def set_path: (String v) -> String
|
550
|
+
def set_path: (String? v) -> String?
|
551
551
|
|
552
552
|
#
|
553
553
|
# == Args
|
@@ -570,7 +570,7 @@ module URI
|
|
570
570
|
# uri.path = "/faq/"
|
571
571
|
# uri.to_s #=> "http://my.example.com/faq/"
|
572
572
|
#
|
573
|
-
def path=: (String v) -> String
|
573
|
+
def path=: (String? v) -> String?
|
574
574
|
|
575
575
|
#
|
576
576
|
# == Args
|
@@ -590,7 +590,7 @@ module URI
|
|
590
590
|
# uri.query = "id=1"
|
591
591
|
# uri.to_s #=> "http://my.example.com/?id=1"
|
592
592
|
#
|
593
|
-
def query=: (String v) -> String
|
593
|
+
def query=: (String? v) -> String?
|
594
594
|
|
595
595
|
#
|
596
596
|
# Checks the opaque +v+ component for RFC2396 compliance and
|
@@ -599,13 +599,13 @@ module URI
|
|
599
599
|
# Can not have a host, port, user, or path component defined,
|
600
600
|
# with an opaque component defined.
|
601
601
|
#
|
602
|
-
def check_opaque: (String v) ->
|
602
|
+
def check_opaque: (String? v) -> true?
|
603
603
|
|
604
604
|
# Protected setter for the opaque component +v+.
|
605
605
|
#
|
606
606
|
# See also URI::Generic.opaque=.
|
607
607
|
#
|
608
|
-
def set_opaque: (String v) -> String
|
608
|
+
def set_opaque: (String? v) -> String?
|
609
609
|
|
610
610
|
#
|
611
611
|
# == Args
|
@@ -620,7 +620,7 @@ module URI
|
|
620
620
|
#
|
621
621
|
# See also URI::Generic.check_opaque.
|
622
622
|
#
|
623
|
-
def opaque=: (String v) -> String
|
623
|
+
def opaque=: (String? v) -> String?
|
624
624
|
|
625
625
|
#
|
626
626
|
# Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT.
|
@@ -644,7 +644,7 @@ module URI
|
|
644
644
|
# uri.fragment = "time=1305212086"
|
645
645
|
# uri.to_s #=> "http://my.example.com/?id=25#time=1305212086"
|
646
646
|
#
|
647
|
-
def fragment=: (String v) -> String
|
647
|
+
def fragment=: (String? v) -> String?
|
648
648
|
|
649
649
|
#
|
650
650
|
# Returns true if URI is hierarchical.
|
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: 2.0.0.
|
4
|
+
version: 2.0.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-24 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.
|