rbs_active_hash 1.0.2 → 1.1.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 +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +34 -30
- data/Steepfile +2 -3
- data/lib/rbs_active_hash/active_hash.rb +16 -2
- data/lib/rbs_active_hash/rake_task.rb +1 -1
- data/lib/rbs_active_hash/version.rb +1 -1
- data/rbs_active_hash.gemspec +2 -1
- data/rbs_collection.lock.yaml +21 -17
- data/rbs_collection.yaml +0 -3
- data/sig/generators/rbs_active_hash/install_generator.rbs +5 -0
- data/sig/rbs_active_hash/active_hash.rbs +5 -4
- data/sig/rbs_active_hash/rake_task.rbs +13 -1
- data/sig/rbs_active_hash.rbs +3 -1
- data/sig/shims/rake.rbs +19 -0
- data/sig/shims/thor.rbs +5 -0
- metadata +20 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2eb5b40b0f8db429b0de00b935811812863b1ea0b28760068bfc34a69bf0f5e
|
|
4
|
+
data.tar.gz: 81c7d9ee55d7735c1ff897adb08c8b924bfedee14ab537a35dd187e9679c49f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af3b784c8dea4a0106aca8f813162f1cb91fafd4a3a892234caa1fb3cfc264222eebe0ba25f74b7b0133d05c96bdf859ce33f08e1ba0fb9356ee4ab0fc609e56
|
|
7
|
+
data.tar.gz: 55ffa16dccd6b383f2cb0999d4b92eeb080b893616660d778dac2212a07b640aa754531ca50b6cf04bd0e92d0d9cea3f7729000e1b58b07c38bf6334f0c158d3
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rbs_active_hash (1.
|
|
4
|
+
rbs_active_hash (1.1.1)
|
|
5
5
|
active_hash
|
|
6
|
+
rbs
|
|
6
7
|
rbs_rails
|
|
7
8
|
|
|
8
9
|
GEM
|
|
9
10
|
remote: https://rubygems.org/
|
|
10
11
|
specs:
|
|
11
|
-
actionpack (7.0.
|
|
12
|
-
actionview (= 7.0.
|
|
13
|
-
activesupport (= 7.0.
|
|
12
|
+
actionpack (7.0.6)
|
|
13
|
+
actionview (= 7.0.6)
|
|
14
|
+
activesupport (= 7.0.6)
|
|
14
15
|
rack (~> 2.0, >= 2.2.4)
|
|
15
16
|
rack-test (>= 0.6.3)
|
|
16
17
|
rails-dom-testing (~> 2.0)
|
|
17
18
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
18
|
-
actionview (7.0.
|
|
19
|
-
activesupport (= 7.0.
|
|
19
|
+
actionview (7.0.6)
|
|
20
|
+
activesupport (= 7.0.6)
|
|
20
21
|
builder (~> 3.1)
|
|
21
22
|
erubi (~> 1.4)
|
|
22
23
|
rails-dom-testing (~> 2.0)
|
|
23
24
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
24
25
|
active_hash (3.2.0)
|
|
25
26
|
activesupport (>= 5.0.0)
|
|
26
|
-
activemodel (7.0.
|
|
27
|
-
activesupport (= 7.0.
|
|
28
|
-
activerecord (7.0.
|
|
29
|
-
activemodel (= 7.0.
|
|
30
|
-
activesupport (= 7.0.
|
|
31
|
-
activesupport (7.0.
|
|
27
|
+
activemodel (7.0.6)
|
|
28
|
+
activesupport (= 7.0.6)
|
|
29
|
+
activerecord (7.0.6)
|
|
30
|
+
activemodel (= 7.0.6)
|
|
31
|
+
activesupport (= 7.0.6)
|
|
32
|
+
activesupport (7.0.6)
|
|
32
33
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
33
34
|
i18n (>= 1.6, < 2)
|
|
34
35
|
minitest (>= 5.1)
|
|
@@ -38,12 +39,12 @@ GEM
|
|
|
38
39
|
coderay (1.1.3)
|
|
39
40
|
concurrent-ruby (1.2.2)
|
|
40
41
|
crass (1.0.6)
|
|
41
|
-
csv (3.2.
|
|
42
|
+
csv (3.2.7)
|
|
42
43
|
diff-lcs (1.5.0)
|
|
43
44
|
erubi (1.12.0)
|
|
44
45
|
ffi (1.15.5)
|
|
45
46
|
fileutils (1.7.1)
|
|
46
|
-
i18n (1.14.
|
|
47
|
+
i18n (1.14.1)
|
|
47
48
|
concurrent-ruby (~> 1.0)
|
|
48
49
|
json (2.6.3)
|
|
49
50
|
language_server-protocol (3.17.0.3)
|
|
@@ -55,7 +56,7 @@ GEM
|
|
|
55
56
|
crass (~> 1.0.2)
|
|
56
57
|
nokogiri (>= 1.12.0)
|
|
57
58
|
method_source (1.0.0)
|
|
58
|
-
minitest (5.
|
|
59
|
+
minitest (5.19.0)
|
|
59
60
|
nokogiri (1.15.2-x86_64-darwin)
|
|
60
61
|
racc (~> 1.4)
|
|
61
62
|
nokogiri (1.15.2-x86_64-linux)
|
|
@@ -67,19 +68,20 @@ GEM
|
|
|
67
68
|
pry (0.14.2)
|
|
68
69
|
coderay (~> 1.1)
|
|
69
70
|
method_source (~> 1.0)
|
|
70
|
-
racc (1.7.
|
|
71
|
+
racc (1.7.1)
|
|
71
72
|
rack (2.2.7)
|
|
72
73
|
rack-test (2.1.0)
|
|
73
74
|
rack (>= 1.3)
|
|
74
|
-
rails-dom-testing (2.
|
|
75
|
-
activesupport (>=
|
|
75
|
+
rails-dom-testing (2.1.1)
|
|
76
|
+
activesupport (>= 5.0.0)
|
|
77
|
+
minitest
|
|
76
78
|
nokogiri (>= 1.6)
|
|
77
79
|
rails-html-sanitizer (1.6.0)
|
|
78
80
|
loofah (~> 2.21)
|
|
79
81
|
nokogiri (~> 1.14)
|
|
80
|
-
railties (7.0.
|
|
81
|
-
actionpack (= 7.0.
|
|
82
|
-
activesupport (= 7.0.
|
|
82
|
+
railties (7.0.6)
|
|
83
|
+
actionpack (= 7.0.6)
|
|
84
|
+
activesupport (= 7.0.6)
|
|
83
85
|
method_source
|
|
84
86
|
rake (>= 12.2)
|
|
85
87
|
thor (~> 1.0)
|
|
@@ -89,12 +91,12 @@ GEM
|
|
|
89
91
|
rb-fsevent (0.11.2)
|
|
90
92
|
rb-inotify (0.10.1)
|
|
91
93
|
ffi (~> 1.0)
|
|
92
|
-
rbs (3.1.
|
|
94
|
+
rbs (3.1.3)
|
|
93
95
|
rbs_rails (0.12.0)
|
|
94
96
|
parser
|
|
95
97
|
rbs (>= 1)
|
|
96
98
|
regexp_parser (2.8.1)
|
|
97
|
-
rexml (3.2.
|
|
99
|
+
rexml (3.2.6)
|
|
98
100
|
rspec (3.12.0)
|
|
99
101
|
rspec-core (~> 3.12.0)
|
|
100
102
|
rspec-expectations (~> 3.12.0)
|
|
@@ -111,23 +113,24 @@ GEM
|
|
|
111
113
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
112
114
|
rspec-support (~> 3.12.0)
|
|
113
115
|
rspec-support (3.12.0)
|
|
114
|
-
rubocop (1.
|
|
116
|
+
rubocop (1.55.0)
|
|
115
117
|
json (~> 2.3)
|
|
118
|
+
language_server-protocol (>= 3.17.0)
|
|
116
119
|
parallel (~> 1.10)
|
|
117
120
|
parser (>= 3.2.2.3)
|
|
118
121
|
rainbow (>= 2.2.2, < 4.0)
|
|
119
122
|
regexp_parser (>= 1.8, < 3.0)
|
|
120
123
|
rexml (>= 3.2.5, < 4.0)
|
|
121
|
-
rubocop-ast (>= 1.28.
|
|
124
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
|
122
125
|
ruby-progressbar (~> 1.7)
|
|
123
126
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
124
127
|
rubocop-ast (1.29.0)
|
|
125
128
|
parser (>= 3.2.1.0)
|
|
126
129
|
ruby-progressbar (1.13.0)
|
|
127
130
|
securerandom (0.2.2)
|
|
128
|
-
steep (1.
|
|
131
|
+
steep (1.5.2)
|
|
129
132
|
activesupport (>= 5.1)
|
|
130
|
-
concurrent-ruby (>= 1.
|
|
133
|
+
concurrent-ruby (>= 1.1.10)
|
|
131
134
|
csv (>= 3.0.9)
|
|
132
135
|
fileutils (>= 1.1.0)
|
|
133
136
|
json (>= 2.1.0)
|
|
@@ -136,7 +139,7 @@ GEM
|
|
|
136
139
|
logger (>= 1.3.0)
|
|
137
140
|
parser (>= 3.1)
|
|
138
141
|
rainbow (>= 2.2.2, < 4.0)
|
|
139
|
-
rbs (>=
|
|
142
|
+
rbs (>= 3.1.0)
|
|
140
143
|
securerandom (>= 0.1)
|
|
141
144
|
strscan (>= 1.0.0)
|
|
142
145
|
terminal-table (>= 2, < 4)
|
|
@@ -150,6 +153,7 @@ GEM
|
|
|
150
153
|
zeitwerk (2.6.8)
|
|
151
154
|
|
|
152
155
|
PLATFORMS
|
|
156
|
+
x86_64-darwin-19
|
|
153
157
|
x86_64-darwin-21
|
|
154
158
|
x86_64-linux
|
|
155
159
|
|
|
@@ -160,8 +164,8 @@ DEPENDENCIES
|
|
|
160
164
|
rbs_active_hash!
|
|
161
165
|
rspec
|
|
162
166
|
rspec-daemon
|
|
163
|
-
rubocop (~> 1.
|
|
167
|
+
rubocop (~> 1.55)
|
|
164
168
|
steep
|
|
165
169
|
|
|
166
170
|
BUNDLED WITH
|
|
167
|
-
2.4.
|
|
171
|
+
2.4.4
|
data/Steepfile
CHANGED
|
@@ -5,8 +5,7 @@ D = Steep::Diagnostic
|
|
|
5
5
|
target :lib do
|
|
6
6
|
signature "sig"
|
|
7
7
|
|
|
8
|
-
check "lib"
|
|
9
|
-
check "Gemfile" # File name
|
|
8
|
+
check "lib"
|
|
10
9
|
|
|
11
|
-
configure_code_diagnostics(D::Ruby.lenient)
|
|
10
|
+
configure_code_diagnostics(D::Ruby.lenient)
|
|
12
11
|
end
|
|
@@ -121,7 +121,7 @@ module RbsActiveHash
|
|
|
121
121
|
method_types = Hash.new { |hash, key| hash[key] = [] }
|
|
122
122
|
(klass.data || []).each do |record|
|
|
123
123
|
record.symbolize_keys.each do |key, value|
|
|
124
|
-
method_types[key] << value
|
|
124
|
+
method_types[key] << identify_class(value)
|
|
125
125
|
end
|
|
126
126
|
end
|
|
127
127
|
method_types.transform_values(&:uniq)
|
|
@@ -135,13 +135,27 @@ module RbsActiveHash
|
|
|
135
135
|
"end\n" * klass.module_parents.size
|
|
136
136
|
end
|
|
137
137
|
|
|
138
|
+
def identify_class(obj)
|
|
139
|
+
case obj
|
|
140
|
+
when Array
|
|
141
|
+
args = obj.map(&:class)
|
|
142
|
+
"#{obj.class}[#{stringify_type(args)}]"
|
|
143
|
+
when Hash
|
|
144
|
+
keys = obj.keys.map(&:class)
|
|
145
|
+
values = obj.values.map(&:class)
|
|
146
|
+
"#{obj.class}[#{stringify_type(keys)}, #{stringify_type(values)}]"
|
|
147
|
+
else
|
|
148
|
+
obj.class
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
138
152
|
def stringify_type(type)
|
|
139
153
|
if [TrueClass, FalseClass].include?(type)
|
|
140
154
|
"bool"
|
|
141
155
|
elsif type == NilClass
|
|
142
156
|
"nil"
|
|
143
157
|
elsif type.is_a? Class
|
|
144
|
-
type.name
|
|
158
|
+
type.name.to_s
|
|
145
159
|
elsif type.is_a? Array
|
|
146
160
|
types = type.map { |t| stringify_type(t) }.uniq.sort
|
|
147
161
|
if types.delete("nil")
|
data/rbs_active_hash.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.description = "A RBS files generator for ActiveHash models"
|
|
13
13
|
spec.homepage = "https://github.com/tk0miya/rbs_active_hash"
|
|
14
14
|
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">=
|
|
15
|
+
spec.required_ruby_version = ">= 2.7"
|
|
16
16
|
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
18
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.require_paths = ["lib"]
|
|
29
29
|
|
|
30
30
|
spec.add_dependency "active_hash"
|
|
31
|
+
spec.add_dependency "rbs"
|
|
31
32
|
spec.add_dependency "rbs_rails"
|
|
32
33
|
|
|
33
34
|
# For more information and examples about making a new gem, check out our
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
sources:
|
|
3
3
|
- type: git
|
|
4
4
|
name: ruby/gem_rbs_collection
|
|
5
|
-
revision:
|
|
5
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
6
6
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
7
7
|
repo_dir: gems
|
|
8
8
|
path: ".gem_rbs_collection"
|
|
@@ -16,7 +16,7 @@ gems:
|
|
|
16
16
|
source:
|
|
17
17
|
type: git
|
|
18
18
|
name: ruby/gem_rbs_collection
|
|
19
|
-
revision:
|
|
19
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
20
20
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
21
21
|
repo_dir: gems
|
|
22
22
|
- name: actionview
|
|
@@ -24,7 +24,7 @@ gems:
|
|
|
24
24
|
source:
|
|
25
25
|
type: git
|
|
26
26
|
name: ruby/gem_rbs_collection
|
|
27
|
-
revision:
|
|
27
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
28
28
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
29
29
|
repo_dir: gems
|
|
30
30
|
- name: active_hash
|
|
@@ -32,7 +32,7 @@ gems:
|
|
|
32
32
|
source:
|
|
33
33
|
type: git
|
|
34
34
|
name: ruby/gem_rbs_collection
|
|
35
|
-
revision:
|
|
35
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
36
36
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
37
37
|
repo_dir: gems
|
|
38
38
|
- name: activemodel
|
|
@@ -40,7 +40,7 @@ gems:
|
|
|
40
40
|
source:
|
|
41
41
|
type: git
|
|
42
42
|
name: ruby/gem_rbs_collection
|
|
43
|
-
revision:
|
|
43
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
44
44
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
45
45
|
repo_dir: gems
|
|
46
46
|
- name: activerecord
|
|
@@ -48,7 +48,7 @@ gems:
|
|
|
48
48
|
source:
|
|
49
49
|
type: git
|
|
50
50
|
name: ruby/gem_rbs_collection
|
|
51
|
-
revision:
|
|
51
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
52
52
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
53
53
|
repo_dir: gems
|
|
54
54
|
- name: activesupport
|
|
@@ -56,7 +56,7 @@ gems:
|
|
|
56
56
|
source:
|
|
57
57
|
type: git
|
|
58
58
|
name: ruby/gem_rbs_collection
|
|
59
|
-
revision:
|
|
59
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
60
60
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
61
61
|
repo_dir: gems
|
|
62
62
|
- name: ast
|
|
@@ -64,7 +64,7 @@ gems:
|
|
|
64
64
|
source:
|
|
65
65
|
type: git
|
|
66
66
|
name: ruby/gem_rbs_collection
|
|
67
|
-
revision:
|
|
67
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
68
68
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
69
69
|
repo_dir: gems
|
|
70
70
|
- name: cgi
|
|
@@ -76,7 +76,7 @@ gems:
|
|
|
76
76
|
source:
|
|
77
77
|
type: git
|
|
78
78
|
name: ruby/gem_rbs_collection
|
|
79
|
-
revision:
|
|
79
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
80
80
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
81
81
|
repo_dir: gems
|
|
82
82
|
- name: date
|
|
@@ -88,7 +88,7 @@ gems:
|
|
|
88
88
|
source:
|
|
89
89
|
type: git
|
|
90
90
|
name: ruby/gem_rbs_collection
|
|
91
|
-
revision:
|
|
91
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
92
92
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
93
93
|
repo_dir: gems
|
|
94
94
|
- name: json
|
|
@@ -116,7 +116,7 @@ gems:
|
|
|
116
116
|
source:
|
|
117
117
|
type: git
|
|
118
118
|
name: ruby/gem_rbs_collection
|
|
119
|
-
revision:
|
|
119
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
120
120
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
121
121
|
repo_dir: gems
|
|
122
122
|
- name: optparse
|
|
@@ -128,7 +128,7 @@ gems:
|
|
|
128
128
|
source:
|
|
129
129
|
type: git
|
|
130
130
|
name: ruby/gem_rbs_collection
|
|
131
|
-
revision:
|
|
131
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
132
132
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
133
133
|
repo_dir: gems
|
|
134
134
|
- name: pathname
|
|
@@ -140,7 +140,7 @@ gems:
|
|
|
140
140
|
source:
|
|
141
141
|
type: git
|
|
142
142
|
name: ruby/gem_rbs_collection
|
|
143
|
-
revision:
|
|
143
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
144
144
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
145
145
|
repo_dir: gems
|
|
146
146
|
- name: rails-dom-testing
|
|
@@ -148,7 +148,7 @@ gems:
|
|
|
148
148
|
source:
|
|
149
149
|
type: git
|
|
150
150
|
name: ruby/gem_rbs_collection
|
|
151
|
-
revision:
|
|
151
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
152
152
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
153
153
|
repo_dir: gems
|
|
154
154
|
- name: railties
|
|
@@ -156,7 +156,7 @@ gems:
|
|
|
156
156
|
source:
|
|
157
157
|
type: git
|
|
158
158
|
name: ruby/gem_rbs_collection
|
|
159
|
-
revision:
|
|
159
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
160
160
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
161
161
|
repo_dir: gems
|
|
162
162
|
- name: rainbow
|
|
@@ -164,11 +164,11 @@ gems:
|
|
|
164
164
|
source:
|
|
165
165
|
type: git
|
|
166
166
|
name: ruby/gem_rbs_collection
|
|
167
|
-
revision:
|
|
167
|
+
revision: 9330d49993d18362cce9190b9596f03d1f4915f8
|
|
168
168
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
169
169
|
repo_dir: gems
|
|
170
170
|
- name: rbs
|
|
171
|
-
version: 3.1.
|
|
171
|
+
version: 3.1.3
|
|
172
172
|
source:
|
|
173
173
|
type: rubygems
|
|
174
174
|
- name: rbs_rails
|
|
@@ -179,6 +179,10 @@ gems:
|
|
|
179
179
|
version: '0'
|
|
180
180
|
source:
|
|
181
181
|
type: stdlib
|
|
182
|
+
- name: securerandom
|
|
183
|
+
version: '0'
|
|
184
|
+
source:
|
|
185
|
+
type: stdlib
|
|
182
186
|
- name: singleton
|
|
183
187
|
version: '0'
|
|
184
188
|
source:
|
data/rbs_collection.yaml
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module RbsActiveHash
|
|
2
2
|
module ActiveHash
|
|
3
|
-
def self.user_defined_model?: (
|
|
4
|
-
def self.class_to_rbs: (
|
|
3
|
+
def self.user_defined_model?: (singleton(ActiveHash::Base) klass) -> bool
|
|
4
|
+
def self.class_to_rbs: (singleton(ActiveHash::Base) klass) -> String
|
|
5
5
|
|
|
6
6
|
class Generator
|
|
7
|
-
attr_reader klass:
|
|
7
|
+
attr_reader klass: singleton(ActiveHash::Base)
|
|
8
8
|
attr_reader klass_name: String
|
|
9
9
|
|
|
10
|
-
def initialize: (
|
|
10
|
+
def initialize: (singleton(ActiveHash::Base) klass) -> void
|
|
11
11
|
def generate: () -> String
|
|
12
12
|
|
|
13
13
|
private
|
|
@@ -22,6 +22,7 @@ module RbsActiveHash
|
|
|
22
22
|
def valid_field_name?: (String) -> boolish
|
|
23
23
|
def footer: () -> String
|
|
24
24
|
|
|
25
|
+
def identify_class: (untyped value) -> (String | singleton(Class))
|
|
25
26
|
def stringify_type: (untyped type) -> String
|
|
26
27
|
end
|
|
27
28
|
end
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
module RbsActiveHash
|
|
2
|
-
|
|
2
|
+
class RakeTask < Rake::TaskLib
|
|
3
|
+
attr_accessor name: Symbol
|
|
4
|
+
attr_accessor signature_root_dir: Pathname
|
|
5
|
+
|
|
3
6
|
@name: Symbol
|
|
4
7
|
@signature_root_dir: Pathname
|
|
8
|
+
|
|
9
|
+
def initialize: (Symbol name) { (RakeTask) -> void } -> void
|
|
10
|
+
def define_setup_task: () -> void
|
|
11
|
+
def define_clean_task: () -> void
|
|
12
|
+
def define_generate_task: () -> void
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def setup_signature_root_dir!: () -> void
|
|
5
17
|
end
|
|
6
18
|
end
|
data/sig/rbs_active_hash.rbs
CHANGED
data/sig/shims/rake.rbs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Rake
|
|
2
|
+
class TaskLib
|
|
3
|
+
include Rake::DSL
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
module DSL
|
|
7
|
+
private
|
|
8
|
+
|
|
9
|
+
def desc: (String description) -> void
|
|
10
|
+
def file: (*untyped args) ?{ () -> void } -> void
|
|
11
|
+
def import: (*String fns) -> void
|
|
12
|
+
def multitask: (*untyped args) ?{ () -> void } -> void
|
|
13
|
+
def namespace: (?String? name) ?{ () -> void } -> void
|
|
14
|
+
def rule: (*untyped args) ?{ () -> void } -> void
|
|
15
|
+
def task: (*untyped args) ?{ () -> void } -> void
|
|
16
|
+
def sh: (*String cmd) ?{ (bool, Process::Status) -> void } -> void
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
data/sig/shims/thor.rbs
ADDED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbs_active_hash
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takeshi KOMIYA
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-08-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_hash
|
|
@@ -24,6 +24,20 @@ dependencies:
|
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rbs
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
27
41
|
- !ruby/object:Gem::Dependency
|
|
28
42
|
name: rbs_rails
|
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -63,9 +77,12 @@ files:
|
|
|
63
77
|
- rbs_active_hash.gemspec
|
|
64
78
|
- rbs_collection.lock.yaml
|
|
65
79
|
- rbs_collection.yaml
|
|
80
|
+
- sig/generators/rbs_active_hash/install_generator.rbs
|
|
66
81
|
- sig/rbs_active_hash.rbs
|
|
67
82
|
- sig/rbs_active_hash/active_hash.rbs
|
|
68
83
|
- sig/rbs_active_hash/rake_task.rbs
|
|
84
|
+
- sig/shims/rake.rbs
|
|
85
|
+
- sig/shims/thor.rbs
|
|
69
86
|
homepage: https://github.com/tk0miya/rbs_active_hash
|
|
70
87
|
licenses:
|
|
71
88
|
- MIT
|
|
@@ -81,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
81
98
|
requirements:
|
|
82
99
|
- - ">="
|
|
83
100
|
- !ruby/object:Gem::Version
|
|
84
|
-
version: '
|
|
101
|
+
version: '2.7'
|
|
85
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
103
|
requirements:
|
|
87
104
|
- - ">="
|