rbs_discard 0.2.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbs_discard/discard.rb +2 -0
- data/lib/rbs_discard/rake_task.rb +1 -1
- data/lib/rbs_discard/sig/discard.rbs +11 -1
- data/lib/rbs_discard/version.rb +1 -1
- data/rbs_collection.lock.yaml +95 -37
- metadata +3 -5
- data/sig/shims/rake.rbs +0 -18
- data/sig/shims/thor.rbs +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75316e2c4c4f29769f684e16e00956fa7f218b17869930ce476e68a1e0de5e33
|
4
|
+
data.tar.gz: 73a550a0985bde4caebd2caacdc7cce222c92603401b23d5cd4ece69cb3574b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b5ab26259cbb4ec81f6fe91f71c2311be19efe947131a66ef8a6cd0f0c877a3196291fe79e8f644aea604327abe1a905c6799f1e16db0531a4f5db369985547
|
7
|
+
data.tar.gz: a2f65901d90a946588604b46aa8177e011d2e93d9a9faf7a58f1470c47db594eb3012c4c31a7afb1303820c2821530c6dceddc23c77918ab64f885a56e96e2cd
|
data/lib/rbs_discard/discard.rb
CHANGED
@@ -39,6 +39,8 @@ module RbsDiscard
|
|
39
39
|
extend Discard::Model::ClassMethods
|
40
40
|
|
41
41
|
def self.kept: () -> #{klass_name}::ActiveRecord_Relation
|
42
|
+
def self.undiscarded: () -> #{klass_name}::ActiveRecord_Relation
|
43
|
+
def self.discarded: () -> #{klass_name}::ActiveRecord_Relation
|
42
44
|
def self.with_discarded: () -> #{klass_name}::ActiveRecord_Relation
|
43
45
|
#{footer}
|
44
46
|
RBS
|
@@ -41,7 +41,7 @@ module RbsDiscard
|
|
41
41
|
def define_generate_task
|
42
42
|
desc "Generate RBS files for discardable models"
|
43
43
|
task "#{name}:generate" do
|
44
|
-
require "rbs_discard"
|
44
|
+
require "rbs_discard" # load RbsDraper lazily
|
45
45
|
|
46
46
|
Rails.application.eager_load!
|
47
47
|
|
@@ -3,6 +3,9 @@ module Discard
|
|
3
3
|
module ClassMethods
|
4
4
|
type callback = Symbol | ^() [self: instance] -> void
|
5
5
|
|
6
|
+
def discard_column: () -> Symbol
|
7
|
+
def discard_column=: (Symbol) -> Symbol
|
8
|
+
|
6
9
|
def before_discard: (*callback) ? { () [self: instance] -> void } -> void
|
7
10
|
def after_discard: (*callback) ? { () [self: instance] -> void } -> void
|
8
11
|
def discard_all: () -> void
|
@@ -13,6 +16,8 @@ module Discard
|
|
13
16
|
|
14
17
|
module Relation
|
15
18
|
def kept: () -> self
|
19
|
+
def undiscarded: () -> self
|
20
|
+
def discarded: () -> self
|
16
21
|
def with_discarded: () -> self
|
17
22
|
def discard_all: () -> void
|
18
23
|
def discard_all!: () -> void
|
@@ -20,10 +25,15 @@ module Discard
|
|
20
25
|
def undiscard_all!: () -> void
|
21
26
|
end
|
22
27
|
|
28
|
+
def discard_column: () -> Symbol
|
29
|
+
def discard_column=: (Symbol) -> Symbol
|
30
|
+
|
23
31
|
def discard: () -> bool
|
24
32
|
def discard!: () -> void
|
25
33
|
def discarded?: () -> bool
|
34
|
+
def undiscard: () -> bool
|
35
|
+
def undiscard!: () -> bool
|
26
36
|
def undiscarded?: () -> bool
|
27
|
-
|
37
|
+
alias kept? undiscarded?
|
28
38
|
end
|
29
39
|
end
|
data/lib/rbs_discard/version.rb
CHANGED
data/rbs_collection.lock.yaml
CHANGED
@@ -1,10 +1,4 @@
|
|
1
1
|
---
|
2
|
-
sources:
|
3
|
-
- type: git
|
4
|
-
name: ruby/gem_rbs_collection
|
5
|
-
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
6
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
7
|
-
repo_dir: gems
|
8
2
|
path: ".gem_rbs_collection"
|
9
3
|
gems:
|
10
4
|
- name: actionmailer
|
@@ -12,7 +6,7 @@ gems:
|
|
12
6
|
source:
|
13
7
|
type: git
|
14
8
|
name: ruby/gem_rbs_collection
|
15
|
-
revision:
|
9
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
16
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
17
11
|
repo_dir: gems
|
18
12
|
- name: actionpack
|
@@ -20,7 +14,7 @@ gems:
|
|
20
14
|
source:
|
21
15
|
type: git
|
22
16
|
name: ruby/gem_rbs_collection
|
23
|
-
revision:
|
17
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
24
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
25
19
|
repo_dir: gems
|
26
20
|
- name: actionview
|
@@ -28,7 +22,7 @@ gems:
|
|
28
22
|
source:
|
29
23
|
type: git
|
30
24
|
name: ruby/gem_rbs_collection
|
31
|
-
revision:
|
25
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
32
26
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
33
27
|
repo_dir: gems
|
34
28
|
- name: activejob
|
@@ -36,7 +30,7 @@ gems:
|
|
36
30
|
source:
|
37
31
|
type: git
|
38
32
|
name: ruby/gem_rbs_collection
|
39
|
-
revision:
|
33
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
40
34
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
41
35
|
repo_dir: gems
|
42
36
|
- name: activemodel
|
@@ -44,23 +38,15 @@ gems:
|
|
44
38
|
source:
|
45
39
|
type: git
|
46
40
|
name: ruby/gem_rbs_collection
|
47
|
-
revision:
|
41
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
48
42
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
49
43
|
repo_dir: gems
|
50
44
|
- name: activerecord
|
51
|
-
version: '7.
|
52
|
-
source:
|
53
|
-
type: git
|
54
|
-
name: ruby/gem_rbs_collection
|
55
|
-
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
56
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
57
|
-
repo_dir: gems
|
58
|
-
- name: activestorage
|
59
|
-
version: '6.1'
|
45
|
+
version: '7.1'
|
60
46
|
source:
|
61
47
|
type: git
|
62
48
|
name: ruby/gem_rbs_collection
|
63
|
-
revision:
|
49
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
64
50
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
65
51
|
repo_dir: gems
|
66
52
|
- name: activesupport
|
@@ -68,7 +54,7 @@ gems:
|
|
68
54
|
source:
|
69
55
|
type: git
|
70
56
|
name: ruby/gem_rbs_collection
|
71
|
-
revision:
|
57
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
72
58
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
73
59
|
repo_dir: gems
|
74
60
|
- name: ast
|
@@ -76,13 +62,17 @@ gems:
|
|
76
62
|
source:
|
77
63
|
type: git
|
78
64
|
name: ruby/gem_rbs_collection
|
79
|
-
revision:
|
65
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
80
66
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
81
67
|
repo_dir: gems
|
82
68
|
- name: base64
|
83
69
|
version: '0'
|
84
70
|
source:
|
85
71
|
type: stdlib
|
72
|
+
- name: bigdecimal
|
73
|
+
version: '0'
|
74
|
+
source:
|
75
|
+
type: stdlib
|
86
76
|
- name: cgi
|
87
77
|
version: '0'
|
88
78
|
source:
|
@@ -92,7 +82,15 @@ gems:
|
|
92
82
|
source:
|
93
83
|
type: git
|
94
84
|
name: ruby/gem_rbs_collection
|
95
|
-
revision:
|
85
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
86
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
87
|
+
repo_dir: gems
|
88
|
+
- name: connection_pool
|
89
|
+
version: '2.4'
|
90
|
+
source:
|
91
|
+
type: git
|
92
|
+
name: ruby/gem_rbs_collection
|
93
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
96
94
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
97
95
|
repo_dir: gems
|
98
96
|
- name: date
|
@@ -112,7 +110,7 @@ gems:
|
|
112
110
|
source:
|
113
111
|
type: git
|
114
112
|
name: ruby/gem_rbs_collection
|
115
|
-
revision:
|
113
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
116
114
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
117
115
|
repo_dir: gems
|
118
116
|
- name: i18n
|
@@ -120,7 +118,7 @@ gems:
|
|
120
118
|
source:
|
121
119
|
type: git
|
122
120
|
name: ruby/gem_rbs_collection
|
123
|
-
revision:
|
121
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
124
122
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
125
123
|
repo_dir: gems
|
126
124
|
- name: json
|
@@ -136,7 +134,15 @@ gems:
|
|
136
134
|
source:
|
137
135
|
type: git
|
138
136
|
name: ruby/gem_rbs_collection
|
139
|
-
revision:
|
137
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
138
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
139
|
+
repo_dir: gems
|
140
|
+
- name: mini_mime
|
141
|
+
version: '0.1'
|
142
|
+
source:
|
143
|
+
type: git
|
144
|
+
name: ruby/gem_rbs_collection
|
145
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
140
146
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
141
147
|
repo_dir: gems
|
142
148
|
- name: minitest
|
@@ -151,12 +157,20 @@ gems:
|
|
151
157
|
version: '0'
|
152
158
|
source:
|
153
159
|
type: stdlib
|
160
|
+
- name: net-protocol
|
161
|
+
version: '0'
|
162
|
+
source:
|
163
|
+
type: stdlib
|
164
|
+
- name: net-smtp
|
165
|
+
version: '0'
|
166
|
+
source:
|
167
|
+
type: stdlib
|
154
168
|
- name: nokogiri
|
155
169
|
version: '1.11'
|
156
170
|
source:
|
157
171
|
type: git
|
158
172
|
name: ruby/gem_rbs_collection
|
159
|
-
revision:
|
173
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
160
174
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
161
175
|
repo_dir: gems
|
162
176
|
- name: parallel
|
@@ -164,7 +178,15 @@ gems:
|
|
164
178
|
source:
|
165
179
|
type: git
|
166
180
|
name: ruby/gem_rbs_collection
|
167
|
-
revision:
|
181
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
182
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
183
|
+
repo_dir: gems
|
184
|
+
- name: parser
|
185
|
+
version: '3.2'
|
186
|
+
source:
|
187
|
+
type: git
|
188
|
+
name: ruby/gem_rbs_collection
|
189
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
168
190
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
169
191
|
repo_dir: gems
|
170
192
|
- name: pathname
|
@@ -176,7 +198,7 @@ gems:
|
|
176
198
|
source:
|
177
199
|
type: git
|
178
200
|
name: ruby/gem_rbs_collection
|
179
|
-
revision:
|
201
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
180
202
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
181
203
|
repo_dir: gems
|
182
204
|
- name: rails-dom-testing
|
@@ -184,23 +206,47 @@ gems:
|
|
184
206
|
source:
|
185
207
|
type: git
|
186
208
|
name: ruby/gem_rbs_collection
|
187
|
-
revision:
|
209
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
188
210
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
189
211
|
repo_dir: gems
|
190
|
-
- name:
|
191
|
-
version: '
|
212
|
+
- name: rainbow
|
213
|
+
version: '3.0'
|
192
214
|
source:
|
193
215
|
type: git
|
194
216
|
name: ruby/gem_rbs_collection
|
195
|
-
revision:
|
217
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
196
218
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
197
219
|
repo_dir: gems
|
198
|
-
- name:
|
199
|
-
version: '
|
220
|
+
- name: rake
|
221
|
+
version: '13.0'
|
222
|
+
source:
|
223
|
+
type: git
|
224
|
+
name: ruby/gem_rbs_collection
|
225
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
226
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
227
|
+
repo_dir: gems
|
228
|
+
- name: regexp_parser
|
229
|
+
version: '2.8'
|
230
|
+
source:
|
231
|
+
type: git
|
232
|
+
name: ruby/gem_rbs_collection
|
233
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
234
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
235
|
+
repo_dir: gems
|
236
|
+
- name: rubocop
|
237
|
+
version: '1.57'
|
238
|
+
source:
|
239
|
+
type: git
|
240
|
+
name: ruby/gem_rbs_collection
|
241
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
242
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
243
|
+
repo_dir: gems
|
244
|
+
- name: rubocop-ast
|
245
|
+
version: '1.30'
|
200
246
|
source:
|
201
247
|
type: git
|
202
248
|
name: ruby/gem_rbs_collection
|
203
|
-
revision:
|
249
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
204
250
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
205
251
|
repo_dir: gems
|
206
252
|
- name: securerandom
|
@@ -211,6 +257,10 @@ gems:
|
|
211
257
|
version: '0'
|
212
258
|
source:
|
213
259
|
type: stdlib
|
260
|
+
- name: strscan
|
261
|
+
version: '0'
|
262
|
+
source:
|
263
|
+
type: stdlib
|
214
264
|
- name: tempfile
|
215
265
|
version: '0'
|
216
266
|
source:
|
@@ -227,6 +277,14 @@ gems:
|
|
227
277
|
version: '0'
|
228
278
|
source:
|
229
279
|
type: stdlib
|
280
|
+
- name: tzinfo
|
281
|
+
version: '2.0'
|
282
|
+
source:
|
283
|
+
type: git
|
284
|
+
name: ruby/gem_rbs_collection
|
285
|
+
revision: f7684eec487bf3ff01e91f4579c0e8ce53fc2431
|
286
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
287
|
+
repo_dir: gems
|
230
288
|
- name: uri
|
231
289
|
version: '0'
|
232
290
|
source:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_discard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.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:
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: discard
|
@@ -67,8 +67,6 @@ files:
|
|
67
67
|
- sig/rbs_discard/discard.rbs
|
68
68
|
- sig/rbs_discard/rake_task.rbs
|
69
69
|
- sig/shims/discard.rbs
|
70
|
-
- sig/shims/rake.rbs
|
71
|
-
- sig/shims/thor.rbs
|
72
70
|
homepage: https://github.com/tk0miya/rbs_discard
|
73
71
|
licenses:
|
74
72
|
- MIT
|
@@ -91,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
89
|
- !ruby/object:Gem::Version
|
92
90
|
version: '0'
|
93
91
|
requirements: []
|
94
|
-
rubygems_version: 3.4.
|
92
|
+
rubygems_version: 3.4.19
|
95
93
|
signing_key:
|
96
94
|
specification_version: 4
|
97
95
|
summary: A RBS files generator for discard gem
|
data/sig/shims/rake.rbs
DELETED
@@ -1,18 +0,0 @@
|
|
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
|