tapioca 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 700c54640e9ef8478e5f06732407c6ea33bbaa98def51be92be7952235915dab
|
|
4
|
+
data.tar.gz: 391a4ca32fba379e0131b8990150f2f4e2229367aa5f49261ebd8dcbea997936
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3f626991d59d0f6813ee75f72787d657b86c334ac047457049d56e3f5ba86bf71258f060e3714ba3dba0dc70a5e0ce93fcc36a96c1b07d85fa9b6ab98782675
|
|
7
|
+
data.tar.gz: b93d8431e3486f2681cd388c69fb68016a470bf67571ecca77fe493567b0fcf49ad2d68250881cd9bf4f6700e7ccb3c33d756c5c2ee03785d58c3618f617f48c
|
|
@@ -37,6 +37,8 @@ module Tapioca
|
|
|
37
37
|
sig { params(blk: T.proc.params(constant: Module, rbi: RBI::File).void).void }
|
|
38
38
|
def run(&blk)
|
|
39
39
|
constants_to_process = gather_constants(requested_constants)
|
|
40
|
+
.select { |c| Reflection.name_of(c) && Module === c } # Filter anonymous or value constants
|
|
41
|
+
.sort_by! { |c| T.must(Reflection.name_of(c)) }
|
|
40
42
|
|
|
41
43
|
if constants_to_process.empty?
|
|
42
44
|
report_error(<<~ERROR)
|
|
@@ -45,7 +47,7 @@ module Tapioca
|
|
|
45
47
|
ERROR
|
|
46
48
|
end
|
|
47
49
|
|
|
48
|
-
constants_to_process.
|
|
50
|
+
constants_to_process.each do |constant|
|
|
49
51
|
rbi = rbi_for_constant(constant)
|
|
50
52
|
next if rbi.nil?
|
|
51
53
|
|
|
@@ -168,7 +168,8 @@ module Tapioca
|
|
|
168
168
|
comments = documentation_comments(name)
|
|
169
169
|
|
|
170
170
|
if klass_name == "T::Private::Types::TypeAlias"
|
|
171
|
-
|
|
171
|
+
type_alias = sanitize_signature_types(T.unsafe(value).aliased_type.to_s)
|
|
172
|
+
constant = RBI::Const.new(name, "T.type_alias { #{type_alias} }", comments: comments)
|
|
172
173
|
tree << constant
|
|
173
174
|
return
|
|
174
175
|
end
|
|
@@ -229,7 +230,8 @@ module Tapioca
|
|
|
229
230
|
|
|
230
231
|
sig { params(tree: RBI::Tree, constant: Module).void }
|
|
231
232
|
def compile_module_helpers(tree, constant)
|
|
232
|
-
abstract_type = T::Private::Abstract::Data.get(constant, :abstract_type)
|
|
233
|
+
abstract_type = T::Private::Abstract::Data.get(constant, :abstract_type) ||
|
|
234
|
+
T::Private::Abstract::Data.get(singleton_class_of(constant), :abstract_type)
|
|
233
235
|
|
|
234
236
|
tree << RBI::Helper.new(abstract_type.to_s) if abstract_type
|
|
235
237
|
tree << RBI::Helper.new("final") if T::Private::Final.final_module?(constant)
|
|
@@ -51,18 +51,27 @@ module Tapioca
|
|
|
51
51
|
def generate
|
|
52
52
|
require_gem_file
|
|
53
53
|
|
|
54
|
-
gems_to_generate(@gem_names)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
gems_to_process = gems_to_generate(@gem_names).reject { |gem| @gem_excludes.include?(gem.name) }
|
|
55
|
+
|
|
56
|
+
anything_done = [
|
|
57
|
+
perform_removals,
|
|
58
|
+
gems_to_process.any?,
|
|
59
|
+
].any?
|
|
60
|
+
|
|
61
|
+
gems_to_process.each do |gem|
|
|
62
|
+
say("Processing '#{gem.name}' gem:", :green)
|
|
63
|
+
shell.indent do
|
|
64
|
+
compile_gem_rbi(gem)
|
|
65
|
+
puts
|
|
62
66
|
end
|
|
67
|
+
end
|
|
63
68
|
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
if anything_done
|
|
70
|
+
say("All operations performed in working directory.", [:green, :bold])
|
|
71
|
+
say("Please review changes and commit them.", [:green, :bold])
|
|
72
|
+
else
|
|
73
|
+
say("No operations performed, all RBIs are up-to-date.", [:green, :bold])
|
|
74
|
+
end
|
|
66
75
|
end
|
|
67
76
|
|
|
68
77
|
sig { params(should_verify: T::Boolean).void }
|
data/lib/tapioca/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tapioca
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ufuk Kayserilioglu
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: exe
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2021-
|
|
14
|
+
date: 2021-12-03 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: bundler
|