rbs_activesupport 1.5.0 → 1.7.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/.rubocop.yml +24 -1
- data/.vscode/settings.json +9 -0
- data/lib/rbs_activesupport/declaration_builder.rb +19 -16
- data/lib/rbs_activesupport/generator.rb +17 -10
- data/lib/rbs_activesupport/include.rb +13 -4
- data/lib/rbs_activesupport/method_searcher.rb +26 -3
- data/lib/rbs_activesupport/parser.rb +4 -4
- data/lib/rbs_activesupport/rake_task.rb +2 -2
- data/lib/rbs_activesupport/version.rb +1 -1
- data/rbs_collection.lock.yaml +45 -45
- data/sig/rbs_activesupport/declaration_builder.rbs +4 -2
- data/sig/rbs_activesupport/generator.rbs +3 -0
- data/sig/rbs_activesupport/include.rbs +5 -1
- data/sig/rbs_activesupport/method_searcher.rbs +3 -0
- data/sig/rbs_activesupport/version.rbs +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19e6a457737b5dee37126028620021e9dd1254163d07aa7782a13866c28d1495
|
4
|
+
data.tar.gz: 8328c3624346731e91e7eb2b3e6ecb11724688986a87b793ee8803d9112c8448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27ac5ddadd39ff5aaf643931505f86b947555fa17a719a293926a320deb670c800e903de433352ed4866adc66f8e464f2bfe883931158852670ae2df4413a8e5
|
7
|
+
data.tar.gz: acefab7cbee5e46cdf80108a30f762f71c73a90b888bf465cd0b596968b80501335e261f92fc98ab4caaa6b5bf6f9b88ae3a09eceec1f9f4a899eeb1b96910f9
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2
|
2
|
+
TargetRubyVersion: 3.2
|
3
|
+
NewCops: enable
|
4
|
+
|
5
|
+
plugins:
|
6
|
+
- rubocop-rake
|
7
|
+
- rubocop-rspec
|
3
8
|
|
4
9
|
Layout/LeadingCommentSpace:
|
5
10
|
Enabled: false
|
@@ -25,6 +30,21 @@ Metrics/MethodLength:
|
|
25
30
|
Exclude:
|
26
31
|
- "lib/rbs_activesupport/ast.rb"
|
27
32
|
|
33
|
+
RSpec/ExampleLength:
|
34
|
+
Max: 30
|
35
|
+
|
36
|
+
RSpec/MultipleExpectations:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
RSpec/MultipleMemoizedHelpers:
|
40
|
+
Max: 10
|
41
|
+
|
42
|
+
RSpec/NamedSubject:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
RSpec/NestedGroups:
|
46
|
+
Max: 5
|
47
|
+
|
28
48
|
Style/AccessorGrouping:
|
29
49
|
Enabled: false
|
30
50
|
|
@@ -34,6 +54,9 @@ Style/CommentedKeyword:
|
|
34
54
|
Style/Documentation:
|
35
55
|
Enabled: false
|
36
56
|
|
57
|
+
Style/HashSyntax:
|
58
|
+
EnforcedShorthandSyntax: always
|
59
|
+
|
37
60
|
Style/StringLiterals:
|
38
61
|
EnforcedStyle: double_quotes
|
39
62
|
|
data/.vscode/settings.json
CHANGED
@@ -1,18 +1,27 @@
|
|
1
1
|
{
|
2
2
|
"rbs-helper.signature-directory": "sig/",
|
3
3
|
"cSpell.words": [
|
4
|
+
"bindir",
|
4
5
|
"boolish",
|
5
6
|
"cattr",
|
6
7
|
"classmethods",
|
7
8
|
"Cyclomatic",
|
8
9
|
"DEFN",
|
9
10
|
"FCALL",
|
11
|
+
"Includee",
|
12
|
+
"ivar",
|
13
|
+
"KOMIYA",
|
10
14
|
"mattr",
|
11
15
|
"mkpath",
|
12
16
|
"modname",
|
17
|
+
"popen",
|
13
18
|
"raketask",
|
19
|
+
"readlines",
|
14
20
|
"rmtree",
|
21
|
+
"rubocop",
|
22
|
+
"Takeshi",
|
15
23
|
"tasklib",
|
24
|
+
"tk0miya",
|
16
25
|
"VCALL",
|
17
26
|
"ZLIST"
|
18
27
|
],
|
@@ -33,7 +33,8 @@ module RbsActivesupport
|
|
33
33
|
# @rbs namespace: RBS::Namespace
|
34
34
|
# @rbs method_calls: Array[Parser::MethodCall]
|
35
35
|
# @rbs context: RBS::Namespace?
|
36
|
-
|
36
|
+
# @rbs options: Hash[Symbol, untyped]
|
37
|
+
def build_method_calls(namespace, method_calls, context, options = {}) #: Array[t]
|
37
38
|
method_calls.flat_map do |method_call|
|
38
39
|
case method_call.name
|
39
40
|
when :class_attribute
|
@@ -43,7 +44,9 @@ module RbsActivesupport
|
|
43
44
|
when :cattr_accessor, :mattr_accessor, :cattr_reader, :mattr_reader, :cattr_writer, :mattr_writer
|
44
45
|
build_attribute_accessor(method_call)
|
45
46
|
when :include
|
46
|
-
|
47
|
+
# implicit include is an "include" internally (e.g. include call in the included block)
|
48
|
+
implicit = options.fetch(:implicit_include, false)
|
49
|
+
build_include(namespace, method_call, context, implicit:)
|
47
50
|
end
|
48
51
|
rescue StandardError => e
|
49
52
|
puts "ERROR: #{namespace}:#{method_call.name}: Failed to build method calls: #{e}"
|
@@ -90,7 +93,8 @@ module RbsActivesupport
|
|
90
93
|
# @rbs namespace: RBS::Namespace
|
91
94
|
# @rbs method_call: Parser::MethodCall
|
92
95
|
# @rbs context: RBS::Namespace?
|
93
|
-
|
96
|
+
# @rbs implicit: bool
|
97
|
+
def build_include(namespace, method_call, context, implicit:) #: Array[t] # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
94
98
|
module_paths = eval_include_args(method_call.args)
|
95
99
|
module_paths.delete_if do |module_path|
|
96
100
|
unless module_path.is_a?(RBS::Namespace)
|
@@ -99,7 +103,7 @@ module RbsActivesupport
|
|
99
103
|
end
|
100
104
|
end
|
101
105
|
module_paths.filter_map do |module_path|
|
102
|
-
include = Include.new(context || namespace, module_path, { private: method_call.private
|
106
|
+
include = Include.new(context || namespace, module_path, { private: method_call.private?, implicit: })
|
103
107
|
|
104
108
|
if include.module_name
|
105
109
|
next if included_modules.include?(include.module_name)
|
@@ -107,9 +111,12 @@ module RbsActivesupport
|
|
107
111
|
included_modules << include.module_name
|
108
112
|
end
|
109
113
|
|
110
|
-
|
111
|
-
|
112
|
-
|
114
|
+
calls = [] #: Array[t]
|
115
|
+
calls << include if include.implicit? || (include.concern? && include.classmethods?)
|
116
|
+
calls.concat(build_method_calls(namespace, include.nested_includes, include.module_name))
|
117
|
+
calls.concat(build_method_calls(namespace, include.method_calls_in_included_block, include.module_name,
|
118
|
+
{ implicit_include: true }))
|
119
|
+
calls
|
113
120
|
end.flatten
|
114
121
|
end
|
115
122
|
|
@@ -164,14 +171,10 @@ module RbsActivesupport
|
|
164
171
|
# @rbs decl: Include
|
165
172
|
def render_include(decl) #: String
|
166
173
|
module_name = decl.module_name || decl.module_path
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
RBS
|
172
|
-
else
|
173
|
-
"include #{module_name.to_s.delete_suffix("::")}"
|
174
|
-
end
|
174
|
+
mods = []
|
175
|
+
mods << "include #{module_name.to_s.delete_suffix("::")}" if decl.implicit?
|
176
|
+
mods << "extend #{module_name}ClassMethods" if decl.concern? && decl.classmethods?
|
177
|
+
mods.join("\n")
|
175
178
|
end
|
176
179
|
|
177
180
|
# @rbs namespace: RBS::Namespace
|
@@ -181,7 +184,7 @@ module RbsActivesupport
|
|
181
184
|
|
182
185
|
typ = RBS::Parser.parse_type(type)
|
183
186
|
if typ
|
184
|
-
typ.map_type_name { |type_name| resolver.resolve(type_name, context:
|
187
|
+
typ.map_type_name { |type_name| resolver.resolve(type_name, context:) || type_name }.to_s
|
185
188
|
else
|
186
189
|
type
|
187
190
|
end
|
@@ -58,7 +58,7 @@ module RbsActivesupport
|
|
58
58
|
def format(rbs) #: String
|
59
59
|
parsed = RBS::Parser.parse_signature(rbs)
|
60
60
|
StringIO.new.tap do |out|
|
61
|
-
RBS::Writer.new(out:
|
61
|
+
RBS::Writer.new(out:).write(parsed[1] + parsed[2])
|
62
62
|
end.string
|
63
63
|
end
|
64
64
|
|
@@ -70,19 +70,16 @@ module RbsActivesupport
|
|
70
70
|
|
71
71
|
# @rbs namespace: RBS::Namespace
|
72
72
|
def header(namespace) #: String
|
73
|
-
|
74
|
-
|
75
|
-
context += "::#{mod_name}"
|
76
|
-
mod_object = Object.const_get(context)
|
73
|
+
namespace_to_names(namespace).map do |name|
|
74
|
+
mod_object = Object.const_get(name.to_s)
|
77
75
|
case mod_object
|
78
76
|
when Class
|
79
|
-
|
80
|
-
|
81
|
-
superclass_name = superclass.name || "Object"
|
77
|
+
superclass = mod_object.superclass
|
78
|
+
superclass_name = superclass&.name || "::Object"
|
82
79
|
|
83
|
-
"class #{
|
80
|
+
"class #{name} < ::#{superclass_name}"
|
84
81
|
when Module
|
85
|
-
"module #{
|
82
|
+
"module #{name}"
|
86
83
|
else
|
87
84
|
raise "unreachable"
|
88
85
|
end
|
@@ -93,5 +90,15 @@ module RbsActivesupport
|
|
93
90
|
def footer(namespace) #: String
|
94
91
|
"end\n" * namespace.path.size
|
95
92
|
end
|
93
|
+
|
94
|
+
# @rbs namespace: RBS::Namespace
|
95
|
+
def namespace_to_names(namespace) #: Array[RBS::TypeName]
|
96
|
+
names = [] #: Array[RBS::TypeName]
|
97
|
+
until namespace.empty?
|
98
|
+
names << namespace.to_type_name
|
99
|
+
namespace = namespace.parent
|
100
|
+
end
|
101
|
+
names.reverse
|
102
|
+
end
|
96
103
|
end
|
97
104
|
end
|
@@ -51,6 +51,14 @@ module RbsActivesupport
|
|
51
51
|
self.module&.const_defined?(:ClassMethods)
|
52
52
|
end
|
53
53
|
|
54
|
+
def explicit? #: bool
|
55
|
+
!implicit?
|
56
|
+
end
|
57
|
+
|
58
|
+
def implicit? #: bool
|
59
|
+
options.fetch(:implicit, false)
|
60
|
+
end
|
61
|
+
|
54
62
|
def nested_includes #: Array[Parser::MethodCall]
|
55
63
|
return [] unless module_name
|
56
64
|
return [] unless parser
|
@@ -77,7 +85,7 @@ module RbsActivesupport
|
|
77
85
|
|
78
86
|
private
|
79
87
|
|
80
|
-
# @rbs @parser: Parser
|
88
|
+
# @rbs @parser: Parser?
|
81
89
|
|
82
90
|
# @rbs %a{pure}
|
83
91
|
def parser #: Parser?
|
@@ -85,10 +93,11 @@ module RbsActivesupport
|
|
85
93
|
|
86
94
|
@parser ||= begin
|
87
95
|
path, = Object.const_source_location(module_name.to_s.delete_suffix("::")) #: String?
|
88
|
-
return nil unless path && File.exist?(path)
|
89
96
|
|
90
|
-
|
91
|
-
|
97
|
+
if path && File.exist?(path)
|
98
|
+
Parser.new(parse_included_block: true).tap do |parser|
|
99
|
+
parser.parse(File.read(path))
|
100
|
+
end
|
92
101
|
end
|
93
102
|
end
|
94
103
|
end
|
@@ -46,12 +46,35 @@ module RbsActivesupport
|
|
46
46
|
# @rbs method: Symbol
|
47
47
|
def lookup_method_types(type_name, method) #: Array[RBS::MethodType]
|
48
48
|
instance = rbs_builder.build_instance(type_name)
|
49
|
-
|
50
|
-
|
49
|
+
if method.start_with? "@"
|
50
|
+
ivar_def = instance.instance_variables[method]
|
51
|
+
return [] unless ivar_def
|
51
52
|
|
52
|
-
|
53
|
+
method_def = build_method_def(ivar_def.type)
|
54
|
+
[method_def]
|
55
|
+
else
|
56
|
+
method_def = instance.methods[method]
|
57
|
+
return [] unless method_def
|
58
|
+
|
59
|
+
method_def.defs.map(&:type)
|
60
|
+
end
|
53
61
|
rescue StandardError
|
54
62
|
[]
|
55
63
|
end
|
64
|
+
|
65
|
+
# @rbs return_type: RBS::Types::t
|
66
|
+
def build_method_def(return_type) #: RBS::MethodType
|
67
|
+
type = RBS::Types::Function.new(
|
68
|
+
required_positionals: [],
|
69
|
+
optional_positionals: [],
|
70
|
+
rest_positionals: nil,
|
71
|
+
trailing_positionals: [],
|
72
|
+
required_keywords: {},
|
73
|
+
optional_keywords: {},
|
74
|
+
rest_keywords: nil,
|
75
|
+
return_type:
|
76
|
+
)
|
77
|
+
RBS::MethodType.new(type_params: [], type:, block: nil, location: nil)
|
78
|
+
end
|
56
79
|
end
|
57
80
|
end
|
@@ -76,20 +76,20 @@ module RbsActivesupport
|
|
76
76
|
included: in_included_block?,
|
77
77
|
trailing_comment: trailing_comment_for(node))
|
78
78
|
else
|
79
|
-
process_orig(node, decls
|
79
|
+
process_orig(node, decls:, comments:, context:)
|
80
80
|
end
|
81
81
|
when :ITER
|
82
82
|
call = node.children[0]
|
83
83
|
if call.type == :FCALL && call.children[0] == :included && parse_included_block && !in_included_block?
|
84
84
|
body = node.children[1].children[2]
|
85
85
|
with_included_block do
|
86
|
-
process(body, decls
|
86
|
+
process(body, decls:, comments:, context:)
|
87
87
|
end
|
88
88
|
else
|
89
|
-
process_orig(node, decls
|
89
|
+
process_orig(node, decls:, comments:, context:)
|
90
90
|
end
|
91
91
|
else
|
92
|
-
process_orig(node, decls
|
92
|
+
process_orig(node, decls:, comments:, context:)
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
@@ -13,7 +13,7 @@ module RbsActivesupport
|
|
13
13
|
|
14
14
|
# @rbs name: Symbol
|
15
15
|
# @rbs &block: ?(self) -> void
|
16
|
-
def initialize(name = :
|
16
|
+
def initialize(name = :"rbs:activesupport", &block) #: void
|
17
17
|
super()
|
18
18
|
|
19
19
|
@name = name
|
@@ -70,7 +70,7 @@ module RbsActivesupport
|
|
70
70
|
loader = RBS::CLI::LibraryOptions.new.loader
|
71
71
|
loader.add(path: Pathname("sig"))
|
72
72
|
env = RBS::Environment.from_loader(loader).resolve_type_names
|
73
|
-
RBS::DefinitionBuilder.new(env:
|
73
|
+
RBS::DefinitionBuilder.new(env:)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
data/rbs_collection.lock.yaml
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
path: ".gem_rbs_collection"
|
3
3
|
gems:
|
4
4
|
- name: actionpack
|
5
|
-
version: '
|
5
|
+
version: '7.2'
|
6
6
|
source:
|
7
7
|
type: git
|
8
8
|
name: ruby/gem_rbs_collection
|
9
|
-
revision:
|
9
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
10
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
11
|
repo_dir: gems
|
12
12
|
- name: actionview
|
@@ -14,7 +14,7 @@ gems:
|
|
14
14
|
source:
|
15
15
|
type: git
|
16
16
|
name: ruby/gem_rbs_collection
|
17
|
-
revision:
|
17
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
18
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
19
19
|
repo_dir: gems
|
20
20
|
- name: activesupport
|
@@ -22,7 +22,7 @@ gems:
|
|
22
22
|
source:
|
23
23
|
type: git
|
24
24
|
name: ruby/gem_rbs_collection
|
25
|
-
revision:
|
25
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
26
26
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
27
27
|
repo_dir: gems
|
28
28
|
- name: ast
|
@@ -30,17 +30,29 @@ gems:
|
|
30
30
|
source:
|
31
31
|
type: git
|
32
32
|
name: ruby/gem_rbs_collection
|
33
|
-
revision:
|
33
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
34
34
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
35
35
|
repo_dir: gems
|
36
36
|
- name: base64
|
37
|
+
version: '0.1'
|
38
|
+
source:
|
39
|
+
type: git
|
40
|
+
name: ruby/gem_rbs_collection
|
41
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
42
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
43
|
+
repo_dir: gems
|
44
|
+
- name: benchmark
|
37
45
|
version: '0'
|
38
46
|
source:
|
39
47
|
type: stdlib
|
40
48
|
- name: bigdecimal
|
41
|
-
version: '
|
49
|
+
version: '3.1'
|
42
50
|
source:
|
43
|
-
type:
|
51
|
+
type: git
|
52
|
+
name: ruby/gem_rbs_collection
|
53
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
54
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
55
|
+
repo_dir: gems
|
44
56
|
- name: cgi
|
45
57
|
version: '0'
|
46
58
|
source:
|
@@ -50,7 +62,7 @@ gems:
|
|
50
62
|
source:
|
51
63
|
type: git
|
52
64
|
name: ruby/gem_rbs_collection
|
53
|
-
revision:
|
65
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
54
66
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
55
67
|
repo_dir: gems
|
56
68
|
- name: connection_pool
|
@@ -58,18 +70,14 @@ gems:
|
|
58
70
|
source:
|
59
71
|
type: git
|
60
72
|
name: ruby/gem_rbs_collection
|
61
|
-
revision:
|
73
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
62
74
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
63
75
|
repo_dir: gems
|
64
76
|
- name: date
|
65
77
|
version: '0'
|
66
78
|
source:
|
67
79
|
type: stdlib
|
68
|
-
- name:
|
69
|
-
version: '0'
|
70
|
-
source:
|
71
|
-
type: stdlib
|
72
|
-
- name: delegate
|
80
|
+
- name: digest
|
73
81
|
version: '0'
|
74
82
|
source:
|
75
83
|
type: stdlib
|
@@ -86,7 +94,7 @@ gems:
|
|
86
94
|
source:
|
87
95
|
type: git
|
88
96
|
name: ruby/gem_rbs_collection
|
89
|
-
revision:
|
97
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
90
98
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
91
99
|
repo_dir: gems
|
92
100
|
- name: io-console
|
@@ -102,23 +110,23 @@ gems:
|
|
102
110
|
source:
|
103
111
|
type: stdlib
|
104
112
|
- name: minitest
|
105
|
-
version: '
|
113
|
+
version: '5.25'
|
106
114
|
source:
|
107
|
-
type:
|
115
|
+
type: git
|
116
|
+
name: ruby/gem_rbs_collection
|
117
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
118
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
119
|
+
repo_dir: gems
|
108
120
|
- name: monitor
|
109
121
|
version: '0'
|
110
122
|
source:
|
111
123
|
type: stdlib
|
112
|
-
- name: mutex_m
|
113
|
-
version: '0'
|
114
|
-
source:
|
115
|
-
type: stdlib
|
116
124
|
- name: nokogiri
|
117
125
|
version: '1.11'
|
118
126
|
source:
|
119
127
|
type: git
|
120
128
|
name: ruby/gem_rbs_collection
|
121
|
-
revision:
|
129
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
122
130
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
123
131
|
repo_dir: gems
|
124
132
|
- name: openssl
|
@@ -134,7 +142,7 @@ gems:
|
|
134
142
|
source:
|
135
143
|
type: git
|
136
144
|
name: ruby/gem_rbs_collection
|
137
|
-
revision:
|
145
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
138
146
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
139
147
|
repo_dir: gems
|
140
148
|
- name: parser
|
@@ -142,27 +150,19 @@ gems:
|
|
142
150
|
source:
|
143
151
|
type: git
|
144
152
|
name: ruby/gem_rbs_collection
|
145
|
-
revision:
|
153
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
146
154
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
147
155
|
repo_dir: gems
|
148
156
|
- name: pathname
|
149
157
|
version: '0'
|
150
158
|
source:
|
151
159
|
type: stdlib
|
152
|
-
- name: pstore
|
153
|
-
version: '0'
|
154
|
-
source:
|
155
|
-
type: stdlib
|
156
|
-
- name: psych
|
157
|
-
version: '0'
|
158
|
-
source:
|
159
|
-
type: stdlib
|
160
160
|
- name: rack
|
161
161
|
version: '2.2'
|
162
162
|
source:
|
163
163
|
type: git
|
164
164
|
name: ruby/gem_rbs_collection
|
165
|
-
revision:
|
165
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
166
166
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
167
167
|
repo_dir: gems
|
168
168
|
- name: rails-dom-testing
|
@@ -170,7 +170,7 @@ gems:
|
|
170
170
|
source:
|
171
171
|
type: git
|
172
172
|
name: ruby/gem_rbs_collection
|
173
|
-
revision:
|
173
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
174
174
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
175
175
|
repo_dir: gems
|
176
176
|
- name: rails-html-sanitizer
|
@@ -178,7 +178,7 @@ gems:
|
|
178
178
|
source:
|
179
179
|
type: git
|
180
180
|
name: ruby/gem_rbs_collection
|
181
|
-
revision:
|
181
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
182
182
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
183
183
|
repo_dir: gems
|
184
184
|
- name: railties
|
@@ -186,7 +186,7 @@ gems:
|
|
186
186
|
source:
|
187
187
|
type: git
|
188
188
|
name: ruby/gem_rbs_collection
|
189
|
-
revision:
|
189
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
190
190
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
191
191
|
repo_dir: gems
|
192
192
|
- name: rainbow
|
@@ -194,7 +194,7 @@ gems:
|
|
194
194
|
source:
|
195
195
|
type: git
|
196
196
|
name: ruby/gem_rbs_collection
|
197
|
-
revision:
|
197
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
198
198
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
199
199
|
repo_dir: gems
|
200
200
|
- name: rake
|
@@ -202,11 +202,11 @@ gems:
|
|
202
202
|
source:
|
203
203
|
type: git
|
204
204
|
name: ruby/gem_rbs_collection
|
205
|
-
revision:
|
205
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
206
206
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
207
207
|
repo_dir: gems
|
208
208
|
- name: rbs
|
209
|
-
version: 3.
|
209
|
+
version: 3.9.4
|
210
210
|
source:
|
211
211
|
type: rubygems
|
212
212
|
- name: rdoc
|
@@ -218,7 +218,7 @@ gems:
|
|
218
218
|
source:
|
219
219
|
type: git
|
220
220
|
name: ruby/gem_rbs_collection
|
221
|
-
revision:
|
221
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
222
222
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
223
223
|
repo_dir: gems
|
224
224
|
- name: ripper
|
@@ -230,7 +230,7 @@ gems:
|
|
230
230
|
source:
|
231
231
|
type: git
|
232
232
|
name: ruby/gem_rbs_collection
|
233
|
-
revision:
|
233
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
234
234
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
235
235
|
repo_dir: gems
|
236
236
|
- name: rubocop-ast
|
@@ -238,7 +238,7 @@ gems:
|
|
238
238
|
source:
|
239
239
|
type: git
|
240
240
|
name: ruby/gem_rbs_collection
|
241
|
-
revision:
|
241
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
242
242
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
243
243
|
repo_dir: gems
|
244
244
|
- name: securerandom
|
@@ -253,7 +253,7 @@ gems:
|
|
253
253
|
version: '0'
|
254
254
|
source:
|
255
255
|
type: stdlib
|
256
|
-
- name:
|
256
|
+
- name: stringio
|
257
257
|
version: '0'
|
258
258
|
source:
|
259
259
|
type: stdlib
|
@@ -266,7 +266,7 @@ gems:
|
|
266
266
|
source:
|
267
267
|
type: git
|
268
268
|
name: ruby/gem_rbs_collection
|
269
|
-
revision:
|
269
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
270
270
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
271
271
|
repo_dir: gems
|
272
272
|
- name: time
|
@@ -286,7 +286,7 @@ gems:
|
|
286
286
|
source:
|
287
287
|
type: git
|
288
288
|
name: ruby/gem_rbs_collection
|
289
|
-
revision:
|
289
|
+
revision: 2b3fb8480d3433c9c4b083ad52430a8253efbe5b
|
290
290
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
291
291
|
repo_dir: gems
|
292
292
|
- name: uri
|
@@ -26,7 +26,8 @@ module RbsActivesupport
|
|
26
26
|
# @rbs namespace: RBS::Namespace
|
27
27
|
# @rbs method_calls: Array[Parser::MethodCall]
|
28
28
|
# @rbs context: RBS::Namespace?
|
29
|
-
|
29
|
+
# @rbs options: Hash[Symbol, untyped]
|
30
|
+
def build_method_calls: (RBS::Namespace namespace, Array[Parser::MethodCall] method_calls, RBS::Namespace? context, ?Hash[Symbol, untyped] options) -> Array[t]
|
30
31
|
|
31
32
|
# @rbs method_call: Parser::MethodCall
|
32
33
|
def build_attribute_accessor: (Parser::MethodCall method_call) -> Array[AttributeAccessor]
|
@@ -41,7 +42,8 @@ module RbsActivesupport
|
|
41
42
|
# @rbs namespace: RBS::Namespace
|
42
43
|
# @rbs method_call: Parser::MethodCall
|
43
44
|
# @rbs context: RBS::Namespace?
|
44
|
-
|
45
|
+
# @rbs implicit: bool
|
46
|
+
def build_include: (RBS::Namespace namespace, Parser::MethodCall method_call, RBS::Namespace? context, implicit: bool) -> Array[t]
|
45
47
|
|
46
48
|
# @rbs namespace: RBS::Namespace
|
47
49
|
# @rbs decl: t
|
@@ -25,6 +25,10 @@ module RbsActivesupport
|
|
25
25
|
|
26
26
|
def classmethods?: () -> boolish
|
27
27
|
|
28
|
+
def explicit?: () -> bool
|
29
|
+
|
30
|
+
def implicit?: () -> bool
|
31
|
+
|
28
32
|
def nested_includes: () -> Array[Parser::MethodCall]
|
29
33
|
|
30
34
|
def method_calls_in_included_block: () -> Array[Parser::MethodCall]
|
@@ -35,7 +39,7 @@ module RbsActivesupport
|
|
35
39
|
|
36
40
|
private
|
37
41
|
|
38
|
-
@parser: Parser
|
42
|
+
@parser: Parser?
|
39
43
|
|
40
44
|
# @rbs %a{pure}
|
41
45
|
%a{pure}
|
@@ -21,5 +21,8 @@ module RbsActivesupport
|
|
21
21
|
# @rbs type_name: RBS::TypeName
|
22
22
|
# @rbs method: Symbol
|
23
23
|
def lookup_method_types: (RBS::TypeName type_name, Symbol method) -> Array[RBS::MethodType]
|
24
|
+
|
25
|
+
# @rbs return_type: RBS::Types::t
|
26
|
+
def build_method_def: (RBS::Types::t return_type) -> RBS::MethodType
|
24
27
|
end
|
25
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi KOMIYA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -106,6 +106,7 @@ metadata:
|
|
106
106
|
homepage_uri: https://github.com/tk0miya/rbs_activesupport
|
107
107
|
source_code_uri: https://github.com/tk0miya/rbs_activesupport
|
108
108
|
changelog_uri: https://github.com/tk0miya/rbs_activesupport
|
109
|
+
rubygems_mfa_required: 'true'
|
109
110
|
post_install_message:
|
110
111
|
rdoc_options: []
|
111
112
|
require_paths:
|
@@ -114,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
115
|
requirements:
|
115
116
|
- - ">="
|
116
117
|
- !ruby/object:Gem::Version
|
117
|
-
version: 2.
|
118
|
+
version: 3.2.0
|
118
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
120
|
requirements:
|
120
121
|
- - ">="
|
@@ -124,5 +125,5 @@ requirements: []
|
|
124
125
|
rubygems_version: 3.5.22
|
125
126
|
signing_key:
|
126
127
|
specification_version: 4
|
127
|
-
summary: A RBS files
|
128
|
+
summary: A RBS files generator for activesupport
|
128
129
|
test_files: []
|