rbs 2.8.0.pre.1 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/comments.yml +21 -20
- data/.github/workflows/ruby.yml +53 -53
- data/CHANGELOG.md +31 -0
- data/Gemfile.lock +2 -2
- data/core/io/buffer.rbs +13 -5
- data/core/method.rbs +9 -1
- data/core/random.rbs +67 -0
- data/core/rbs/unnamed/argf.rbs +6 -6
- data/core/rubygems/rubygems.rbs +2 -2
- data/core/unbound_method.rbs +9 -1
- data/docs/rbs_by_example.md +1 -1
- data/ext/rbs_extension/location.h +1 -1
- data/ext/rbs_extension/parser.c +2 -2
- data/ext/rbs_extension/parserstate.c +6 -0
- data/lib/rbs/cli.rb +8 -4
- data/lib/rbs/collection/config.rb +1 -1
- data/lib/rbs/version.rb +1 -1
- data/sig/collection/config.rbs +1 -1
- data/sig/rdoc/rbs.rbs +1 -1
- data/sig/variance_calculator.rbs +1 -1
- data/sig/vendorer.rbs +1 -1
- data/stdlib/cgi/0/core.rbs +18 -9
- data/stdlib/csv/0/csv.rbs +738 -217
- data/stdlib/net-http/0/net-http.rbs +1 -20
- data/stdlib/yaml/0/yaml.rbs +30 -2
- data/steep/Gemfile.lock +3 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7260861dc5546d0f4673c4cbff61a97b222553fbedb0f0cf7b45fffa7e70fc29
|
4
|
+
data.tar.gz: 3a354b926470d26670ac209c3190f0a934289126b4ed484180eebf81d9c9a076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07842180f916e2726333424a6263e05f8cfff54a1165c144fd6dab1137ab26a129ca0a5d22531483868a2cf1b3008bc8e617893f98de4d9433bb0b482fc910ce'
|
7
|
+
data.tar.gz: 861ac0661a1784d29c2bff49683d4d679d84bf788f20bf899a5c6596d341437a38dc1eb8072f027c44f199f17b0e056203db097056306c6363ac5076072045a8
|
@@ -12,23 +12,24 @@ jobs:
|
|
12
12
|
container:
|
13
13
|
image: rubylang/ruby:3.1-focal
|
14
14
|
steps:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- name: Install dependencies
|
17
|
+
run: |
|
18
|
+
apt-get update
|
19
|
+
apt-get install -y libdb-dev curl
|
20
|
+
- name: Update rubygems & bundler
|
21
|
+
run: |
|
22
|
+
ruby -v
|
23
|
+
gem update --system
|
24
|
+
- name: bundle config set with
|
25
|
+
run: |
|
26
|
+
echo "NO_MINITEST=true" >> $GITHUB_ENV
|
27
|
+
bundle config set --local without 'minitest'
|
28
|
+
if: "contains(matrix.container_tag, 'master-nightly')"
|
29
|
+
- name: bin/setup
|
30
|
+
run: |
|
31
|
+
bin/setup
|
32
|
+
- name: Check if `rake annotate` has been executed
|
33
|
+
run: |
|
34
|
+
git config --global --add safe.directory `pwd`
|
35
|
+
bundle exec rake annotate confirm_annotation
|
data/.github/workflows/ruby.yml
CHANGED
@@ -12,70 +12,70 @@ jobs:
|
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
14
|
container_tag:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
- master-nightly-focal
|
16
|
+
- 3.1-focal
|
17
|
+
- 3.0-focal
|
18
|
+
- 2.7-bionic
|
19
|
+
- 2.6-bionic
|
20
20
|
job:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
- test
|
22
|
+
- stdlib_test
|
23
|
+
- rubocop validate test_doc build test_generate_stdlib
|
24
|
+
- lexer confirm_lexer
|
25
|
+
- lexer compile
|
26
26
|
exclude:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
- container_tag: master-nightly-focal
|
28
|
+
job: confirm_lexer
|
29
|
+
- container_tag: 2.6-bionic
|
30
|
+
job: stdlib_test
|
31
|
+
- container_tag: 2.7-bionic
|
32
|
+
job: stdlib_test
|
33
|
+
- container_tag: 3.0-focal
|
34
|
+
job: stdlib_test
|
35
35
|
container:
|
36
36
|
image: rubylang/ruby:${{ matrix.container_tag }}
|
37
37
|
steps:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
38
|
+
- uses: actions/checkout@v3
|
39
|
+
- name: Set working directory as safe
|
40
|
+
run: /usr/bin/git config --global --add safe.directory $(pwd)
|
41
|
+
- name: Install dependencies
|
42
|
+
run: |
|
43
|
+
apt-get update
|
44
|
+
apt-get install -y libdb-dev curl autoconf automake m4 libtool
|
45
|
+
- name: Install Re2c
|
46
|
+
if: contains(matrix.job, 'lexer')
|
47
|
+
run: |
|
48
|
+
cd /tmp
|
49
|
+
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/3.0.tar.gz > re2c-3.0.tar.gz
|
50
|
+
tar xf re2c-3.0.tar.gz
|
51
|
+
cd re2c-3.0
|
52
|
+
autoreconf -i -W all
|
53
|
+
./configure
|
54
|
+
make
|
55
|
+
make install
|
56
|
+
- name: Update rubygems & bundler
|
57
|
+
run: |
|
58
|
+
ruby -v
|
59
|
+
gem update --system
|
60
|
+
- name: bundle config set with
|
61
|
+
run: |
|
62
|
+
echo "NO_MINITEST=true" >> $GITHUB_ENV
|
63
|
+
bundle config set --local without 'minitest'
|
64
|
+
if: "contains(matrix.container_tag, 'master-nightly')"
|
65
|
+
- name: bin/setup
|
66
|
+
run: |
|
67
|
+
bin/setup
|
68
|
+
- name: Run test
|
69
|
+
run: |
|
70
|
+
bundle exec rake ${{ matrix.job }}
|
71
71
|
|
72
72
|
windows:
|
73
73
|
runs-on: ${{ matrix.os }}
|
74
74
|
strategy:
|
75
75
|
fail-fast: false
|
76
76
|
matrix:
|
77
|
-
os: [
|
78
|
-
ruby: [
|
77
|
+
os: [windows-2019, windows-2022]
|
78
|
+
ruby: [ucrt, mswin]
|
79
79
|
steps:
|
80
80
|
- uses: actions/checkout@v3
|
81
81
|
- name: load ruby
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,37 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 2.8.1 (2022-11-28)
|
6
|
+
|
7
|
+
### Signature updates
|
8
|
+
|
9
|
+
* Update documents based on ruby-3.1.3 ([#1160](https://github.com/ruby/rbs/pull/1160))
|
10
|
+
|
11
|
+
### Library changes
|
12
|
+
|
13
|
+
#### rbs collection
|
14
|
+
|
15
|
+
* Delay loading `Gemfile` for unbundled environments ([#1161](https://github.com/ruby/rbs/pull/1161))
|
16
|
+
|
17
|
+
### Miscellaneous
|
18
|
+
|
19
|
+
* Fix collection tests ([#1159](https://github.com/ruby/rbs/pull/1159), [#1162](https://github.com/ruby/rbs/pull/1162))
|
20
|
+
|
21
|
+
## 2.8.0 (2022-11-24)
|
22
|
+
|
23
|
+
### Signature updates
|
24
|
+
|
25
|
+
* random ([#1144](https://github.com/ruby/rbs/pull/1144))
|
26
|
+
|
27
|
+
### Library changes
|
28
|
+
|
29
|
+
* Fix SEGV when give invalid object to `variables:` ([#1153](https://github.com/ruby/rbs/pull/1153))
|
30
|
+
|
31
|
+
### Miscellaneous
|
32
|
+
|
33
|
+
* Fix some typos ([#1155](https://github.com/ruby/rbs/pull/1155))
|
34
|
+
* Fix a formatting some YAML files ([#1154](https://github.com/ruby/rbs/pull/1154))
|
35
|
+
|
5
36
|
## 2.8.0.pre.1 (2022-11-17)
|
6
37
|
|
7
38
|
### Signature updates
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rbs (2.8.
|
4
|
+
rbs (2.8.1)
|
5
5
|
|
6
6
|
PATH
|
7
7
|
remote: test/assets/test-gem
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
63
63
|
rspec-support (~> 3.12.0)
|
64
64
|
rspec-support (3.12.0)
|
65
|
-
rubocop (1.
|
65
|
+
rubocop (1.39.0)
|
66
66
|
json (~> 2.3)
|
67
67
|
parallel (~> 1.10)
|
68
68
|
parser (>= 3.1.2.1)
|
data/core/io/buffer.rbs
CHANGED
@@ -88,11 +88,13 @@ class IO
|
|
88
88
|
|
89
89
|
# <!--
|
90
90
|
# rdoc-file=io_buffer.c
|
91
|
-
# - IO::Buffer.for(string) -> io_buffer
|
91
|
+
# - IO::Buffer.for(string) -> readonly io_buffer
|
92
|
+
# - IO::Buffer.for(string) {|io_buffer| ... read/write io_buffer ...}
|
92
93
|
# -->
|
93
|
-
# Creates a IO::Buffer from the given string's memory.
|
94
|
-
#
|
95
|
-
#
|
94
|
+
# Creates a IO::Buffer from the given string's memory. Without a block a frozen
|
95
|
+
# internal copy of the string is created efficiently and used as the buffer
|
96
|
+
# source. When a block is provided, the buffer is associated directly with the
|
97
|
+
# string's internal data and updating the buffer will update the string.
|
96
98
|
#
|
97
99
|
# Until #free is invoked on the buffer, either explicitly or via the garbage
|
98
100
|
# collector, the source string will be locked and cannot be modified.
|
@@ -101,7 +103,7 @@ class IO
|
|
101
103
|
# modified.
|
102
104
|
#
|
103
105
|
# string = 'test'
|
104
|
-
# buffer = IO::Buffer.for(
|
106
|
+
# buffer = IO::Buffer.for(string)
|
105
107
|
# buffer.external? #=> true
|
106
108
|
#
|
107
109
|
# buffer.get_string(0, 1)
|
@@ -112,6 +114,12 @@ class IO
|
|
112
114
|
# buffer.resize(100)
|
113
115
|
# # in `resize': Cannot resize external buffer! (IO::Buffer::AccessError)
|
114
116
|
#
|
117
|
+
# IO::Buffer.for(string) do |buffer|
|
118
|
+
# buffer.set_string("T")
|
119
|
+
# string
|
120
|
+
# # => "Test"
|
121
|
+
# end
|
122
|
+
#
|
115
123
|
def self.for: (String) -> Buffer
|
116
124
|
|
117
125
|
# <!--
|
data/core/method.rbs
CHANGED
@@ -220,7 +220,15 @@ class Method < Object
|
|
220
220
|
# rdoc-file=proc.c
|
221
221
|
# - meth.owner -> class_or_module
|
222
222
|
# -->
|
223
|
-
# Returns the class or module
|
223
|
+
# Returns the class or module on which this method is defined. In other words,
|
224
|
+
#
|
225
|
+
# meth.owner.instance_methods(false).include?(meth.name) # => true
|
226
|
+
#
|
227
|
+
# holds as long as the method is not removed/undefined/replaced, (with
|
228
|
+
# private_instance_methods instead of instance_methods if the method is
|
229
|
+
# private).
|
230
|
+
#
|
231
|
+
# See also Method#receiver.
|
224
232
|
#
|
225
233
|
# (1..3).method(:map).owner #=> Enumerable
|
226
234
|
#
|
data/core/random.rbs
CHANGED
@@ -21,6 +21,26 @@
|
|
21
21
|
# use SecureRandom for security purpose, instead of this PRNG.
|
22
22
|
#
|
23
23
|
class Random < RBS::Unnamed::Random_Base
|
24
|
+
# <!--
|
25
|
+
# rdoc-file=random.c
|
26
|
+
# - Random.new(seed = Random.new_seed) -> prng
|
27
|
+
# -->
|
28
|
+
# Creates a new PRNG using `seed` to set the initial state. If `seed` is
|
29
|
+
# omitted, the generator is initialized with Random.new_seed.
|
30
|
+
#
|
31
|
+
# See Random.srand for more information on the use of seed values.
|
32
|
+
#
|
33
|
+
def initialize: (?Integer seed) -> void
|
34
|
+
|
35
|
+
# <!--
|
36
|
+
# rdoc-file=random.c
|
37
|
+
# - Random.bytes(size) -> string
|
38
|
+
# -->
|
39
|
+
# Returns a random binary string. The argument `size` specifies the length of
|
40
|
+
# the returned string.
|
41
|
+
#
|
42
|
+
def self.bytes: (Integer size) -> String
|
43
|
+
|
24
44
|
# <!--
|
25
45
|
# rdoc-file=random.c
|
26
46
|
# - prng1 == prng2 -> true or false
|
@@ -71,6 +91,7 @@ class Random < RBS::Unnamed::Random_Base
|
|
71
91
|
def self.rand: () -> Float
|
72
92
|
| (Integer | ::Range[Integer] max) -> Integer
|
73
93
|
| (Float | ::Range[Float] max) -> Float
|
94
|
+
| [T < Numeric] (::Range[T]) -> T
|
74
95
|
|
75
96
|
# <!--
|
76
97
|
# rdoc-file=random.c
|
@@ -95,6 +116,52 @@ class Random < RBS::Unnamed::Random_Base
|
|
95
116
|
# [ rand, rand ] # => [0.1915194503788923, 0.6221087710398319]
|
96
117
|
#
|
97
118
|
def self.srand: (?Integer number) -> Integer
|
119
|
+
|
120
|
+
# <!--
|
121
|
+
# rdoc-file=random.c
|
122
|
+
# - Random.urandom(size) -> string
|
123
|
+
# -->
|
124
|
+
# Returns a string, using platform providing features. Returned value is
|
125
|
+
# expected to be a cryptographically secure pseudo-random number in binary form.
|
126
|
+
# This method raises a RuntimeError if the feature provided by platform failed
|
127
|
+
# to prepare the result.
|
128
|
+
#
|
129
|
+
# In 2017, Linux manpage random(7) writes that "no cryptographic primitive
|
130
|
+
# available today can hope to promise more than 256 bits of security". So it
|
131
|
+
# might be questionable to pass size > 32 to this method.
|
132
|
+
#
|
133
|
+
# Random.urandom(8) #=> "\x78\x41\xBA\xAF\x7D\xEA\xD8\xEA"
|
134
|
+
#
|
135
|
+
def self.urandom: (Integer) -> String
|
136
|
+
|
137
|
+
# <!--
|
138
|
+
# rdoc-file=random.c
|
139
|
+
# - prng.seed -> integer
|
140
|
+
# -->
|
141
|
+
# Returns the seed value used to initialize the generator. This may be used to
|
142
|
+
# initialize another generator with the same state at a later time, causing it
|
143
|
+
# to produce the same sequence of numbers.
|
144
|
+
#
|
145
|
+
# prng1 = Random.new(1234)
|
146
|
+
# prng1.seed #=> 1234
|
147
|
+
# prng1.rand(100) #=> 47
|
148
|
+
#
|
149
|
+
# prng2 = Random.new(prng1.seed)
|
150
|
+
# prng2.rand(100) #=> 47
|
151
|
+
#
|
152
|
+
def seed: () -> Integer
|
153
|
+
|
154
|
+
private
|
155
|
+
|
156
|
+
def initialize_copy: (self object) -> self
|
157
|
+
|
158
|
+
def left: () -> untyped
|
159
|
+
|
160
|
+
def marshal_dump: () -> untyped
|
161
|
+
|
162
|
+
def marshal_load: (untyped) -> untyped
|
163
|
+
|
164
|
+
def state: () -> untyped
|
98
165
|
end
|
99
166
|
|
100
167
|
Random::DEFAULT: Random
|
data/core/rbs/unnamed/argf.rbs
CHANGED
@@ -768,15 +768,15 @@ module RBS
|
|
768
768
|
|
769
769
|
# <!--
|
770
770
|
# rdoc-file=io.c
|
771
|
-
# - ARGF.readlines(sep
|
771
|
+
# - ARGF.readlines(sep = $/) -> array
|
772
772
|
# - ARGF.readlines(limit) -> array
|
773
773
|
# - ARGF.readlines(sep, limit) -> array
|
774
|
-
# - ARGF.to_a(sep
|
774
|
+
# - ARGF.to_a(sep = $/) -> array
|
775
775
|
# - ARGF.to_a(limit) -> array
|
776
776
|
# - ARGF.to_a(sep, limit) -> array
|
777
777
|
# -->
|
778
|
-
# Reads `ARGF`
|
779
|
-
# lines
|
778
|
+
# Reads each file in `ARGF` in its entirety, returning an `Array` containing
|
779
|
+
# lines from the files. Lines are assumed to be separated by *sep*.
|
780
780
|
#
|
781
781
|
# lines = ARGF.readlines
|
782
782
|
# lines[0] #=> "This is line one\n"
|
@@ -893,8 +893,8 @@ module RBS
|
|
893
893
|
def tell: () -> Integer
|
894
894
|
|
895
895
|
# <!-- rdoc-file=io.c -->
|
896
|
-
# Reads `ARGF`
|
897
|
-
# lines
|
896
|
+
# Reads each file in `ARGF` in its entirety, returning an `Array` containing
|
897
|
+
# lines from the files. Lines are assumed to be separated by *sep*.
|
898
898
|
#
|
899
899
|
# lines = ARGF.readlines
|
900
900
|
# lines[0] #=> "This is line one\n"
|
data/core/rubygems/rubygems.rbs
CHANGED
@@ -155,8 +155,8 @@ module Gem
|
|
155
155
|
# rdoc-file=lib/rubygems.rb
|
156
156
|
# - activated_gem_paths()
|
157
157
|
# -->
|
158
|
-
# The number of paths in the
|
159
|
-
# prioritize `-I` and
|
158
|
+
# The number of paths in the +$LOAD_PATH+ from activated gems. Used to
|
159
|
+
# prioritize `-I` and +[ENV]('RUBYLIB')+ entries during `require`.
|
160
160
|
#
|
161
161
|
def self.activated_gem_paths: () -> Integer
|
162
162
|
|
data/core/unbound_method.rbs
CHANGED
@@ -153,7 +153,15 @@ class UnboundMethod
|
|
153
153
|
# rdoc-file=proc.c
|
154
154
|
# - meth.owner -> class_or_module
|
155
155
|
# -->
|
156
|
-
# Returns the class or module
|
156
|
+
# Returns the class or module on which this method is defined. In other words,
|
157
|
+
#
|
158
|
+
# meth.owner.instance_methods(false).include?(meth.name) # => true
|
159
|
+
#
|
160
|
+
# holds as long as the method is not removed/undefined/replaced, (with
|
161
|
+
# private_instance_methods instead of instance_methods if the method is
|
162
|
+
# private).
|
163
|
+
#
|
164
|
+
# See also Method#receiver.
|
157
165
|
#
|
158
166
|
# (1..3).method(:map).owner #=> Enumerable
|
159
167
|
#
|
data/docs/rbs_by_example.md
CHANGED
@@ -176,7 +176,7 @@ the type variable `Elem`, and the `?` suffix nilable marker.
|
|
176
176
|
When called with an `Integer` positional argument, the return value will be an
|
177
177
|
`Array` of whatever type is contained.
|
178
178
|
|
179
|
-
The `?` syntax is a convenient shorthand for a union with nil. An equivalent union type
|
179
|
+
The `?` syntax is a convenient shorthand for a union with nil. An equivalent union type would be `(Elem | nil)`.
|
180
180
|
|
181
181
|
### Keyword Arguments
|
182
182
|
|
@@ -28,7 +28,7 @@ typedef struct {
|
|
28
28
|
VALUE rbs_new_location(VALUE buffer, range rg);
|
29
29
|
|
30
30
|
/**
|
31
|
-
* Return rbs_loc
|
31
|
+
* Return rbs_loc associated with the RBS::Location object.
|
32
32
|
* */
|
33
33
|
rbs_loc *rbs_check_location(VALUE location);
|
34
34
|
|
data/ext/rbs_extension/parser.c
CHANGED
@@ -299,6 +299,12 @@ parserstate *alloc_parser(VALUE buffer, int start_pos, int end_pos, VALUE variab
|
|
299
299
|
parser_advance(parser);
|
300
300
|
|
301
301
|
if (!NIL_P(variables)) {
|
302
|
+
if (!RB_TYPE_P(variables, T_ARRAY)) {
|
303
|
+
rb_raise(rb_eTypeError,
|
304
|
+
"wrong argument type %"PRIsVALUE" (must be array or nil)",
|
305
|
+
rb_obj_class(variables));
|
306
|
+
}
|
307
|
+
|
302
308
|
parser_push_typevar_table(parser, true);
|
303
309
|
|
304
310
|
for (long i = 0; i < rb_array_len(variables); i++) {
|
data/lib/rbs/cli.rb
CHANGED
@@ -58,11 +58,11 @@ module RBS
|
|
58
58
|
self.core_root = nil
|
59
59
|
end
|
60
60
|
|
61
|
-
opts.on('--collection PATH', "File path of collection
|
61
|
+
opts.on('--collection PATH', "File path of collection configuration (default: #{@config_path})") do |path|
|
62
62
|
self.config_path = Pathname(path).expand_path
|
63
63
|
end
|
64
64
|
|
65
|
-
opts.on('--no-collection', 'Ignore collection
|
65
|
+
opts.on('--no-collection', 'Ignore collection configuration') do
|
66
66
|
self.config_path = nil
|
67
67
|
end
|
68
68
|
|
@@ -1034,15 +1034,17 @@ EOB
|
|
1034
1034
|
opts.order args.drop(1), into: params
|
1035
1035
|
config_path = options.config_path or raise
|
1036
1036
|
lock_path = Collection::Config.to_lockfile_path(config_path)
|
1037
|
-
gemfile_lock_path = Bundler.default_lockfile
|
1038
1037
|
|
1039
1038
|
case args[0]
|
1040
1039
|
when 'install'
|
1041
1040
|
unless params[:frozen]
|
1041
|
+
gemfile_lock_path = Bundler.default_lockfile
|
1042
1042
|
Collection::Config.generate_lockfile(config_path: config_path, gemfile_lock_path: gemfile_lock_path)
|
1043
1043
|
end
|
1044
1044
|
Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
|
1045
1045
|
when 'update'
|
1046
|
+
gemfile_lock_path = Bundler.default_lockfile
|
1047
|
+
|
1046
1048
|
# TODO: Be aware of argv to update only specified gem
|
1047
1049
|
Collection::Config.generate_lockfile(config_path: config_path, gemfile_lock_path: gemfile_lock_path, with_lockfile: false)
|
1048
1050
|
Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
|
@@ -1093,7 +1095,7 @@ EOB
|
|
1093
1095
|
|
1094
1096
|
Examples:
|
1095
1097
|
|
1096
|
-
# Initialize the
|
1098
|
+
# Initialize the configuration file
|
1097
1099
|
$ rbs collection init
|
1098
1100
|
|
1099
1101
|
# Generate the lock file and install RBSs from the lock file
|
@@ -1101,6 +1103,8 @@ EOB
|
|
1101
1103
|
|
1102
1104
|
# Update the RBSs
|
1103
1105
|
$ rbs collection update
|
1106
|
+
|
1107
|
+
Options:
|
1104
1108
|
HELP
|
1105
1109
|
opts.on('--frozen') if args[0] == 'install'
|
1106
1110
|
end
|
data/lib/rbs/version.rb
CHANGED
data/sig/collection/config.rbs
CHANGED
data/sig/rdoc/rbs.rbs
CHANGED
@@ -49,7 +49,7 @@ module RBS
|
|
49
49
|
# * If `#comment" returns a Comment object, it returns its `#string` value
|
50
50
|
# * If `#comment` returns `nil`, it raises an error
|
51
51
|
#
|
52
|
-
# Note that you have to confirm if the `#comment` of given
|
52
|
+
# Note that you have to confirm if the `#comment` of given declaration exists.
|
53
53
|
#
|
54
54
|
# ```ruby
|
55
55
|
# comment = construct_comment(context: context, comment: comment_string(decl)) if decl.comment
|
data/sig/variance_calculator.rbs
CHANGED
@@ -14,7 +14,7 @@ module RBS
|
|
14
14
|
# result = calculator.in_type_alias(name: name, args: args, variables: variables)
|
15
15
|
# ```
|
16
16
|
#
|
17
|
-
# See `RBS::
|
17
|
+
# See `RBS::VarianceCalculator::Result` for information recorded in the `Result` object.
|
18
18
|
#
|
19
19
|
class VarianceCalculator
|
20
20
|
type variance = :unused | :covariant | :contravariant | :invariant
|
data/sig/vendorer.rbs
CHANGED