sorbet 0.4.4375 → 0.4.4378
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/srb +1 -1
- data/bin/srb-rbi +37 -35
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7706a8c20fd75ef8344b06345f3710e9183bd86a
|
4
|
+
data.tar.gz: fb9aec4854a9c679e59d37de0735f14e09f6108b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 470347b3263b0e49f282f3a8d64fce0222079c4fc557ef87827453c4dc2384eea004c60086c8b33d2adb44abe98173e26be5c3ea117d233d942475c3d82a4009
|
7
|
+
data.tar.gz: 4d91e0fe95e3d5c81a293caf9529acdae721f6860a6e277b96311dd3a5b42d9e935f9059b419e6ec6afb932c4241f088dd86b03f19342528ee378cbe1492172f
|
data/bin/srb
CHANGED
data/bin/srb-rbi
CHANGED
@@ -14,6 +14,29 @@ require_relative '../lib/suggest-typed'
|
|
14
14
|
require_relative '../lib/todo-rbi'
|
15
15
|
|
16
16
|
module Sorbet::Private::Main
|
17
|
+
def self.usage
|
18
|
+
"Usage: srb rbi <command>
|
19
|
+
This script gets your current directory ready for using Sorbet by making all sorts of files in ./sorbet/. You should commit them to version control.
|
20
|
+
|
21
|
+
We recommend running it without any options which will execute all the commands in order. If you only need a certain piece, you can pass a command to just run that part.
|
22
|
+
|
23
|
+
You should re-run this script if your program ever stops typechecking due to dynamic code in your project.
|
24
|
+
|
25
|
+
Common Commands:
|
26
|
+
help Print this message
|
27
|
+
<empty> | update Run all initialization commands
|
28
|
+
|
29
|
+
Specific Commands:
|
30
|
+
config Recreate sorbet/config
|
31
|
+
sorbet-typed Download community maintained type definitions for gems
|
32
|
+
gems Generate arity-only type definitions by requiring the gem
|
33
|
+
hidden-definitions Load all your code and generate type definitions for any dynamic code
|
34
|
+
todo Run Sorbet and generate constants which Sorbet errors on
|
35
|
+
suggest-typed Put the highest `typed:` sigil in each of your files
|
36
|
+
find-gem-rbis Find all `rbi/` directories in your gems and list them in `~/.cache/sorbet`
|
37
|
+
"
|
38
|
+
end
|
39
|
+
|
17
40
|
def self.emojify(emoji, msg)
|
18
41
|
if STDOUT.isatty && RUBY_PLATFORM =~ /darwin/
|
19
42
|
"#{emoji} #{msg}"
|
@@ -38,10 +61,7 @@ module Sorbet::Private::Main
|
|
38
61
|
end
|
39
62
|
end
|
40
63
|
|
41
|
-
def self.
|
42
|
-
command = parse_command(argv)
|
43
|
-
return command.call if command
|
44
|
-
|
64
|
+
def self.init
|
45
65
|
puts "
|
46
66
|
#{emojify("👋", "Hey there!")}
|
47
67
|
|
@@ -73,7 +93,7 @@ actions:
|
|
73
93
|
STDOUT.write(emojify("❔", "Would you like to continue? [Y/n] "))
|
74
94
|
if STDIN.isatty && STDOUT.isatty
|
75
95
|
begin
|
76
|
-
input =
|
96
|
+
input = STDIN.gets&.strip
|
77
97
|
if input.nil? || (input != '' && input != 'y' && input != 'Y')
|
78
98
|
puts "\nAborting"
|
79
99
|
Kernel.exit(1)
|
@@ -162,35 +182,19 @@ If instead you want to explore your files locally, here are some things to try:
|
|
162
182
|
"
|
163
183
|
end
|
164
184
|
|
165
|
-
def self.
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
We recommend running it without any options which will execute all the commands in order. If you only need a certain piece, you can pass a command to just run that part.
|
172
|
-
|
173
|
-
You should re-run this script if your program ever stops typechecking due to dynamic code in your project."
|
174
|
-
commands = "
|
175
|
-
Common Commands:
|
176
|
-
help Print this message
|
177
|
-
<empty> | update Run all initialization commands
|
178
|
-
|
179
|
-
Specific Commands:
|
180
|
-
config Recreate sorbet/config
|
181
|
-
sorbet-typed Download community maintained type definitions for gems
|
182
|
-
gems Generate arity-only type definitions by requiring the gem
|
183
|
-
hidden-definitions Load all your code and generate type definitions for any dynamic code
|
184
|
-
todo Run Sorbet and generate constants which Sorbet errors on
|
185
|
-
suggest-typed Put the highest `typed:` sigil in each of your files
|
186
|
-
find-gem-rbis Find all `rbi/` directories in your gems and list them in `~/.cache/sorbet`
|
187
|
-
"
|
185
|
+
def self.main(argv)
|
186
|
+
if argv.length == 0
|
187
|
+
puts self.usage
|
188
|
+
exit(1)
|
189
|
+
end
|
188
190
|
|
189
191
|
command = case (argv[0])
|
190
192
|
when 'help', '--help'
|
191
|
-
puts
|
192
|
-
puts commands
|
193
|
+
puts self.usage
|
193
194
|
exit(1)
|
195
|
+
when 'init', 'update'
|
196
|
+
self.init
|
197
|
+
return
|
194
198
|
when 'config', Sorbet::Private::CreateConfig.output_file
|
195
199
|
make_step(Sorbet::Private::CreateConfig)
|
196
200
|
when 'sorbet-typed', Sorbet::Private::FetchRBIs.output_file, Sorbet::Private::FetchRBIs::SORBET_RBI_LIST
|
@@ -207,17 +211,15 @@ If instead you want to explore your files locally, here are some things to try:
|
|
207
211
|
when 'find-gem-rbis', "#{ENV['HOME']}/.cache/sorbet/gem-rbis", "#{ENV['HOME']}/.cache/sorbet/gem-rbis/"
|
208
212
|
make_step(Sorbet::Private::FindGemRBIs)
|
209
213
|
|
210
|
-
when 'update'
|
211
|
-
nil
|
212
|
-
|
213
214
|
else
|
214
215
|
puts "Unknown comand: #{argv[0]}"
|
215
|
-
puts
|
216
|
+
puts self.usage
|
216
217
|
exit(1)
|
217
218
|
end
|
218
219
|
|
219
220
|
puts "Running command: #{argv[0]}"
|
220
|
-
command
|
221
|
+
command.call
|
222
|
+
nil
|
221
223
|
end
|
222
224
|
|
223
225
|
T::Sig::WithoutRuntime.sig {params(step: Sorbet::Private::StepInterface).returns(T.proc.void)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4378
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-static
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.4.
|
19
|
+
version: 0.4.4378
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.4.
|
26
|
+
version: 0.4.4378
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|