rbs_activesupport 1.6.0 → 1.7.1
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 +27 -0
- data/.vscode/settings.json +2 -0
- data/lib/rbs_activesupport/declaration_builder.rb +29 -20
- data/lib/rbs_activesupport/generator.rb +6 -1
- data/lib/rbs_activesupport/include.rb +13 -4
- data/lib/rbs_activesupport/parser/comment_parser.rb +2 -0
- data/lib/rbs_activesupport/rake_task.rb +1 -1
- data/lib/rbs_activesupport/version.rb +1 -1
- data/rbs_collection.lock.yaml +35 -91
- data/sig/rbs_activesupport/declaration_builder.rbs +5 -3
- data/sig/rbs_activesupport/include.rbs +5 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d8a1f37401ad5efa886c009ccd1e756314c116852aefacec5af989defbdc3aa
|
|
4
|
+
data.tar.gz: c0a299cc04c65b6caa80e73c4f8b66772983fd442868c0ab9210d44003857374
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c876da26d75518110bf994ae849d988b8549fda8121945d4d20c1feb9aa9a8b0b63e457c8f38c53c8c9b4a7cb35e844b2097f74312618348540d9c664d2fa34
|
|
7
|
+
data.tar.gz: 87968fd8f8fcbdafe1ba7a93489a345c182e83e6a98c086956ab44a5a5024d14c571bb4cb3959af6f57f36808a626e66536e96caeee2095043262026729acba2
|
data/.rubocop.yml
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
AllCops:
|
|
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,13 @@ Style/CommentedKeyword:
|
|
|
34
54
|
Style/Documentation:
|
|
35
55
|
Enabled: false
|
|
36
56
|
|
|
57
|
+
Style/HashSyntax:
|
|
58
|
+
EnforcedShorthandSyntax: always
|
|
59
|
+
|
|
60
|
+
Style/OneClassPerFile:
|
|
61
|
+
Exclude:
|
|
62
|
+
- spec/**/*.rb
|
|
63
|
+
|
|
37
64
|
Style/StringLiterals:
|
|
38
65
|
EnforcedStyle: double_quotes
|
|
39
66
|
|
data/.vscode/settings.json
CHANGED
|
@@ -8,14 +8,14 @@ module RbsActivesupport
|
|
|
8
8
|
|
|
9
9
|
attr_reader :resolver #: RBS::Resolver::TypeNameResolver
|
|
10
10
|
attr_reader :method_searcher #: MethodSearcher
|
|
11
|
-
attr_reader :
|
|
11
|
+
attr_reader :processed_modules #: Array[RBS::Namespace]
|
|
12
12
|
|
|
13
13
|
# @rbs resolver: RBS::Resolver::TypeNameResolver
|
|
14
14
|
# @rbs method_searcher: MethodSearcher
|
|
15
15
|
def initialize(resolver, method_searcher) #: void
|
|
16
16
|
@resolver = resolver
|
|
17
17
|
@method_searcher = method_searcher
|
|
18
|
-
@
|
|
18
|
+
@processed_modules = []
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# @rbs namespace: RBS::Namespace
|
|
@@ -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,17 +103,20 @@ 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
|
-
next if
|
|
109
|
+
next if processed_modules.include?(include.module_name)
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
processed_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,13 @@ module RbsActivesupport
|
|
|
181
184
|
|
|
182
185
|
typ = RBS::Parser.parse_type(type)
|
|
183
186
|
if typ
|
|
184
|
-
typ.map_type_name
|
|
187
|
+
typ.map_type_name do |type_name|
|
|
188
|
+
resolver.resolve(type_name, context:) || type_name.absolute!
|
|
189
|
+
rescue StandardError
|
|
190
|
+
# Resolver failed to resolve the type name because of a lack of type database
|
|
191
|
+
# (might not have been generated yet). It will be resolved in the next execution.
|
|
192
|
+
type_name.absolute!
|
|
193
|
+
end.to_s
|
|
185
194
|
else
|
|
186
195
|
type
|
|
187
196
|
end
|
|
@@ -21,7 +21,12 @@ module RbsActivesupport
|
|
|
21
21
|
@pathname = pathname
|
|
22
22
|
|
|
23
23
|
method_searcher = MethodSearcher.new(rbs_builder)
|
|
24
|
-
resolver =
|
|
24
|
+
resolver = if Gem::Version.new("3.10.0") <= Gem::Version.new(RBS::VERSION)
|
|
25
|
+
RBS::Resolver::TypeNameResolver.build(rbs_builder.env)
|
|
26
|
+
else
|
|
27
|
+
# TypeNameResolver.new was deprecated in RBS 3.10.0
|
|
28
|
+
RBS::Resolver::TypeNameResolver.new(rbs_builder.env) # steep:ignore
|
|
29
|
+
end
|
|
25
30
|
@declaration_builder = DeclarationBuilder.new(resolver, method_searcher)
|
|
26
31
|
end
|
|
27
32
|
|
|
@@ -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
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -6,7 +6,7 @@ gems:
|
|
|
6
6
|
source:
|
|
7
7
|
type: git
|
|
8
8
|
name: ruby/gem_rbs_collection
|
|
9
|
-
revision:
|
|
9
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
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: e7a9964da22a610305173770e36871b1163faaa7
|
|
18
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
19
19
|
repo_dir: gems
|
|
20
20
|
- name: activesupport
|
|
@@ -22,47 +22,31 @@ gems:
|
|
|
22
22
|
source:
|
|
23
23
|
type: git
|
|
24
24
|
name: ruby/gem_rbs_collection
|
|
25
|
-
revision:
|
|
26
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
27
|
-
repo_dir: gems
|
|
28
|
-
- name: ast
|
|
29
|
-
version: '2.4'
|
|
30
|
-
source:
|
|
31
|
-
type: git
|
|
32
|
-
name: ruby/gem_rbs_collection
|
|
33
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
25
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
34
26
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
35
27
|
repo_dir: gems
|
|
36
28
|
- name: base64
|
|
37
|
-
version:
|
|
38
|
-
source:
|
|
39
|
-
type: git
|
|
40
|
-
name: ruby/gem_rbs_collection
|
|
41
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
42
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
43
|
-
repo_dir: gems
|
|
44
|
-
- name: benchmark
|
|
45
|
-
version: '0'
|
|
29
|
+
version: 0.3.0
|
|
46
30
|
source:
|
|
47
|
-
type:
|
|
31
|
+
type: rubygems
|
|
48
32
|
- name: bigdecimal
|
|
49
|
-
version:
|
|
33
|
+
version: 4.1.0
|
|
34
|
+
source:
|
|
35
|
+
type: rubygems
|
|
36
|
+
- name: cgi
|
|
37
|
+
version: '0.5'
|
|
50
38
|
source:
|
|
51
39
|
type: git
|
|
52
40
|
name: ruby/gem_rbs_collection
|
|
53
|
-
revision:
|
|
41
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
54
42
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
55
43
|
repo_dir: gems
|
|
56
|
-
- name: cgi
|
|
57
|
-
version: '0'
|
|
58
|
-
source:
|
|
59
|
-
type: stdlib
|
|
60
44
|
- name: concurrent-ruby
|
|
61
45
|
version: '1.1'
|
|
62
46
|
source:
|
|
63
47
|
type: git
|
|
64
48
|
name: ruby/gem_rbs_collection
|
|
65
|
-
revision:
|
|
49
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
66
50
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
67
51
|
repo_dir: gems
|
|
68
52
|
- name: connection_pool
|
|
@@ -70,7 +54,7 @@ gems:
|
|
|
70
54
|
source:
|
|
71
55
|
type: git
|
|
72
56
|
name: ruby/gem_rbs_collection
|
|
73
|
-
revision:
|
|
57
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
74
58
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
75
59
|
repo_dir: gems
|
|
76
60
|
- name: date
|
|
@@ -94,7 +78,7 @@ gems:
|
|
|
94
78
|
source:
|
|
95
79
|
type: git
|
|
96
80
|
name: ruby/gem_rbs_collection
|
|
97
|
-
revision:
|
|
81
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
98
82
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
99
83
|
repo_dir: gems
|
|
100
84
|
- name: io-console
|
|
@@ -114,23 +98,19 @@ gems:
|
|
|
114
98
|
source:
|
|
115
99
|
type: git
|
|
116
100
|
name: ruby/gem_rbs_collection
|
|
117
|
-
revision:
|
|
101
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
118
102
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
119
103
|
repo_dir: gems
|
|
120
104
|
- name: monitor
|
|
121
105
|
version: '0'
|
|
122
106
|
source:
|
|
123
107
|
type: stdlib
|
|
124
|
-
- name: mutex_m
|
|
125
|
-
version: 0.3.0
|
|
126
|
-
source:
|
|
127
|
-
type: rubygems
|
|
128
108
|
- name: nokogiri
|
|
129
109
|
version: '1.11'
|
|
130
110
|
source:
|
|
131
111
|
type: git
|
|
132
112
|
name: ruby/gem_rbs_collection
|
|
133
|
-
revision:
|
|
113
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
134
114
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
135
115
|
repo_dir: gems
|
|
136
116
|
- name: openssl
|
|
@@ -141,32 +121,28 @@ gems:
|
|
|
141
121
|
version: '0'
|
|
142
122
|
source:
|
|
143
123
|
type: stdlib
|
|
144
|
-
- name:
|
|
145
|
-
version: '
|
|
124
|
+
- name: pathname
|
|
125
|
+
version: '0'
|
|
146
126
|
source:
|
|
147
|
-
type:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
151
|
-
repo_dir: gems
|
|
152
|
-
- name: parser
|
|
153
|
-
version: '3.2'
|
|
127
|
+
type: stdlib
|
|
128
|
+
- name: pp
|
|
129
|
+
version: '0'
|
|
154
130
|
source:
|
|
155
|
-
type:
|
|
156
|
-
|
|
157
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
158
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
159
|
-
repo_dir: gems
|
|
160
|
-
- name: pathname
|
|
131
|
+
type: stdlib
|
|
132
|
+
- name: prettyprint
|
|
161
133
|
version: '0'
|
|
162
134
|
source:
|
|
163
135
|
type: stdlib
|
|
136
|
+
- name: prism
|
|
137
|
+
version: 1.9.0
|
|
138
|
+
source:
|
|
139
|
+
type: rubygems
|
|
164
140
|
- name: rack
|
|
165
141
|
version: '2.2'
|
|
166
142
|
source:
|
|
167
143
|
type: git
|
|
168
144
|
name: ruby/gem_rbs_collection
|
|
169
|
-
revision:
|
|
145
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
170
146
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
171
147
|
repo_dir: gems
|
|
172
148
|
- name: rails-dom-testing
|
|
@@ -174,7 +150,7 @@ gems:
|
|
|
174
150
|
source:
|
|
175
151
|
type: git
|
|
176
152
|
name: ruby/gem_rbs_collection
|
|
177
|
-
revision:
|
|
153
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
178
154
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
179
155
|
repo_dir: gems
|
|
180
156
|
- name: rails-html-sanitizer
|
|
@@ -182,7 +158,7 @@ gems:
|
|
|
182
158
|
source:
|
|
183
159
|
type: git
|
|
184
160
|
name: ruby/gem_rbs_collection
|
|
185
|
-
revision:
|
|
161
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
186
162
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
187
163
|
repo_dir: gems
|
|
188
164
|
- name: railties
|
|
@@ -190,15 +166,7 @@ gems:
|
|
|
190
166
|
source:
|
|
191
167
|
type: git
|
|
192
168
|
name: ruby/gem_rbs_collection
|
|
193
|
-
revision:
|
|
194
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
195
|
-
repo_dir: gems
|
|
196
|
-
- name: rainbow
|
|
197
|
-
version: '3.0'
|
|
198
|
-
source:
|
|
199
|
-
type: git
|
|
200
|
-
name: ruby/gem_rbs_collection
|
|
201
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
169
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
202
170
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
203
171
|
repo_dir: gems
|
|
204
172
|
- name: rake
|
|
@@ -206,45 +174,21 @@ gems:
|
|
|
206
174
|
source:
|
|
207
175
|
type: git
|
|
208
176
|
name: ruby/gem_rbs_collection
|
|
209
|
-
revision:
|
|
177
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
210
178
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
211
179
|
repo_dir: gems
|
|
212
180
|
- name: rbs
|
|
213
|
-
version: 3.
|
|
181
|
+
version: 3.10.4
|
|
214
182
|
source:
|
|
215
183
|
type: rubygems
|
|
216
184
|
- name: rdoc
|
|
217
185
|
version: '0'
|
|
218
186
|
source:
|
|
219
187
|
type: stdlib
|
|
220
|
-
- name: regexp_parser
|
|
221
|
-
version: '2.8'
|
|
222
|
-
source:
|
|
223
|
-
type: git
|
|
224
|
-
name: ruby/gem_rbs_collection
|
|
225
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
226
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
227
|
-
repo_dir: gems
|
|
228
188
|
- name: ripper
|
|
229
189
|
version: '0'
|
|
230
190
|
source:
|
|
231
191
|
type: stdlib
|
|
232
|
-
- name: rubocop
|
|
233
|
-
version: '1.57'
|
|
234
|
-
source:
|
|
235
|
-
type: git
|
|
236
|
-
name: ruby/gem_rbs_collection
|
|
237
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
238
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
239
|
-
repo_dir: gems
|
|
240
|
-
- name: rubocop-ast
|
|
241
|
-
version: '1.30'
|
|
242
|
-
source:
|
|
243
|
-
type: git
|
|
244
|
-
name: ruby/gem_rbs_collection
|
|
245
|
-
revision: 4af987b9b70455bd4493ef5a10e885f36e6ca6f6
|
|
246
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
247
|
-
repo_dir: gems
|
|
248
192
|
- name: securerandom
|
|
249
193
|
version: '0'
|
|
250
194
|
source:
|
|
@@ -270,7 +214,7 @@ gems:
|
|
|
270
214
|
source:
|
|
271
215
|
type: git
|
|
272
216
|
name: ruby/gem_rbs_collection
|
|
273
|
-
revision:
|
|
217
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
274
218
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
275
219
|
repo_dir: gems
|
|
276
220
|
- name: time
|
|
@@ -290,7 +234,7 @@ gems:
|
|
|
290
234
|
source:
|
|
291
235
|
type: git
|
|
292
236
|
name: ruby/gem_rbs_collection
|
|
293
|
-
revision:
|
|
237
|
+
revision: e7a9964da22a610305173770e36871b1163faaa7
|
|
294
238
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
295
239
|
repo_dir: gems
|
|
296
240
|
- name: uri
|
|
@@ -10,7 +10,7 @@ module RbsActivesupport
|
|
|
10
10
|
|
|
11
11
|
attr_reader method_searcher: MethodSearcher
|
|
12
12
|
|
|
13
|
-
attr_reader
|
|
13
|
+
attr_reader processed_modules: Array[RBS::Namespace]
|
|
14
14
|
|
|
15
15
|
# @rbs resolver: RBS::Resolver::TypeNameResolver
|
|
16
16
|
# @rbs method_searcher: MethodSearcher
|
|
@@ -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}
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takeshi KOMIYA
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -52,7 +51,6 @@ dependencies:
|
|
|
52
51
|
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
53
|
version: '0'
|
|
55
|
-
description:
|
|
56
54
|
email:
|
|
57
55
|
- i.tkomiya@gmail.com
|
|
58
56
|
executables: []
|
|
@@ -106,7 +104,7 @@ metadata:
|
|
|
106
104
|
homepage_uri: https://github.com/tk0miya/rbs_activesupport
|
|
107
105
|
source_code_uri: https://github.com/tk0miya/rbs_activesupport
|
|
108
106
|
changelog_uri: https://github.com/tk0miya/rbs_activesupport
|
|
109
|
-
|
|
107
|
+
rubygems_mfa_required: 'true'
|
|
110
108
|
rdoc_options: []
|
|
111
109
|
require_paths:
|
|
112
110
|
- lib
|
|
@@ -121,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
121
119
|
- !ruby/object:Gem::Version
|
|
122
120
|
version: '0'
|
|
123
121
|
requirements: []
|
|
124
|
-
rubygems_version:
|
|
125
|
-
signing_key:
|
|
122
|
+
rubygems_version: 4.0.6
|
|
126
123
|
specification_version: 4
|
|
127
124
|
summary: A RBS files generator for activesupport
|
|
128
125
|
test_files: []
|