tapioca 0.7.0 → 0.8.0
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 +4 -4
- data/Gemfile +1 -1
- data/README.md +491 -73
- data/lib/tapioca/cli.rb +40 -3
- data/lib/tapioca/commands/annotations.rb +154 -0
- data/lib/tapioca/commands/dsl.rb +20 -1
- data/lib/tapioca/commands/gem.rb +17 -57
- data/lib/tapioca/commands/init.rb +1 -0
- data/lib/tapioca/commands/todo.rb +4 -2
- data/lib/tapioca/commands.rb +1 -0
- data/lib/tapioca/dsl/compiler.rb +2 -2
- data/lib/tapioca/dsl/compilers/aasm.rb +1 -1
- data/lib/tapioca/dsl/compilers/action_controller_helpers.rb +1 -1
- data/lib/tapioca/dsl/compilers/action_mailer.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_job.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_model_attributes.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_model_secure_password.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_record_associations.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_record_columns.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_record_enum.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_record_fixtures.rb +3 -1
- data/lib/tapioca/dsl/compilers/active_record_relations.rb +8 -8
- data/lib/tapioca/dsl/compilers/active_record_scope.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_record_typed_store.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_resource.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_storage.rb +6 -2
- data/lib/tapioca/dsl/compilers/active_support_concern.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_support_current_attributes.rb +1 -1
- data/lib/tapioca/dsl/compilers/config.rb +2 -2
- data/lib/tapioca/dsl/compilers/frozen_record.rb +1 -1
- data/lib/tapioca/dsl/compilers/identity_cache.rb +1 -1
- data/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb +1 -1
- data/lib/tapioca/dsl/compilers/protobuf.rb +27 -3
- data/lib/tapioca/dsl/compilers/rails_generators.rb +1 -1
- data/lib/tapioca/dsl/compilers/sidekiq_worker.rb +1 -1
- data/lib/tapioca/dsl/compilers/smart_properties.rb +1 -1
- data/lib/tapioca/dsl/compilers/state_machines.rb +1 -1
- data/lib/tapioca/dsl/compilers/url_helpers.rb +5 -2
- data/lib/tapioca/dsl/helpers/param_helper.rb +4 -1
- data/lib/tapioca/dsl/pipeline.rb +32 -1
- data/lib/tapioca/dsl.rb +6 -0
- data/lib/tapioca/executor.rb +4 -46
- data/lib/tapioca/gem/listeners/methods.rb +26 -1
- data/lib/tapioca/gem/listeners/sorbet_props.rb +1 -1
- data/lib/tapioca/gem/listeners/sorbet_required_ancestors.rb +1 -0
- data/lib/tapioca/gem/listeners/sorbet_signatures.rb +1 -1
- data/lib/tapioca/gem/pipeline.rb +5 -1
- data/lib/tapioca/gemfile.rb +50 -3
- data/lib/tapioca/helpers/config_helper.rb +13 -0
- data/lib/tapioca/helpers/rbi_helper.rb +114 -7
- data/lib/tapioca/helpers/shims_helper.rb +36 -8
- data/lib/tapioca/helpers/signatures_helper.rb +17 -0
- data/lib/tapioca/helpers/sorbet_helper.rb +5 -11
- data/lib/tapioca/helpers/test/content.rb +1 -0
- data/lib/tapioca/helpers/test/dsl_compiler.rb +1 -0
- data/lib/tapioca/helpers/test/template.rb +1 -0
- data/lib/tapioca/helpers/type_variable_helper.rb +43 -0
- data/lib/tapioca/internal.rb +4 -1
- data/lib/tapioca/rbi_ext/model.rb +14 -2
- data/lib/tapioca/repo_index.rb +41 -0
- data/lib/tapioca/runtime/generic_type_registry.rb +4 -2
- data/lib/tapioca/runtime/loader.rb +3 -0
- data/lib/tapioca/runtime/reflection.rb +17 -13
- data/lib/tapioca/sorbet_ext/generic_name_patch.rb +38 -21
- data/lib/tapioca/static/symbol_table_parser.rb +2 -0
- data/lib/tapioca/version.rb +1 -1
- data/lib/tapioca.rb +5 -0
- metadata +26 -21
data/lib/tapioca.rb
CHANGED
@@ -35,12 +35,17 @@ module Tapioca
|
|
35
35
|
DEFAULT_GEM_DIR = T.let("#{DEFAULT_RBI_DIR}/gems", String)
|
36
36
|
DEFAULT_SHIM_DIR = T.let("#{DEFAULT_RBI_DIR}/shims", String)
|
37
37
|
DEFAULT_TODO_FILE = T.let("#{DEFAULT_RBI_DIR}/todo.rbi", String)
|
38
|
+
DEFAULT_ANNOTATIONS_DIR = T.let("#{DEFAULT_RBI_DIR}/annotations", String)
|
38
39
|
|
39
40
|
DEFAULT_OVERRIDES = T.let({
|
40
41
|
# ActiveSupport overrides some core methods with different signatures
|
41
42
|
# so we generate a typed: false RBI for it to suppress errors
|
42
43
|
"activesupport" => "false",
|
43
44
|
}.freeze, T::Hash[String, String])
|
45
|
+
|
46
|
+
CENTRAL_REPO_ROOT_URI = "https://raw.githubusercontent.com/Shopify/rbi-central/main"
|
47
|
+
CENTRAL_REPO_INDEX_PATH = "index.json"
|
48
|
+
CENTRAL_REPO_ANNOTATIONS_DIR = "rbi/annotations"
|
44
49
|
end
|
45
50
|
|
46
51
|
require "tapioca/version"
|
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.
|
4
|
+
version: 0.8.0
|
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: 2022-
|
14
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -28,55 +28,55 @@ dependencies:
|
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 1.17.3
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: parallel
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: 1.21.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 1.21.0
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
|
-
name:
|
45
|
+
name: pry
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - "~>"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 0.0.0
|
51
48
|
- - ">="
|
52
49
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
50
|
+
version: 0.12.2
|
54
51
|
type: :runtime
|
55
52
|
prerelease: false
|
56
53
|
version_requirements: !ruby/object:Gem::Requirement
|
57
54
|
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 0.0.0
|
61
55
|
- - ">="
|
62
56
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
57
|
+
version: 0.12.2
|
64
58
|
- !ruby/object:Gem::Dependency
|
65
|
-
name:
|
59
|
+
name: rbi
|
66
60
|
requirement: !ruby/object:Gem::Requirement
|
67
61
|
requirements:
|
62
|
+
- - "~>"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 0.0.0
|
68
65
|
- - ">="
|
69
66
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
67
|
+
version: 0.0.14
|
71
68
|
type: :runtime
|
72
69
|
prerelease: false
|
73
70
|
version_requirements: !ruby/object:Gem::Requirement
|
74
71
|
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.0.0
|
75
75
|
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.0.14
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name: sorbet-static
|
79
|
+
name: sorbet-static-and-runtime
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - ">="
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: 1.1.0
|
99
99
|
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 1.1.
|
101
|
+
version: 1.1.11
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
version: 1.1.0
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 1.1.
|
111
|
+
version: 1.1.11
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: thor
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,12 +152,14 @@ files:
|
|
152
152
|
- lib/tapioca.rb
|
153
153
|
- lib/tapioca/cli.rb
|
154
154
|
- lib/tapioca/commands.rb
|
155
|
+
- lib/tapioca/commands/annotations.rb
|
155
156
|
- lib/tapioca/commands/command.rb
|
156
157
|
- lib/tapioca/commands/dsl.rb
|
157
158
|
- lib/tapioca/commands/gem.rb
|
158
159
|
- lib/tapioca/commands/init.rb
|
159
160
|
- lib/tapioca/commands/require.rb
|
160
161
|
- lib/tapioca/commands/todo.rb
|
162
|
+
- lib/tapioca/dsl.rb
|
161
163
|
- lib/tapioca/dsl/compiler.rb
|
162
164
|
- lib/tapioca/dsl/compilers.rb
|
163
165
|
- lib/tapioca/dsl/compilers/aasm.rb
|
@@ -214,14 +216,17 @@ files:
|
|
214
216
|
- lib/tapioca/helpers/config_helper.rb
|
215
217
|
- lib/tapioca/helpers/rbi_helper.rb
|
216
218
|
- lib/tapioca/helpers/shims_helper.rb
|
219
|
+
- lib/tapioca/helpers/signatures_helper.rb
|
217
220
|
- lib/tapioca/helpers/sorbet_helper.rb
|
218
221
|
- lib/tapioca/helpers/test/content.rb
|
219
222
|
- lib/tapioca/helpers/test/dsl_compiler.rb
|
220
223
|
- lib/tapioca/helpers/test/isolation.rb
|
221
224
|
- lib/tapioca/helpers/test/template.rb
|
225
|
+
- lib/tapioca/helpers/type_variable_helper.rb
|
222
226
|
- lib/tapioca/internal.rb
|
223
227
|
- lib/tapioca/rbi_ext/model.rb
|
224
228
|
- lib/tapioca/rbi_formatter.rb
|
229
|
+
- lib/tapioca/repo_index.rb
|
225
230
|
- lib/tapioca/runtime/dynamic_mixin_compiler.rb
|
226
231
|
- lib/tapioca/runtime/generic_type_registry.rb
|
227
232
|
- lib/tapioca/runtime/loader.rb
|
@@ -251,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
251
256
|
requirements:
|
252
257
|
- - ">="
|
253
258
|
- !ruby/object:Gem::Version
|
254
|
-
version: '2.
|
259
|
+
version: '2.7'
|
255
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
261
|
requirements:
|
257
262
|
- - ">="
|