tapioca 0.17.10 → 0.18.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/README.md +1 -0
- data/lib/tapioca/bundler_ext/auto_require_hook.rb +0 -3
- data/lib/tapioca/cli.rb +0 -2
- data/lib/tapioca/commands/annotations.rb +0 -2
- data/lib/tapioca/commands/check_shims.rb +0 -1
- data/lib/tapioca/commands/command.rb +0 -1
- data/lib/tapioca/dsl/compiler.rb +0 -4
- data/lib/tapioca/dsl/compilers/aasm.rb +0 -4
- data/lib/tapioca/dsl/compilers/action_controller_helpers.rb +0 -4
- data/lib/tapioca/dsl/compilers/action_mailer.rb +0 -4
- data/lib/tapioca/dsl/compilers/action_text.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_job.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_model_attributes.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_model_secure_password.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb +0 -2
- data/lib/tapioca/dsl/compilers/active_record_associations.rb +0 -5
- data/lib/tapioca/dsl/compilers/active_record_columns.rb +0 -3
- data/lib/tapioca/dsl/compilers/active_record_delegated_types.rb +0 -3
- data/lib/tapioca/dsl/compilers/active_record_enum.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_record_fixtures.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_record_relations.rb +33 -6
- data/lib/tapioca/dsl/compilers/active_record_scope.rb +0 -1
- data/lib/tapioca/dsl/compilers/active_record_secure_token.rb +0 -3
- data/lib/tapioca/dsl/compilers/active_record_store.rb +0 -3
- data/lib/tapioca/dsl/compilers/active_record_typed_store.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_resource.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_storage.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_support_concern.rb +0 -4
- data/lib/tapioca/dsl/compilers/active_support_current_attributes.rb +3 -18
- data/lib/tapioca/dsl/compilers/active_support_environment_inquirer.rb +60 -0
- data/lib/tapioca/dsl/compilers/active_support_time_ext.rb +0 -4
- data/lib/tapioca/dsl/compilers/config.rb +0 -4
- data/lib/tapioca/dsl/compilers/frozen_record.rb +0 -4
- data/lib/tapioca/dsl/compilers/graphql_input_object.rb +0 -4
- data/lib/tapioca/dsl/compilers/graphql_mutation.rb +0 -4
- data/lib/tapioca/dsl/compilers/identity_cache.rb +0 -4
- data/lib/tapioca/dsl/compilers/json_api_client_resource.rb +3 -17
- data/lib/tapioca/dsl/compilers/kredis.rb +0 -4
- data/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb +0 -4
- data/lib/tapioca/dsl/compilers/protobuf.rb +0 -4
- data/lib/tapioca/dsl/compilers/rails_generators.rb +0 -4
- data/lib/tapioca/dsl/compilers/sidekiq_worker.rb +0 -4
- data/lib/tapioca/dsl/compilers/smart_properties.rb +0 -4
- data/lib/tapioca/dsl/compilers/state_machines.rb +0 -4
- data/lib/tapioca/dsl/compilers/url_helpers.rb +0 -3
- data/lib/tapioca/dsl/helpers/active_model_type_helper.rb +0 -2
- data/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb +0 -5
- data/lib/tapioca/dsl/helpers/active_record_constants_helper.rb +0 -2
- data/lib/tapioca/dsl/helpers/graphql_type_helper.rb +0 -2
- data/lib/tapioca/dsl/pipeline.rb +0 -2
- data/lib/tapioca/executor.rb +0 -2
- data/lib/tapioca/gem/events.rb +0 -15
- data/lib/tapioca/gem/listeners/base.rb +0 -1
- data/lib/tapioca/gem/listeners/dynamic_mixins.rb +0 -2
- data/lib/tapioca/gem/listeners/foreign_constants.rb +0 -2
- data/lib/tapioca/gem/listeners/methods.rb +0 -2
- data/lib/tapioca/gem/listeners/mixins.rb +0 -2
- data/lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb +0 -2
- data/lib/tapioca/gem/listeners/sorbet_enums.rb +0 -2
- data/lib/tapioca/gem/listeners/sorbet_helpers.rb +0 -2
- data/lib/tapioca/gem/listeners/sorbet_props.rb +0 -1
- data/lib/tapioca/gem/listeners/sorbet_required_ancestors.rb +0 -2
- data/lib/tapioca/gem/listeners/sorbet_signatures.rb +0 -2
- data/lib/tapioca/gem/listeners/sorbet_type_variables.rb +0 -2
- data/lib/tapioca/gem/listeners/source_location.rb +6 -7
- data/lib/tapioca/gem/listeners/subconstants.rb +0 -2
- data/lib/tapioca/gem/listeners/yard_doc.rb +0 -2
- data/lib/tapioca/gem/pipeline.rb +0 -3
- data/lib/tapioca/gemfile.rb +0 -2
- data/lib/tapioca/helpers/cli_helper.rb +0 -1
- data/lib/tapioca/helpers/config_helper.rb +0 -1
- data/lib/tapioca/helpers/env_helper.rb +0 -1
- data/lib/tapioca/helpers/gem_helper.rb +0 -2
- data/lib/tapioca/helpers/git_attributes.rb +0 -2
- data/lib/tapioca/helpers/package_url.rb +416 -0
- data/lib/tapioca/helpers/rbi_files_helper.rb +0 -1
- data/lib/tapioca/helpers/rbi_helper.rb +0 -3
- data/lib/tapioca/helpers/sorbet_helper.rb +0 -2
- data/lib/tapioca/helpers/test/content.rb +0 -1
- data/lib/tapioca/helpers/test/dsl_compiler.rb +0 -3
- data/lib/tapioca/helpers/test/isolation.rb +0 -6
- data/lib/tapioca/helpers/test/template.rb +1 -9
- data/lib/tapioca/internal.rb +1 -1
- data/lib/tapioca/loaders/dsl.rb +0 -4
- data/lib/tapioca/loaders/gem.rb +0 -4
- data/lib/tapioca/loaders/loader.rb +0 -1
- data/lib/tapioca/rbi_ext/model.rb +0 -2
- data/lib/tapioca/rbi_formatter.rb +0 -2
- data/lib/tapioca/repo_index.rb +0 -3
- data/lib/tapioca/runtime/dynamic_mixin_compiler.rb +0 -3
- data/lib/tapioca/runtime/generic_type_registry.rb +0 -4
- data/lib/tapioca/runtime/reflection.rb +6 -12
- data/lib/tapioca/runtime/trackers/autoload.rb +0 -3
- data/lib/tapioca/runtime/trackers/constant_definition.rb +27 -5
- data/lib/tapioca/runtime/trackers/method_definition.rb +0 -1
- data/lib/tapioca/runtime/trackers/mixin.rb +0 -3
- data/lib/tapioca/runtime/trackers/required_ancestor.rb +0 -2
- data/lib/tapioca/runtime/trackers/tracker.rb +0 -3
- data/lib/tapioca/runtime/trackers.rb +0 -4
- data/lib/tapioca/sorbet_ext/generic_name_patch.rb +0 -2
- data/lib/tapioca/static/requires_compiler.rb +0 -2
- data/lib/tapioca/static/symbol_loader.rb +0 -1
- data/lib/tapioca/static/symbol_table_parser.rb +0 -4
- data/lib/tapioca/version.rb +1 -1
- data/lib/tapioca.rb +0 -2
- metadata +18 -5
- data/lib/tapioca/helpers/source_uri.rb +0 -84
- data/lib/tapioca/runtime/attached_class_of_32.rb +0 -20
- data/lib/tapioca/runtime/attached_class_of_legacy.rb +0 -24
|
@@ -42,8 +42,6 @@ module Tapioca
|
|
|
42
42
|
# ```
|
|
43
43
|
#: [ConstantType = T::Module[top]]
|
|
44
44
|
class Config < Compiler
|
|
45
|
-
extend T::Sig
|
|
46
|
-
|
|
47
45
|
CONFIG_OPTIONS_SUFFIX = "ConfigOptions"
|
|
48
46
|
|
|
49
47
|
# @override
|
|
@@ -93,8 +91,6 @@ module Tapioca
|
|
|
93
91
|
end
|
|
94
92
|
|
|
95
93
|
class << self
|
|
96
|
-
extend T::Sig
|
|
97
|
-
|
|
98
94
|
# @override
|
|
99
95
|
#: -> Enumerable[T::Module[top]]
|
|
100
96
|
def gather_constants
|
|
@@ -60,8 +60,6 @@ module Tapioca
|
|
|
60
60
|
# ~~~
|
|
61
61
|
#: [ConstantType = (singleton(::FrozenRecord::Base) & Extensions::FrozenRecord)]
|
|
62
62
|
class FrozenRecord < Compiler
|
|
63
|
-
extend T::Sig
|
|
64
|
-
|
|
65
63
|
# @override
|
|
66
64
|
#: -> void
|
|
67
65
|
def decorate
|
|
@@ -85,8 +83,6 @@ module Tapioca
|
|
|
85
83
|
end
|
|
86
84
|
|
|
87
85
|
class << self
|
|
88
|
-
extend T::Sig
|
|
89
|
-
|
|
90
86
|
# @override
|
|
91
87
|
#: -> Enumerable[T::Module[top]]
|
|
92
88
|
def gather_constants
|
|
@@ -36,8 +36,6 @@ module Tapioca
|
|
|
36
36
|
# ~~~
|
|
37
37
|
#: [ConstantType = singleton(GraphQL::Schema::InputObject)]
|
|
38
38
|
class GraphqlInputObject < Compiler
|
|
39
|
-
extend T::Sig
|
|
40
|
-
|
|
41
39
|
# @override
|
|
42
40
|
#: -> void
|
|
43
41
|
def decorate
|
|
@@ -74,8 +72,6 @@ module Tapioca
|
|
|
74
72
|
end
|
|
75
73
|
|
|
76
74
|
class << self
|
|
77
|
-
extend T::Sig
|
|
78
|
-
|
|
79
75
|
# @override
|
|
80
76
|
#: -> Enumerable[T::Module[top]]
|
|
81
77
|
def gather_constants
|
|
@@ -37,8 +37,6 @@ module Tapioca
|
|
|
37
37
|
# ~~~
|
|
38
38
|
#: [ConstantType = singleton(GraphQL::Schema::Mutation)]
|
|
39
39
|
class GraphqlMutation < Compiler
|
|
40
|
-
extend T::Sig
|
|
41
|
-
|
|
42
40
|
# @override
|
|
43
41
|
#: -> void
|
|
44
42
|
def decorate
|
|
@@ -71,8 +69,6 @@ module Tapioca
|
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
class << self
|
|
74
|
-
extend T::Sig
|
|
75
|
-
|
|
76
72
|
# @override
|
|
77
73
|
#: -> Enumerable[T::Module[top]]
|
|
78
74
|
def gather_constants
|
|
@@ -57,8 +57,6 @@ module Tapioca
|
|
|
57
57
|
# ~~~
|
|
58
58
|
#: [ConstantType = singleton(::ActiveRecord::Base)]
|
|
59
59
|
class IdentityCache < Compiler
|
|
60
|
-
extend T::Sig
|
|
61
|
-
|
|
62
60
|
COLLECTION_TYPE = ->(type) { "T::Array[::#{type}]" } #: ^((T::Module[top] | String) type) -> String
|
|
63
61
|
|
|
64
62
|
# @override
|
|
@@ -92,8 +90,6 @@ module Tapioca
|
|
|
92
90
|
end
|
|
93
91
|
|
|
94
92
|
class << self
|
|
95
|
-
extend T::Sig
|
|
96
|
-
|
|
97
93
|
# @override
|
|
98
94
|
#: -> Enumerable[T::Module[top]]
|
|
99
95
|
def gather_constants
|
|
@@ -81,8 +81,6 @@ module Tapioca
|
|
|
81
81
|
# ~~~
|
|
82
82
|
#: [ConstantType = singleton(::JsonApiClient::Resource)]
|
|
83
83
|
class JsonApiClientResource < Compiler
|
|
84
|
-
extend T::Sig
|
|
85
|
-
|
|
86
84
|
# @override
|
|
87
85
|
#: -> void
|
|
88
86
|
def decorate
|
|
@@ -106,8 +104,6 @@ module Tapioca
|
|
|
106
104
|
end
|
|
107
105
|
|
|
108
106
|
class << self
|
|
109
|
-
extend T::Sig
|
|
110
|
-
|
|
111
107
|
# @override
|
|
112
108
|
#: -> Enumerable[T::Module[top]]
|
|
113
109
|
def gather_constants
|
|
@@ -142,17 +138,7 @@ module Tapioca
|
|
|
142
138
|
type = ::JsonApiClient::Schema::TypeFactory.type_for(property.type)
|
|
143
139
|
return "T.untyped" if type.nil?
|
|
144
140
|
|
|
145
|
-
|
|
146
|
-
line, file = type.method(:sorbet_type).source_location
|
|
147
|
-
|
|
148
|
-
$stderr.puts <<~MESSAGE
|
|
149
|
-
WARNING: `#sorbet_type` is deprecated. Please rename your method to `#__tapioca_type`."
|
|
150
|
-
|
|
151
|
-
Defined on line #{line} of #{file}
|
|
152
|
-
MESSAGE
|
|
153
|
-
|
|
154
|
-
type.sorbet_type
|
|
155
|
-
elsif type.respond_to?(:__tapioca_type)
|
|
141
|
+
tapioca_type = if type.respond_to?(:__tapioca_type)
|
|
156
142
|
type.__tapioca_type
|
|
157
143
|
elsif type == ::JsonApiClient::Schema::Types::Integer
|
|
158
144
|
"::Integer"
|
|
@@ -171,9 +157,9 @@ module Tapioca
|
|
|
171
157
|
end
|
|
172
158
|
|
|
173
159
|
if property.default.nil?
|
|
174
|
-
as_nilable_type(
|
|
160
|
+
as_nilable_type(tapioca_type)
|
|
175
161
|
else
|
|
176
|
-
|
|
162
|
+
tapioca_type
|
|
177
163
|
end
|
|
178
164
|
end
|
|
179
165
|
|
|
@@ -65,8 +65,6 @@ module Tapioca
|
|
|
65
65
|
# ~~~
|
|
66
66
|
#: [ConstantType = (Class[::Kredis::Attributes] & ::Kredis::Attributes::ClassMethods & Extensions::Kredis)]
|
|
67
67
|
class Kredis < Compiler
|
|
68
|
-
extend T::Sig
|
|
69
|
-
|
|
70
68
|
# @override
|
|
71
69
|
#: -> void
|
|
72
70
|
def decorate
|
|
@@ -85,8 +83,6 @@ module Tapioca
|
|
|
85
83
|
end
|
|
86
84
|
|
|
87
85
|
class << self
|
|
88
|
-
extend T::Sig
|
|
89
|
-
|
|
90
86
|
# @override
|
|
91
87
|
#: -> Enumerable[T::Module[top]]
|
|
92
88
|
def gather_constants
|
|
@@ -46,8 +46,6 @@ module Tapioca
|
|
|
46
46
|
# ~~~
|
|
47
47
|
#: [ConstantType = T::Module[top]]
|
|
48
48
|
class MixedInClassAttributes < Compiler
|
|
49
|
-
extend T::Sig
|
|
50
|
-
|
|
51
49
|
# @override
|
|
52
50
|
#: -> void
|
|
53
51
|
def decorate
|
|
@@ -60,8 +58,6 @@ module Tapioca
|
|
|
60
58
|
end
|
|
61
59
|
|
|
62
60
|
class << self
|
|
63
|
-
extend T::Sig
|
|
64
|
-
|
|
65
61
|
# @override
|
|
66
62
|
#: -> Enumerable[T::Module[top]]
|
|
67
63
|
def gather_constants
|
|
@@ -73,8 +73,6 @@ module Tapioca
|
|
|
73
73
|
prop :default, String
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
extend T::Sig
|
|
77
|
-
|
|
78
76
|
FIELD_RE = /^[a-z_][a-zA-Z0-9_]*$/
|
|
79
77
|
|
|
80
78
|
# @override
|
|
@@ -153,8 +151,6 @@ module Tapioca
|
|
|
153
151
|
end
|
|
154
152
|
|
|
155
153
|
class << self
|
|
156
|
-
extend T::Sig
|
|
157
|
-
|
|
158
154
|
# @override
|
|
159
155
|
#: -> Enumerable[T::Module[top]]
|
|
160
156
|
def gather_constants
|
|
@@ -35,8 +35,6 @@ module Tapioca
|
|
|
35
35
|
# ~~~
|
|
36
36
|
#: [ConstantType = singleton(::Rails::Generators::Base)]
|
|
37
37
|
class RailsGenerators < Compiler
|
|
38
|
-
extend T::Sig
|
|
39
|
-
|
|
40
38
|
BUILT_IN_MATCHER = /::(ActionMailbox|ActionText|ActiveRecord|Rails)::Generators/
|
|
41
39
|
|
|
42
40
|
# @override
|
|
@@ -57,8 +55,6 @@ module Tapioca
|
|
|
57
55
|
end
|
|
58
56
|
|
|
59
57
|
class << self
|
|
60
|
-
extend T::Sig
|
|
61
|
-
|
|
62
58
|
# @override
|
|
63
59
|
#: -> Enumerable[T::Module[top]]
|
|
64
60
|
def gather_constants
|
|
@@ -43,8 +43,6 @@ module Tapioca
|
|
|
43
43
|
# * `self.perform_in` will also accept a `ActiveSupport::Duration` value
|
|
44
44
|
#: [ConstantType = singleton(::Sidekiq::Worker)]
|
|
45
45
|
class SidekiqWorker < Compiler
|
|
46
|
-
extend T::Sig
|
|
47
|
-
|
|
48
46
|
# @override
|
|
49
47
|
#: -> void
|
|
50
48
|
def decorate
|
|
@@ -84,8 +82,6 @@ module Tapioca
|
|
|
84
82
|
end
|
|
85
83
|
|
|
86
84
|
class << self
|
|
87
|
-
extend T::Sig
|
|
88
|
-
|
|
89
85
|
# @override
|
|
90
86
|
#: -> Enumerable[T::Module[top]]
|
|
91
87
|
def gather_constants
|
|
@@ -60,8 +60,6 @@ module Tapioca
|
|
|
60
60
|
# ~~~
|
|
61
61
|
#: [ConstantType = singleton(::SmartProperties)]
|
|
62
62
|
class SmartProperties < Compiler
|
|
63
|
-
extend T::Sig
|
|
64
|
-
|
|
65
63
|
# @override
|
|
66
64
|
#: -> void
|
|
67
65
|
def decorate
|
|
@@ -81,8 +79,6 @@ module Tapioca
|
|
|
81
79
|
end
|
|
82
80
|
|
|
83
81
|
class << self
|
|
84
|
-
extend T::Sig
|
|
85
|
-
|
|
86
82
|
# @override
|
|
87
83
|
#: -> Enumerable[T::Module[top]]
|
|
88
84
|
def gather_constants
|
|
@@ -111,8 +111,6 @@ module Tapioca
|
|
|
111
111
|
# ~~~
|
|
112
112
|
#: [ConstantType = (T::Module[top] & ::StateMachines::ClassMethods)]
|
|
113
113
|
class StateMachines < Compiler
|
|
114
|
-
extend T::Sig
|
|
115
|
-
|
|
116
114
|
# @override
|
|
117
115
|
#: -> void
|
|
118
116
|
def decorate
|
|
@@ -155,8 +153,6 @@ module Tapioca
|
|
|
155
153
|
end
|
|
156
154
|
|
|
157
155
|
class << self
|
|
158
|
-
extend T::Sig
|
|
159
|
-
|
|
160
156
|
# @override
|
|
161
157
|
#: -> Enumerable[T::Module[top]]
|
|
162
158
|
def gather_constants
|
|
@@ -80,8 +80,6 @@ module Tapioca
|
|
|
80
80
|
# ~~~
|
|
81
81
|
#: [ConstantType = T::Module[top]]
|
|
82
82
|
class UrlHelpers < Compiler
|
|
83
|
-
extend T::Sig
|
|
84
|
-
|
|
85
83
|
# @override
|
|
86
84
|
#: -> void
|
|
87
85
|
def decorate
|
|
@@ -97,7 +95,6 @@ module Tapioca
|
|
|
97
95
|
end
|
|
98
96
|
|
|
99
97
|
class << self
|
|
100
|
-
extend T::Sig
|
|
101
98
|
# @override
|
|
102
99
|
#: -> Enumerable[T::Module[top]]
|
|
103
100
|
def gather_constants
|
|
@@ -6,8 +6,6 @@ module Tapioca
|
|
|
6
6
|
module Helpers
|
|
7
7
|
module ActiveModelTypeHelper
|
|
8
8
|
class << self
|
|
9
|
-
extend T::Sig
|
|
10
|
-
|
|
11
9
|
# Returns the type indicated by the custom ActiveModel::Type::Value.
|
|
12
10
|
# Accepts subclasses of ActiveModel::Type::Value as well as classes that implement similar methods.
|
|
13
11
|
#: (untyped type_value) -> String
|
|
@@ -7,12 +7,9 @@ module Tapioca
|
|
|
7
7
|
module Dsl
|
|
8
8
|
module Helpers
|
|
9
9
|
class ActiveRecordColumnTypeHelper
|
|
10
|
-
extend T::Sig
|
|
11
10
|
include RBIHelper
|
|
12
11
|
|
|
13
12
|
class ColumnTypeOption < T::Enum
|
|
14
|
-
extend T::Sig
|
|
15
|
-
|
|
16
13
|
enums do
|
|
17
14
|
Untyped = new("untyped")
|
|
18
15
|
Nilable = new("nilable")
|
|
@@ -20,8 +17,6 @@ module Tapioca
|
|
|
20
17
|
end
|
|
21
18
|
|
|
22
19
|
class << self
|
|
23
|
-
extend T::Sig
|
|
24
|
-
|
|
25
20
|
#: (
|
|
26
21
|
#| Hash[String, untyped] options,
|
|
27
22
|
#| ) { (String value, ColumnTypeOption default_column_type_option) -> void } -> ColumnTypeOption
|
data/lib/tapioca/dsl/pipeline.rb
CHANGED
data/lib/tapioca/executor.rb
CHANGED
data/lib/tapioca/gem/events.rb
CHANGED
|
@@ -5,12 +5,9 @@ module Tapioca
|
|
|
5
5
|
module Gem
|
|
6
6
|
# @abstract
|
|
7
7
|
class Event
|
|
8
|
-
extend T::Sig
|
|
9
8
|
end
|
|
10
9
|
|
|
11
10
|
class SymbolFound < Event
|
|
12
|
-
extend T::Sig
|
|
13
|
-
|
|
14
11
|
#: String
|
|
15
12
|
attr_reader :symbol
|
|
16
13
|
|
|
@@ -22,8 +19,6 @@ module Tapioca
|
|
|
22
19
|
end
|
|
23
20
|
|
|
24
21
|
class ConstantFound < Event
|
|
25
|
-
extend T::Sig
|
|
26
|
-
|
|
27
22
|
#: String
|
|
28
23
|
attr_reader :symbol
|
|
29
24
|
|
|
@@ -41,8 +36,6 @@ module Tapioca
|
|
|
41
36
|
end
|
|
42
37
|
|
|
43
38
|
class ForeignConstantFound < ConstantFound
|
|
44
|
-
extend T::Sig
|
|
45
|
-
|
|
46
39
|
# @override
|
|
47
40
|
#: -> T::Module[top]
|
|
48
41
|
def constant
|
|
@@ -57,8 +50,6 @@ module Tapioca
|
|
|
57
50
|
|
|
58
51
|
# @abstract
|
|
59
52
|
class NodeAdded < Event
|
|
60
|
-
extend T::Sig
|
|
61
|
-
|
|
62
53
|
#: String
|
|
63
54
|
attr_reader :symbol
|
|
64
55
|
|
|
@@ -74,8 +65,6 @@ module Tapioca
|
|
|
74
65
|
end
|
|
75
66
|
|
|
76
67
|
class ConstNodeAdded < NodeAdded
|
|
77
|
-
extend T::Sig
|
|
78
|
-
|
|
79
68
|
#: RBI::Const
|
|
80
69
|
attr_reader :node
|
|
81
70
|
|
|
@@ -87,8 +76,6 @@ module Tapioca
|
|
|
87
76
|
end
|
|
88
77
|
|
|
89
78
|
class ScopeNodeAdded < NodeAdded
|
|
90
|
-
extend T::Sig
|
|
91
|
-
|
|
92
79
|
#: RBI::Scope
|
|
93
80
|
attr_reader :node
|
|
94
81
|
|
|
@@ -102,8 +89,6 @@ module Tapioca
|
|
|
102
89
|
class ForeignScopeNodeAdded < ScopeNodeAdded; end
|
|
103
90
|
|
|
104
91
|
class MethodNodeAdded < NodeAdded
|
|
105
|
-
extend T::Sig
|
|
106
|
-
|
|
107
92
|
#: UnboundMethod
|
|
108
93
|
attr_reader :method
|
|
109
94
|
|
|
@@ -5,8 +5,6 @@ module Tapioca
|
|
|
5
5
|
module Gem
|
|
6
6
|
module Listeners
|
|
7
7
|
class SourceLocation < Base
|
|
8
|
-
extend T::Sig
|
|
9
|
-
|
|
10
8
|
private
|
|
11
9
|
|
|
12
10
|
# @override
|
|
@@ -64,12 +62,13 @@ module Tapioca
|
|
|
64
62
|
# we can clear the gem version if the gem is the same one we are processing
|
|
65
63
|
version = "" if gem == @pipeline.gem
|
|
66
64
|
|
|
67
|
-
uri =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
uri = Tapioca::Helpers::PackageURL.new(
|
|
66
|
+
type: "gem",
|
|
67
|
+
name: gem.name,
|
|
68
|
+
version: version,
|
|
69
|
+
subpath: "#{path}:#{line}",
|
|
72
70
|
)
|
|
71
|
+
|
|
73
72
|
node.comments << RBI::Comment.new("") if node.comments.any?
|
|
74
73
|
node.comments << RBI::Comment.new(uri.to_s)
|
|
75
74
|
rescue URI::InvalidComponentError, URI::InvalidURIError
|
data/lib/tapioca/gem/pipeline.rb
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
module Tapioca
|
|
5
5
|
module Gem
|
|
6
6
|
class Pipeline
|
|
7
|
-
extend T::Sig
|
|
8
7
|
include Runtime::Reflection
|
|
9
8
|
include RBIHelper
|
|
10
9
|
|
|
@@ -140,8 +139,6 @@ module Tapioca
|
|
|
140
139
|
|
|
141
140
|
# The method defined in gem and has a source location
|
|
142
141
|
class MethodInGemWithLocation < MethodDefinitionLookupResult
|
|
143
|
-
extend T::Sig
|
|
144
|
-
|
|
145
142
|
#: Runtime::SourceLocation
|
|
146
143
|
attr_reader :location
|
|
147
144
|
|
data/lib/tapioca/gemfile.rb
CHANGED