rbs_active_hash 1.3.2 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +9 -9
- data/lib/rbs_active_hash/active_hash.rb +12 -8
- data/lib/rbs_active_hash/version.rb +1 -1
- data/rbs_collection.lock.yaml +17 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50b3e286a30ef5111438bd8167f51f42b72a58af5fca5cd6351808c3e08a45ca
|
4
|
+
data.tar.gz: '009908add2d81dac55c52a572c3ceafcef090ef05778487985645062313ac40c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96db691ce7b799010753a0bb711f952d0dac12c352842548c0a2f5b9a1ec41f2c263b00f5cec4849df261c8e19b2343afe922981d66abe0ee11b1acb3b019e6e
|
7
|
+
data.tar.gz: a383ca9ab7058d7fd2ab8beea9203f707e5ab91e74f713508f5912d7293b2289f84604410658e05c28822ff6c53a31a78c6386fe426fff3c861988357fbfe7b6
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rbs_active_hash (1.
|
4
|
+
rbs_active_hash (1.4.1)
|
5
5
|
active_hash
|
6
6
|
rbs
|
7
7
|
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
erubi (~> 1.4)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
24
|
-
active_hash (3.2.
|
24
|
+
active_hash (3.2.1)
|
25
25
|
activesupport (>= 5.0.0)
|
26
26
|
activemodel (7.0.7.2)
|
27
27
|
activesupport (= 7.0.7.2)
|
@@ -56,13 +56,13 @@ GEM
|
|
56
56
|
crass (~> 1.0.2)
|
57
57
|
nokogiri (>= 1.12.0)
|
58
58
|
method_source (1.0.0)
|
59
|
-
minitest (5.
|
59
|
+
minitest (5.20.0)
|
60
60
|
nokogiri (1.15.4-x86_64-darwin)
|
61
61
|
racc (~> 1.4)
|
62
62
|
nokogiri (1.15.4-x86_64-linux)
|
63
63
|
racc (~> 1.4)
|
64
64
|
parallel (1.23.0)
|
65
|
-
parser (3.2.2.
|
65
|
+
parser (3.2.2.4)
|
66
66
|
ast (~> 2.4.1)
|
67
67
|
racc
|
68
68
|
pry (0.14.2)
|
@@ -92,7 +92,7 @@ GEM
|
|
92
92
|
rb-inotify (0.10.1)
|
93
93
|
ffi (~> 1.0)
|
94
94
|
rbs (3.1.3)
|
95
|
-
regexp_parser (2.8.
|
95
|
+
regexp_parser (2.8.2)
|
96
96
|
rexml (3.2.6)
|
97
97
|
rspec (3.12.0)
|
98
98
|
rspec-core (~> 3.12.0)
|
@@ -110,12 +110,12 @@ GEM
|
|
110
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
111
111
|
rspec-support (~> 3.12.0)
|
112
112
|
rspec-support (3.12.0)
|
113
|
-
rubocop (1.
|
113
|
+
rubocop (1.57.1)
|
114
114
|
base64 (~> 0.1.1)
|
115
115
|
json (~> 2.3)
|
116
116
|
language_server-protocol (>= 3.17.0)
|
117
117
|
parallel (~> 1.10)
|
118
|
-
parser (>= 3.2.2.
|
118
|
+
parser (>= 3.2.2.4)
|
119
119
|
rainbow (>= 2.2.2, < 4.0)
|
120
120
|
regexp_parser (>= 1.8, < 3.0)
|
121
121
|
rexml (>= 3.2.5, < 4.0)
|
@@ -147,7 +147,7 @@ GEM
|
|
147
147
|
thor (1.2.2)
|
148
148
|
tzinfo (2.0.6)
|
149
149
|
concurrent-ruby (~> 1.0)
|
150
|
-
unicode-display_width (2.
|
150
|
+
unicode-display_width (2.5.0)
|
151
151
|
zeitwerk (2.6.11)
|
152
152
|
|
153
153
|
PLATFORMS
|
@@ -162,7 +162,7 @@ DEPENDENCIES
|
|
162
162
|
rbs_active_hash!
|
163
163
|
rspec
|
164
164
|
rspec-daemon
|
165
|
-
rubocop (~> 1.
|
165
|
+
rubocop (~> 1.57)
|
166
166
|
steep
|
167
167
|
|
168
168
|
BUNDLED WITH
|
@@ -176,13 +176,17 @@ module RbsActiveHash
|
|
176
176
|
def method_decls
|
177
177
|
method_names.map do |method|
|
178
178
|
method_type = stringify_type(method_types.fetch(method, "untyped"))
|
179
|
-
|
180
|
-
def #{
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
179
|
+
if method == :id
|
180
|
+
"def self.find: (#{method_type} id) -> instance | ...\n"
|
181
|
+
else
|
182
|
+
<<~RBS
|
183
|
+
def #{method}: () -> #{method_type}
|
184
|
+
def #{method}=: (#{method_type} value) -> #{method_type}
|
185
|
+
def #{method}?: () -> bool
|
186
|
+
def self.find_by_#{method}: (#{method_type} value) -> instance?
|
187
|
+
def self.find_all_by_#{method}: (#{method_type} value) -> Array[instance]
|
188
|
+
RBS
|
189
|
+
end
|
186
190
|
end.join("\n")
|
187
191
|
end
|
188
192
|
|
@@ -190,7 +194,7 @@ module RbsActiveHash
|
|
190
194
|
method_names = (klass.data || []).flat_map do |record|
|
191
195
|
record.symbolize_keys.keys
|
192
196
|
end
|
193
|
-
method_names.uniq.select { |k|
|
197
|
+
method_names.uniq.select { |k| valid_field_name?(k) }
|
194
198
|
end
|
195
199
|
|
196
200
|
def method_types
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
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: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
68
68
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
69
69
|
repo_dir: gems
|
70
70
|
- name: base64
|
@@ -80,7 +80,7 @@ gems:
|
|
80
80
|
source:
|
81
81
|
type: git
|
82
82
|
name: ruby/gem_rbs_collection
|
83
|
-
revision:
|
83
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
84
84
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
85
85
|
repo_dir: gems
|
86
86
|
- name: date
|
@@ -96,7 +96,7 @@ gems:
|
|
96
96
|
source:
|
97
97
|
type: git
|
98
98
|
name: ruby/gem_rbs_collection
|
99
|
-
revision:
|
99
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
100
100
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
101
101
|
repo_dir: gems
|
102
102
|
- name: json
|
@@ -124,7 +124,7 @@ gems:
|
|
124
124
|
source:
|
125
125
|
type: git
|
126
126
|
name: ruby/gem_rbs_collection
|
127
|
-
revision:
|
127
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
128
128
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
129
129
|
repo_dir: gems
|
130
130
|
- name: optparse
|
@@ -136,7 +136,7 @@ gems:
|
|
136
136
|
source:
|
137
137
|
type: git
|
138
138
|
name: ruby/gem_rbs_collection
|
139
|
-
revision:
|
139
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
140
140
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
141
141
|
repo_dir: gems
|
142
142
|
- name: pathname
|
@@ -148,7 +148,7 @@ gems:
|
|
148
148
|
source:
|
149
149
|
type: git
|
150
150
|
name: ruby/gem_rbs_collection
|
151
|
-
revision:
|
151
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
152
152
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
153
153
|
repo_dir: gems
|
154
154
|
- name: rails-dom-testing
|
@@ -156,7 +156,7 @@ gems:
|
|
156
156
|
source:
|
157
157
|
type: git
|
158
158
|
name: ruby/gem_rbs_collection
|
159
|
-
revision:
|
159
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
160
160
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
161
161
|
repo_dir: gems
|
162
162
|
- name: railties
|
@@ -164,7 +164,7 @@ gems:
|
|
164
164
|
source:
|
165
165
|
type: git
|
166
166
|
name: ruby/gem_rbs_collection
|
167
|
-
revision:
|
167
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
168
168
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
169
169
|
repo_dir: gems
|
170
170
|
- name: rainbow
|
@@ -172,7 +172,7 @@ gems:
|
|
172
172
|
source:
|
173
173
|
type: git
|
174
174
|
name: ruby/gem_rbs_collection
|
175
|
-
revision:
|
175
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
176
176
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
177
177
|
repo_dir: gems
|
178
178
|
- name: rbs
|
@@ -200,7 +200,7 @@ gems:
|
|
200
200
|
source:
|
201
201
|
type: git
|
202
202
|
name: ruby/gem_rbs_collection
|
203
|
-
revision:
|
203
|
+
revision: 8149bc3fc0f720d935dc0592dc8886e03052f65f
|
204
204
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
205
205
|
repo_dir: gems
|
206
206
|
- name: time
|
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.4.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-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_hash
|