rbs_activesupport 1.4.1 → 1.4.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddd9bc606628feb9ac3300697d3f0c1ff82f8e1f53b01731bd3bdab771ada81b
|
4
|
+
data.tar.gz: 3d88f52a450782c345d38ba07ece5f48d6c26719d77a4e53dd038c257441203c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c78e09a673e6af25bbbf2d945448f0dcc19a3fa9d602187df8b807a77f8cc52f597b0e8c007d7cddc82284144b59dc31a05ccfb6a12b4fd400f26393171d214
|
7
|
+
data.tar.gz: af0892f0476bb5229ae60028c729ecbc15f4f1cd35706bf465cbc3a69df33803aa3c4de50f497d7b2d0e0197e6249b5a6062d4ab4f3290dd595dfb03a8d3d7f5
|
data/.vscode/settings.json
CHANGED
@@ -2,8 +2,16 @@
|
|
2
2
|
"rbs-helper.signature-directory": "sig/",
|
3
3
|
"cSpell.words": [
|
4
4
|
"cattr",
|
5
|
+
"classmethods",
|
5
6
|
"Cyclomatic",
|
6
|
-
"
|
7
|
+
"DEFN",
|
8
|
+
"FCALL",
|
9
|
+
"mattr",
|
10
|
+
"mkpath",
|
11
|
+
"rmtree",
|
12
|
+
"tasklib",
|
13
|
+
"VCALL",
|
14
|
+
"ZLIST"
|
7
15
|
],
|
8
16
|
"rbs-helper.rbs-inline-on-save": true,
|
9
17
|
"rbs-helper.rbs-inline-options": "--opt-out --output=sig/"
|
@@ -35,8 +35,13 @@ module RbsActivesupport
|
|
35
35
|
when :LIT, :STR
|
36
36
|
node.children.first
|
37
37
|
when :HASH
|
38
|
-
|
39
|
-
|
38
|
+
children = node.children.first&.children
|
39
|
+
if children
|
40
|
+
items = children.compact.map { |i| eval_node(i) }
|
41
|
+
Hash[*items]
|
42
|
+
else
|
43
|
+
{}
|
44
|
+
end
|
40
45
|
when :ZLIST
|
41
46
|
[]
|
42
47
|
when :LIST
|
@@ -53,6 +58,8 @@ module RbsActivesupport
|
|
53
58
|
eval_node(node.children.first) + RBS::Namespace.new(path: [node.children.last], absolute: false)
|
54
59
|
when :COLON3
|
55
60
|
RBS::Namespace.new(path: node.children, absolute: true)
|
61
|
+
when :CALL, :ITER
|
62
|
+
node
|
56
63
|
else
|
57
64
|
p node # for debug
|
58
65
|
raise
|
@@ -86,6 +86,12 @@ module RbsActivesupport
|
|
86
86
|
# @rbs context: RBS::Namespace?
|
87
87
|
def build_include(namespace, method_call, context) #: Array[t]
|
88
88
|
module_paths = eval_include_args(method_call.args)
|
89
|
+
module_paths.delete_if do |module_path|
|
90
|
+
unless module_path.is_a?(RBS::Namespace)
|
91
|
+
puts "ERROR: #{namespace}:#{method_call.name}: Failed to recognize an included module: #{module_path}"
|
92
|
+
true
|
93
|
+
end
|
94
|
+
end
|
89
95
|
module_paths.flat_map do |module_path|
|
90
96
|
include = Include.new(context || namespace, module_path, { private: method_call.private? })
|
91
97
|
([include] +
|
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.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takeshi KOMIYA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|