yard-sorbet 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yard-sorbet/directives.rb +1 -3
- data/lib/yard-sorbet/handlers/abstract_dsl_handler.rb +2 -2
- data/lib/yard-sorbet/handlers/enums_handler.rb +1 -3
- data/lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb +1 -3
- data/lib/yard-sorbet/handlers/sig_handler.rb +4 -6
- data/lib/yard-sorbet/handlers/struct_prop_handler.rb +7 -13
- data/lib/yard-sorbet/node_utils.rb +17 -9
- data/lib/yard-sorbet/sig_to_yard.rb +101 -107
- data/lib/yard-sorbet/tag_utils.rb +1 -3
- data/lib/yard-sorbet/version.rb +1 -1
- metadata +8 -176
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1421bf5c36984eb95f6d05e83900bdc9599a052fa51edb2939cf9dc656f5722b
|
4
|
+
data.tar.gz: 3922ad972509e1bfb185903ff40dfce5952fca881ea4196f7c8c2f37a572ae24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a7531bf6292ee4d37d5257ce851d62a9738c8f9319595f5c638b30e9a0cb324980b5fa3608b6b45da1e7fa9940323e7e31cbab9621957e8b0addab86020f11c
|
7
|
+
data.tar.gz: 365dac401f8792a0841496ccb07a3b08ee5d88d5f1de29a38312094eddc659f6fc6b9b087032e11fa862a482c6d30dc2069244aa060719eb81666d5358b7d5d3
|
@@ -18,8 +18,6 @@ module YARDSorbet
|
|
18
18
|
end
|
19
19
|
|
20
20
|
sig { params(docstring: String, directives: T::Array[String]).void }
|
21
|
-
def self.add_directives(docstring, directives)
|
22
|
-
directives.each { docstring.concat("\n#{_1}") }
|
23
|
-
end
|
21
|
+
def self.add_directives(docstring, directives) = directives.each { docstring.concat("\n#{_1}") }
|
24
22
|
end
|
25
23
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module YARDSorbet
|
5
5
|
module Handlers
|
6
|
-
#
|
6
|
+
# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present).
|
7
7
|
class AbstractDSLHandler < YARD::Handlers::Ruby::Base
|
8
8
|
extend T::Sig
|
9
9
|
|
@@ -15,7 +15,7 @@ module YARDSorbet
|
|
15
15
|
# The `@abstract` tag template
|
16
16
|
TAG_TEXT = 'Subclasses must implement the `abstract` methods below.'
|
17
17
|
# Extra text for class namespaces
|
18
|
-
CLASS_TAG_TEXT = T.let("It cannot be directly instantiated. #{TAG_TEXT}", String)
|
18
|
+
CLASS_TAG_TEXT = T.let("It cannot be directly instantiated. #{TAG_TEXT}".freeze, String)
|
19
19
|
|
20
20
|
sig { void }
|
21
21
|
def process
|
@@ -26,9 +26,7 @@ module YARDSorbet
|
|
26
26
|
private
|
27
27
|
|
28
28
|
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
|
29
|
-
def const_assign_node?(node)
|
30
|
-
node.type == :assign && node[0][0].type == :const
|
31
|
-
end
|
29
|
+
def const_assign_node?(node) = node.type == :assign && node[0][0].type == :const
|
32
30
|
end
|
33
31
|
end
|
34
32
|
end
|
@@ -15,9 +15,7 @@ module YARDSorbet
|
|
15
15
|
@@mix_in_class_methods = T.let({}, T::Hash[String, T::Array[String]]) # rubocop:disable Style/ClassVars
|
16
16
|
|
17
17
|
sig { params(code_obj: String).returns(T.nilable(T::Array[String])) }
|
18
|
-
def self.mixed_in_class_methods(code_obj)
|
19
|
-
@@mix_in_class_methods[code_obj]
|
20
|
-
end
|
18
|
+
def self.mixed_in_class_methods(code_obj) = @@mix_in_class_methods[code_obj]
|
21
19
|
|
22
20
|
sig { void }
|
23
21
|
def process
|
@@ -37,7 +37,7 @@ module YARDSorbet
|
|
37
37
|
separator = scope == :instance && def_node.type == :def ? '#' : '.'
|
38
38
|
registered = YARD::Registry.at("#{namespace}#{separator}#{def_node.method_name(true)}")
|
39
39
|
if registered
|
40
|
-
parse_node(registered, registered.docstring)
|
40
|
+
parse_node(registered, statement.docstring || registered.docstring)
|
41
41
|
# Since we're probably in an RBI file, delete the def node, which could otherwise erroneously override the
|
42
42
|
# visibility setting
|
43
43
|
NodeUtils.delete_node(def_node)
|
@@ -64,21 +64,19 @@ module YARDSorbet
|
|
64
64
|
attrs = namespace.attributes[scope][names[0]]
|
65
65
|
return false if attrs.nil? || attrs.empty?
|
66
66
|
|
67
|
-
|
67
|
+
document_attrs(attrs.values.compact)
|
68
68
|
attr_node.docstring = nil
|
69
69
|
true
|
70
70
|
end
|
71
71
|
|
72
72
|
sig { params(method_objects: T::Array[YARD::CodeObjects::MethodObject]).void }
|
73
|
-
def
|
74
|
-
method_objects.each { parse_node(_1, _1.docstring, include_params: false) }
|
75
|
-
end
|
73
|
+
def document_attrs(method_objects) = method_objects.each { parse_node(_1, _1.docstring, include_params: false) }
|
76
74
|
|
77
75
|
sig { params(attach_to: Documentable, docstring: T.nilable(String), include_params: T::Boolean).void }
|
78
76
|
def parse_node(attach_to, docstring, include_params: true)
|
79
77
|
existing_docstring = docstring.is_a?(YARD::Docstring)
|
80
78
|
docstring, directives = Directives.extract_directives(docstring) unless existing_docstring
|
81
|
-
parse_sig(docstring, include_params:
|
79
|
+
parse_sig(docstring, include_params:)
|
82
80
|
attach_to.docstring = docstring.to_raw
|
83
81
|
Directives.add_directives(attach_to.docstring, directives) unless existing_docstring
|
84
82
|
end
|
@@ -13,7 +13,7 @@ module YARDSorbet
|
|
13
13
|
|
14
14
|
sig { void }
|
15
15
|
def process
|
16
|
-
name = params
|
16
|
+
name = params.dig(0, -1, -1).source
|
17
17
|
prop = make_prop(name)
|
18
18
|
update_state(prop)
|
19
19
|
object = YARD::CodeObjects::MethodObject.new(namespace, name, scope)
|
@@ -35,15 +35,11 @@ module YARDSorbet
|
|
35
35
|
end
|
36
36
|
|
37
37
|
sig { returns(T::Boolean) }
|
38
|
-
def immutable?
|
39
|
-
statement.method_name(true) == :const || kw_arg('immutable:') == 'true'
|
40
|
-
end
|
38
|
+
def immutable? = statement.method_name(true) == :const || kw_arg('immutable:') == 'true'
|
41
39
|
|
42
40
|
# @return the value passed to the keyword argument, or nil
|
43
41
|
sig { params(kwd: String).returns(T.nilable(String)) }
|
44
|
-
def kw_arg(kwd)
|
45
|
-
params[2]&.find { _1[0].source == kwd }&.[](1)&.source
|
46
|
-
end
|
42
|
+
def kw_arg(kwd) = params[2]&.find { _1[0].source == kwd }&.[](1)&.source
|
47
43
|
|
48
44
|
sig { params(name: String).returns(TStructProp) }
|
49
45
|
def make_prop(name)
|
@@ -52,21 +48,19 @@ module YARDSorbet
|
|
52
48
|
doc: statement.docstring.to_s,
|
53
49
|
prop_name: name,
|
54
50
|
source: statement.source,
|
55
|
-
types: SigToYARD.convert(params
|
51
|
+
types: SigToYARD.convert(params.fetch(1))
|
56
52
|
)
|
57
53
|
end
|
58
54
|
|
59
|
-
sig { returns(T::Array[
|
60
|
-
def params
|
61
|
-
@params ||= T.let(statement.parameters(false), T.nilable(T::Array[T.untyped]))
|
62
|
-
end
|
55
|
+
sig { returns(T::Array[YARD::Parser::Ruby::AstNode]) }
|
56
|
+
def params = @params ||= T.let(statement.parameters(false), T.nilable(T::Array[YARD::Parser::Ruby::AstNode]))
|
63
57
|
|
64
58
|
# Register the field explicitly as an attribute.
|
65
59
|
sig { params(object: YARD::CodeObjects::MethodObject, name: String).void }
|
66
60
|
def register_attrs(object, name)
|
67
61
|
write = immutable? ? nil : object
|
68
62
|
# Create the virtual attribute in our current scope
|
69
|
-
namespace.attributes[scope][name] ||= SymbolHash[read: object, write:
|
63
|
+
namespace.attributes[scope][name] ||= SymbolHash[read: object, write:]
|
70
64
|
end
|
71
65
|
|
72
66
|
# Store the prop for use in the constructor definition
|
@@ -19,25 +19,33 @@ module YARDSorbet
|
|
19
19
|
# @yield [YARD::Parser::Ruby::AstNode]
|
20
20
|
sig { params(node: YARD::Parser::Ruby::AstNode, _blk: T.proc.params(n: YARD::Parser::Ruby::AstNode).void).void }
|
21
21
|
def self.bfs_traverse(node, &_blk)
|
22
|
-
queue =
|
22
|
+
queue = Queue.new << node
|
23
23
|
until queue.empty?
|
24
|
-
n =
|
24
|
+
n = queue.deq(true)
|
25
25
|
yield n
|
26
|
-
n
|
27
|
-
queue.pop if n.is_a?(YARD::Parser::Ruby::MethodCallNode) && SKIP_METHOD_CONTENTS.include?(n.method_name(true))
|
26
|
+
enqueue_children(queue, n)
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
31
30
|
sig { params(node: YARD::Parser::Ruby::AstNode).void }
|
32
|
-
def self.delete_node(node)
|
33
|
-
|
31
|
+
def self.delete_node(node) = node.parent.children.delete(node)
|
32
|
+
|
33
|
+
# Enqueue the eligible children of a node in the BFS queue
|
34
|
+
sig { params(queue: Queue, node: YARD::Parser::Ruby::AstNode).void }
|
35
|
+
def self.enqueue_children(queue, node)
|
36
|
+
last_child = node.children.last
|
37
|
+
node.children.each do |child|
|
38
|
+
next if child == last_child &&
|
39
|
+
node.is_a?(YARD::Parser::Ruby::MethodCallNode) &&
|
40
|
+
SKIP_METHOD_CONTENTS.include?(node.method_name(true))
|
41
|
+
|
42
|
+
queue.enq(child)
|
43
|
+
end
|
34
44
|
end
|
35
45
|
|
36
46
|
# Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like
|
37
47
|
sig { params(node: YARD::Parser::Ruby::AstNode).returns(SigableNode) }
|
38
|
-
def self.get_method_node(node)
|
39
|
-
sigable_node?(node) ? node : node.jump(:def, :defs)
|
40
|
-
end
|
48
|
+
def self.get_method_node(node) = sigable_node?(node) ? node : node.jump(:def, :defs)
|
41
49
|
|
42
50
|
# Find and return the adjacent node (ascending)
|
43
51
|
# @raise [IndexError] if the node does not have an adjacent sibling (ascending)
|
@@ -4,127 +4,121 @@
|
|
4
4
|
module YARDSorbet
|
5
5
|
# Translate `sig` type syntax to `YARD` type syntax.
|
6
6
|
module SigToYARD
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
7
|
+
class << self
|
8
|
+
extend T::Sig
|
9
|
+
|
10
|
+
# Map of common types to YARD conventions (in order to reduce allocations)
|
11
|
+
REF_TYPES = T.let({
|
12
|
+
'T::Boolean' => ['Boolean'].freeze, # YARD convention for booleans
|
13
|
+
# YARD convention is to use singleton objects when applicable:
|
14
|
+
# https://www.rubydoc.info/gems/yard/file/docs/Tags.md#literals
|
15
|
+
'FalseClass' => ['false'].freeze,
|
16
|
+
'NilClass' => ['nil'].freeze,
|
17
|
+
'TrueClass' => ['true'].freeze
|
18
|
+
}.freeze, T::Hash[String, [String]])
|
19
|
+
private_constant :REF_TYPES
|
20
|
+
|
21
|
+
# @see https://yardoc.org/types.html
|
22
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) }
|
23
|
+
def convert(node) = convert_node(node).map { _1.gsub(/\n\s*/, ' ') }
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) }
|
28
|
+
def convert_node(node)
|
29
|
+
case node
|
30
|
+
when YARD::Parser::Ruby::MethodCallNode
|
31
|
+
node.namespace.source == 'T' ? convert_t_method(node) : [node.source]
|
32
|
+
when YARD::Parser::Ruby::ReferenceNode
|
33
|
+
node_source = node.source
|
34
|
+
REF_TYPES[node_source] || [node_source]
|
35
|
+
else convert_node_type(node)
|
36
|
+
end
|
33
37
|
end
|
34
|
-
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
39
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) }
|
40
|
+
def convert_node_type(node)
|
41
|
+
case node.type
|
42
|
+
when :aref then convert_aref(node)
|
43
|
+
when :arg_paren then convert_node(node.first)
|
44
|
+
when :array then convert_array(node)
|
45
|
+
# Fixed hashes as return values are unsupported:
|
46
|
+
# https://github.com/lsegal/yard/issues/425
|
47
|
+
#
|
48
|
+
# Hash key params can be individually documented with `@option`, but
|
49
|
+
# sig translation is currently unsupported.
|
50
|
+
when :hash then ['Hash']
|
51
|
+
# seen when sig methods omit parentheses
|
52
|
+
when :list then convert_list(node)
|
53
|
+
else convert_unknown(node)
|
54
|
+
end
|
51
55
|
end
|
52
|
-
end
|
53
56
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns(String) }
|
58
|
+
def build_generic_type(node)
|
59
|
+
return node.source if node.empty? || node.type != :aref
|
57
60
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) }
|
64
|
-
private_class_method def self.convert_aref(node)
|
65
|
-
# https://www.rubydoc.info/gems/yard/file/docs/Tags.md#Parametrized_Types
|
66
|
-
case node.first.source
|
67
|
-
when 'T::Array', 'T::Enumerable', 'T::Range', 'T::Set' then convert_collection(node)
|
68
|
-
when 'T::Hash' then convert_hash(node)
|
69
|
-
else
|
70
|
-
log.info("Unsupported sig aref node #{node.source}")
|
71
|
-
[build_generic_type(node)]
|
61
|
+
collection_type = node.first.source
|
62
|
+
member_type = node.last.children.map { build_generic_type(_1) }.join(', ')
|
63
|
+
"#{collection_type}[#{member_type}]"
|
72
64
|
end
|
73
|
-
end
|
74
65
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
end
|
66
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) }
|
67
|
+
def convert_aref(node)
|
68
|
+
# https://www.rubydoc.info/gems/yard/file/docs/Tags.md#parametrized-types
|
69
|
+
case node.first.source
|
70
|
+
when 'T::Array', 'T::Enumerable', 'T::Range', 'T::Set' then convert_collection(node)
|
71
|
+
when 'T::Hash' then convert_hash(node)
|
72
|
+
else
|
73
|
+
log.info("Unsupported sig aref node #{node.source}")
|
74
|
+
[build_generic_type(node)]
|
75
|
+
end
|
76
|
+
end
|
87
77
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
78
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns([String]) }
|
79
|
+
def convert_array(node)
|
80
|
+
# https://www.rubydoc.info/gems/yard/file/docs/Tags.md#order-dependent-lists
|
81
|
+
member_types = node.first.children.map { convert_node(_1) }
|
82
|
+
sequence = member_types.map { _1.size == 1 ? _1[0] : _1.to_s.tr('"', '') }.join(', ')
|
83
|
+
["Array<(#{sequence})>"]
|
84
|
+
end
|
94
85
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
end
|
86
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns([String]) }
|
87
|
+
def convert_collection(node)
|
88
|
+
collection_type = node.first.source.split('::').last
|
89
|
+
member_type = convert_node(node[-1][0]).join(', ')
|
90
|
+
["#{collection_type}<#{member_type}>"]
|
91
|
+
end
|
102
92
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
93
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns([String]) }
|
94
|
+
def convert_hash(node)
|
95
|
+
kv = node.last.children
|
96
|
+
key_type = convert_node(kv.first).join(', ')
|
97
|
+
value_type = convert_node(kv.last).join(', ')
|
98
|
+
["Hash{#{key_type} => #{value_type}}"]
|
99
|
+
end
|
107
100
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
101
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) }
|
102
|
+
def convert_list(node)
|
103
|
+
node.children.size == 1 ? convert_node(node.children.first) : [node.source]
|
104
|
+
end
|
112
105
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
106
|
+
sig { params(node: YARD::Parser::Ruby::MethodCallNode).returns(T::Array[String]) }
|
107
|
+
def convert_t_method(node)
|
108
|
+
case node.method_name(true)
|
109
|
+
# Order matters here, putting `nil` last results in a more concise return syntax in the UI (superscripted `?`):
|
110
|
+
# https://github.com/lsegal/yard/blob/cfa62ae/lib/yard/templates/helpers/html_helper.rb#L499-L500
|
111
|
+
when :nilable then convert_node(node.last) + REF_TYPES.fetch('NilClass')
|
112
|
+
when :any then node[-1][0].children.flat_map { convert_node(_1) }
|
113
|
+
else [node.source]
|
114
|
+
end
|
121
115
|
end
|
122
|
-
end
|
123
116
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
117
|
+
sig { params(node: YARD::Parser::Ruby::AstNode).returns([String]) }
|
118
|
+
def convert_unknown(node)
|
119
|
+
log.warn("Unsupported sig #{node.type} node #{node.source}")
|
120
|
+
[node.source]
|
121
|
+
end
|
128
122
|
end
|
129
123
|
end
|
130
124
|
end
|
@@ -13,9 +13,7 @@ module YARDSorbet
|
|
13
13
|
sig do
|
14
14
|
params(docstring: YARD::Docstring, tag_name: String, name: T.nilable(String)).returns(T.nilable(YARD::Tags::Tag))
|
15
15
|
end
|
16
|
-
def self.find_tag(docstring, tag_name, name)
|
17
|
-
docstring.tags.find { _1.tag_name == tag_name && _1.name == name }
|
18
|
-
end
|
16
|
+
def self.find_tag(docstring, tag_name, name) = docstring.tags.find { _1.tag_name == tag_name && _1.name == name }
|
19
17
|
|
20
18
|
# Create or update a `YARD` tag with type information
|
21
19
|
sig do
|
data/lib/yard-sorbet/version.rb
CHANGED
metadata
CHANGED
@@ -1,211 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Douglas Eichelberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler-audit
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.9.1
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.9.1
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: codecov
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.6.0
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.6.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '13.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '13.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: redcarpet
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '3.5'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '3.5'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.10'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.10'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 1.42.0
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 1.42.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-performance
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 1.15.0
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 1.15.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop-rake
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.6.0
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.6.0
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-rspec
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 2.16.0
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 2.16.0
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rubocop-sorbet
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 0.6.0
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 0.6.0
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: sorbet
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: 0.5.9204
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 0.5.9204
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: tapioca
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 0.10.0
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - "~>"
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 0.10.0
|
181
13
|
- !ruby/object:Gem::Dependency
|
182
14
|
name: sorbet-runtime
|
183
15
|
requirement: !ruby/object:Gem::Requirement
|
184
16
|
requirements:
|
185
17
|
- - ">="
|
186
18
|
- !ruby/object:Gem::Version
|
187
|
-
version: '0
|
19
|
+
version: '0'
|
188
20
|
type: :runtime
|
189
21
|
prerelease: false
|
190
22
|
version_requirements: !ruby/object:Gem::Requirement
|
191
23
|
requirements:
|
192
24
|
- - ">="
|
193
25
|
- !ruby/object:Gem::Version
|
194
|
-
version: '0
|
26
|
+
version: '0'
|
195
27
|
- !ruby/object:Gem::Dependency
|
196
28
|
name: yard
|
197
29
|
requirement: !ruby/object:Gem::Requirement
|
198
30
|
requirements:
|
199
31
|
- - ">="
|
200
32
|
- !ruby/object:Gem::Version
|
201
|
-
version: '0
|
33
|
+
version: '0'
|
202
34
|
type: :runtime
|
203
35
|
prerelease: false
|
204
36
|
version_requirements: !ruby/object:Gem::Requirement
|
205
37
|
requirements:
|
206
38
|
- - ">="
|
207
39
|
- !ruby/object:Gem::Version
|
208
|
-
version: '0
|
40
|
+
version: '0'
|
209
41
|
description: A YARD plugin that incorporates Sorbet type information
|
210
42
|
email: dduugg@gmail.com
|
211
43
|
executables: []
|
@@ -248,14 +80,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
248
80
|
requirements:
|
249
81
|
- - ">="
|
250
82
|
- !ruby/object:Gem::Version
|
251
|
-
version:
|
83
|
+
version: '3.1'
|
252
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
85
|
requirements:
|
254
86
|
- - ">="
|
255
87
|
- !ruby/object:Gem::Version
|
256
88
|
version: '0'
|
257
89
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.3.7
|
259
91
|
signing_key:
|
260
92
|
specification_version: 4
|
261
93
|
summary: Create YARD docs from Sorbet type signatures
|