rbs_rails 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -3
- data/Gemfile.lock +179 -124
- data/README.md +1 -0
- data/Steepfile +5 -0
- data/lib/generators/rbs_rails/install_generator.rb +16 -12
- data/lib/rbs_rails/active_record.rb +51 -43
- data/lib/rbs_rails/dependency_builder.rb +5 -1
- data/lib/rbs_rails/rake_task.rb +7 -7
- data/lib/rbs_rails/util.rb +7 -12
- data/lib/rbs_rails/version.rb +1 -1
- data/rbs_collection.lock.yaml +228 -48
- data/rbs_collection.yaml +0 -2
- data/rbs_rails.gemspec +1 -1
- data/sig/rbs_rails/active_record.rbs +7 -3
- data/sig/rbs_rails/dependency_builder.rbs +4 -0
- data/sig/rbs_rails/rake_task.rbs +1 -1
- data/sig/rbs_rails/util.rbs +1 -1
- metadata +4 -9
- data/sig/_internal/fileutils.rbs +0 -4
- data/sig/_internal/thor.rbs +0 -5
data/rbs_collection.lock.yaml
CHANGED
@@ -1,144 +1,324 @@
|
|
1
1
|
---
|
2
|
-
sources:
|
3
|
-
- name: ruby/gem_rbs_collection
|
4
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
5
|
-
revision: main
|
6
|
-
repo_dir: gems
|
7
2
|
path: ".gem_rbs_collection"
|
8
3
|
gems:
|
9
|
-
- name:
|
4
|
+
- name: actioncable
|
5
|
+
version: '7.1'
|
6
|
+
source:
|
7
|
+
type: git
|
8
|
+
name: ruby/gem_rbs_collection
|
9
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
10
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
|
+
repo_dir: gems
|
12
|
+
- name: actionmailer
|
13
|
+
version: '7.0'
|
14
|
+
source:
|
15
|
+
type: git
|
16
|
+
name: ruby/gem_rbs_collection
|
17
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
18
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
19
|
+
repo_dir: gems
|
20
|
+
- name: actionpack
|
21
|
+
version: '7.2'
|
22
|
+
source:
|
23
|
+
type: git
|
24
|
+
name: ruby/gem_rbs_collection
|
25
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
26
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
27
|
+
repo_dir: gems
|
28
|
+
- name: actiontext
|
29
|
+
version: '7.2'
|
30
|
+
source:
|
31
|
+
type: git
|
32
|
+
name: ruby/gem_rbs_collection
|
33
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
34
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
35
|
+
repo_dir: gems
|
36
|
+
- name: actionview
|
37
|
+
version: '6.0'
|
38
|
+
source:
|
39
|
+
type: git
|
40
|
+
name: ruby/gem_rbs_collection
|
41
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
42
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
43
|
+
repo_dir: gems
|
44
|
+
- name: activejob
|
45
|
+
version: '6.0'
|
46
|
+
source:
|
47
|
+
type: git
|
48
|
+
name: ruby/gem_rbs_collection
|
49
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
50
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
51
|
+
repo_dir: gems
|
52
|
+
- name: activemodel
|
53
|
+
version: '7.0'
|
54
|
+
source:
|
55
|
+
type: git
|
56
|
+
name: ruby/gem_rbs_collection
|
57
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
58
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
59
|
+
repo_dir: gems
|
60
|
+
- name: activerecord
|
61
|
+
version: '7.2'
|
62
|
+
source:
|
63
|
+
type: git
|
64
|
+
name: ruby/gem_rbs_collection
|
65
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
66
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
67
|
+
repo_dir: gems
|
68
|
+
- name: activestorage
|
69
|
+
version: '7.0'
|
70
|
+
source:
|
71
|
+
type: git
|
72
|
+
name: ruby/gem_rbs_collection
|
73
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
74
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
75
|
+
repo_dir: gems
|
76
|
+
- name: activesupport
|
77
|
+
version: '7.0'
|
78
|
+
source:
|
79
|
+
type: git
|
80
|
+
name: ruby/gem_rbs_collection
|
81
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
82
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
83
|
+
repo_dir: gems
|
84
|
+
- name: base64
|
10
85
|
version: '0'
|
11
86
|
source:
|
12
87
|
type: stdlib
|
13
|
-
- name:
|
88
|
+
- name: benchmark
|
14
89
|
version: '0'
|
15
90
|
source:
|
16
91
|
type: stdlib
|
17
|
-
- name:
|
92
|
+
- name: bigdecimal
|
18
93
|
version: '0'
|
19
94
|
source:
|
20
95
|
type: stdlib
|
21
|
-
- name:
|
96
|
+
- name: cgi
|
22
97
|
version: '0'
|
23
98
|
source:
|
24
99
|
type: stdlib
|
25
|
-
- name:
|
100
|
+
- name: concurrent-ruby
|
101
|
+
version: '1.1'
|
102
|
+
source:
|
103
|
+
type: git
|
104
|
+
name: ruby/gem_rbs_collection
|
105
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
106
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
107
|
+
repo_dir: gems
|
108
|
+
- name: connection_pool
|
109
|
+
version: '2.4'
|
110
|
+
source:
|
111
|
+
type: git
|
112
|
+
name: ruby/gem_rbs_collection
|
113
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
114
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
115
|
+
repo_dir: gems
|
116
|
+
- name: date
|
26
117
|
version: '0'
|
27
118
|
source:
|
28
119
|
type: stdlib
|
29
|
-
- name:
|
120
|
+
- name: dbm
|
30
121
|
version: '0'
|
31
122
|
source:
|
32
123
|
type: stdlib
|
33
|
-
- name:
|
124
|
+
- name: delegate
|
34
125
|
version: '0'
|
35
126
|
source:
|
36
127
|
type: stdlib
|
37
|
-
- name:
|
38
|
-
version: '
|
128
|
+
- name: erb
|
129
|
+
version: '0'
|
130
|
+
source:
|
131
|
+
type: stdlib
|
132
|
+
- name: fileutils
|
133
|
+
version: '0'
|
134
|
+
source:
|
135
|
+
type: stdlib
|
136
|
+
- name: globalid
|
137
|
+
version: '1.1'
|
39
138
|
source:
|
40
139
|
type: git
|
41
140
|
name: ruby/gem_rbs_collection
|
42
|
-
revision:
|
141
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
43
142
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
44
143
|
repo_dir: gems
|
45
|
-
- name:
|
46
|
-
version: '
|
144
|
+
- name: i18n
|
145
|
+
version: '1.10'
|
47
146
|
source:
|
48
147
|
type: git
|
49
148
|
name: ruby/gem_rbs_collection
|
50
|
-
revision:
|
149
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
51
150
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
52
151
|
repo_dir: gems
|
53
|
-
- name:
|
54
|
-
version: '
|
152
|
+
- name: io-console
|
153
|
+
version: '0'
|
154
|
+
source:
|
155
|
+
type: stdlib
|
156
|
+
- name: json
|
157
|
+
version: '0'
|
158
|
+
source:
|
159
|
+
type: stdlib
|
160
|
+
- name: logger
|
161
|
+
version: '0'
|
162
|
+
source:
|
163
|
+
type: stdlib
|
164
|
+
- name: mail
|
165
|
+
version: '2.8'
|
55
166
|
source:
|
56
167
|
type: git
|
57
168
|
name: ruby/gem_rbs_collection
|
58
|
-
revision:
|
169
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
59
170
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
60
171
|
repo_dir: gems
|
61
|
-
- name:
|
62
|
-
version: '
|
172
|
+
- name: marcel
|
173
|
+
version: '1.0'
|
63
174
|
source:
|
64
175
|
type: git
|
65
176
|
name: ruby/gem_rbs_collection
|
66
|
-
revision:
|
177
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
67
178
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
68
179
|
repo_dir: gems
|
69
|
-
- name:
|
70
|
-
version: '
|
180
|
+
- name: mini_mime
|
181
|
+
version: '0.1'
|
71
182
|
source:
|
72
183
|
type: git
|
73
184
|
name: ruby/gem_rbs_collection
|
74
|
-
revision:
|
185
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
75
186
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
76
187
|
repo_dir: gems
|
77
|
-
- name:
|
78
|
-
version: '
|
188
|
+
- name: minitest
|
189
|
+
version: '0'
|
190
|
+
source:
|
191
|
+
type: stdlib
|
192
|
+
- name: monitor
|
193
|
+
version: '0'
|
194
|
+
source:
|
195
|
+
type: stdlib
|
196
|
+
- name: mutex_m
|
197
|
+
version: '0'
|
198
|
+
source:
|
199
|
+
type: stdlib
|
200
|
+
- name: net-protocol
|
201
|
+
version: '0'
|
202
|
+
source:
|
203
|
+
type: stdlib
|
204
|
+
- name: net-smtp
|
205
|
+
version: '0'
|
206
|
+
source:
|
207
|
+
type: stdlib
|
208
|
+
- name: openssl
|
209
|
+
version: '0'
|
210
|
+
source:
|
211
|
+
type: stdlib
|
212
|
+
- name: optparse
|
213
|
+
version: '0'
|
214
|
+
source:
|
215
|
+
type: stdlib
|
216
|
+
- name: pathname
|
217
|
+
version: '0'
|
218
|
+
source:
|
219
|
+
type: stdlib
|
220
|
+
- name: pstore
|
221
|
+
version: '0'
|
222
|
+
source:
|
223
|
+
type: stdlib
|
224
|
+
- name: psych
|
225
|
+
version: '0'
|
226
|
+
source:
|
227
|
+
type: stdlib
|
228
|
+
- name: rack
|
229
|
+
version: '2.2'
|
79
230
|
source:
|
80
231
|
type: git
|
81
232
|
name: ruby/gem_rbs_collection
|
82
|
-
revision:
|
233
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
83
234
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
84
235
|
repo_dir: gems
|
85
|
-
- name:
|
86
|
-
version: '
|
236
|
+
- name: rails-dom-testing
|
237
|
+
version: '2.0'
|
87
238
|
source:
|
88
239
|
type: git
|
89
240
|
name: ruby/gem_rbs_collection
|
90
|
-
revision:
|
241
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
91
242
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
92
243
|
repo_dir: gems
|
93
|
-
- name:
|
94
|
-
version: '1.
|
244
|
+
- name: rails-html-sanitizer
|
245
|
+
version: '1.6'
|
95
246
|
source:
|
96
247
|
type: git
|
97
248
|
name: ruby/gem_rbs_collection
|
98
|
-
revision:
|
249
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
99
250
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
100
251
|
repo_dir: gems
|
101
|
-
- name:
|
102
|
-
version:
|
252
|
+
- name: railties
|
253
|
+
version: '6.0'
|
103
254
|
source:
|
104
255
|
type: git
|
105
256
|
name: ruby/gem_rbs_collection
|
106
|
-
revision:
|
257
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
107
258
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
108
259
|
repo_dir: gems
|
109
|
-
- name:
|
110
|
-
version: '
|
260
|
+
- name: rake
|
261
|
+
version: '13.0'
|
111
262
|
source:
|
112
263
|
type: git
|
113
264
|
name: ruby/gem_rbs_collection
|
114
|
-
revision:
|
265
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
115
266
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
116
267
|
repo_dir: gems
|
117
268
|
- name: rbs
|
118
|
-
version:
|
269
|
+
version: 3.6.1
|
119
270
|
source:
|
120
271
|
type: rubygems
|
121
|
-
- name:
|
272
|
+
- name: rdoc
|
122
273
|
version: '0'
|
123
274
|
source:
|
124
275
|
type: stdlib
|
125
|
-
- name:
|
276
|
+
- name: securerandom
|
126
277
|
version: '0'
|
127
278
|
source:
|
128
279
|
type: stdlib
|
129
|
-
- name:
|
280
|
+
- name: singleton
|
130
281
|
version: '0'
|
131
282
|
source:
|
132
283
|
type: stdlib
|
133
|
-
- name:
|
284
|
+
- name: socket
|
134
285
|
version: '0'
|
135
286
|
source:
|
136
287
|
type: stdlib
|
137
|
-
- name:
|
288
|
+
- name: tempfile
|
138
289
|
version: '0'
|
139
290
|
source:
|
140
291
|
type: stdlib
|
292
|
+
- name: thor
|
293
|
+
version: '1.2'
|
294
|
+
source:
|
295
|
+
type: git
|
296
|
+
name: ruby/gem_rbs_collection
|
297
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
298
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
299
|
+
repo_dir: gems
|
141
300
|
- name: time
|
142
301
|
version: '0'
|
143
302
|
source:
|
144
303
|
type: stdlib
|
304
|
+
- name: timeout
|
305
|
+
version: '0'
|
306
|
+
source:
|
307
|
+
type: stdlib
|
308
|
+
- name: tsort
|
309
|
+
version: '0'
|
310
|
+
source:
|
311
|
+
type: stdlib
|
312
|
+
- name: tzinfo
|
313
|
+
version: '2.0'
|
314
|
+
source:
|
315
|
+
type: git
|
316
|
+
name: ruby/gem_rbs_collection
|
317
|
+
revision: 408834635f112abe5ea66cf3846f5c81ce2c94b4
|
318
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
319
|
+
repo_dir: gems
|
320
|
+
- name: uri
|
321
|
+
version: '0'
|
322
|
+
source:
|
323
|
+
type: stdlib
|
324
|
+
gemfile_lock_path: Gemfile.lock
|
data/rbs_collection.yaml
CHANGED
data/rbs_rails.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.description = %q{A RBS files generator for Rails application}
|
11
11
|
spec.homepage = "https://github.com/pocke/rbs_rails"
|
12
12
|
spec.license = 'Apache-2.0'
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.2")
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
16
|
spec.metadata["source_code_uri"] = spec.homepage
|
@@ -6,6 +6,8 @@ end
|
|
6
6
|
class RbsRails::ActiveRecord::Generator
|
7
7
|
@parse_model_file: nil | Parser::AST::Node
|
8
8
|
@dependencies: Array[String]
|
9
|
+
@enum_definitions: Array[Hash[Symbol, untyped]]
|
10
|
+
@klass_name: String
|
9
11
|
|
10
12
|
IGNORED_ENUM_KEYS: Array[Symbol]
|
11
13
|
|
@@ -67,7 +69,11 @@ class RbsRails::ActiveRecord::Generator
|
|
67
69
|
def traverse: (Parser::AST::Node node) { (Parser::AST::Node) -> untyped } -> untyped
|
68
70
|
| (Parser::AST::Node node) -> Enumerator[Parser::AST::Node, untyped]
|
69
71
|
|
70
|
-
def relation_class_name: () ->
|
72
|
+
def relation_class_name: (?abs: boolish) -> String
|
73
|
+
|
74
|
+
def klass_name: (?abs: boolish) -> String
|
75
|
+
|
76
|
+
def generated_relation_methods_name: (?abs: boolish) -> String
|
71
77
|
|
72
78
|
def columns: () -> untyped
|
73
79
|
|
@@ -78,6 +84,4 @@ class RbsRails::ActiveRecord::Generator
|
|
78
84
|
private
|
79
85
|
|
80
86
|
attr_reader klass: singleton(ActiveRecord::Base)
|
81
|
-
|
82
|
-
attr_reader klass_name: String
|
83
87
|
end
|
data/sig/rbs_rails/rake_task.rbs
CHANGED
data/sig/rbs_rails/util.rbs
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2024-11-15 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: parser
|
@@ -75,8 +74,6 @@ files:
|
|
75
74
|
- rbs_collection.yaml
|
76
75
|
- rbs_rails.gemspec
|
77
76
|
- sig/_internal/activerecord.rbs
|
78
|
-
- sig/_internal/fileutils.rbs
|
79
|
-
- sig/_internal/thor.rbs
|
80
77
|
- sig/install_generator.rbs
|
81
78
|
- sig/parser.rbs
|
82
79
|
- sig/rake.rbs
|
@@ -94,7 +91,6 @@ metadata:
|
|
94
91
|
homepage_uri: https://github.com/pocke/rbs_rails
|
95
92
|
source_code_uri: https://github.com/pocke/rbs_rails
|
96
93
|
changelog_uri: https://github.com/pocke/rbs_rails/blob/master/CHANGELOG.md
|
97
|
-
post_install_message:
|
98
94
|
rdoc_options: []
|
99
95
|
require_paths:
|
100
96
|
- lib
|
@@ -102,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
98
|
requirements:
|
103
99
|
- - ">="
|
104
100
|
- !ruby/object:Gem::Version
|
105
|
-
version:
|
101
|
+
version: '3.2'
|
106
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
103
|
requirements:
|
108
104
|
- - ">="
|
109
105
|
- !ruby/object:Gem::Version
|
110
106
|
version: '0'
|
111
107
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
113
|
-
signing_key:
|
108
|
+
rubygems_version: 3.6.0.dev
|
114
109
|
specification_version: 4
|
115
110
|
summary: A RBS files generator for Rails application
|
116
111
|
test_files: []
|
data/sig/_internal/fileutils.rbs
DELETED