rbs_discard 0.2.1 → 1.0.0
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 +2 -2
- data/lib/rbs_discard/sig/discard.rbs +8 -0
- data/lib/rbs_discard/version.rb +1 -1
- data/rbs_collection.lock.yaml +99 -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: 8eecb798886b85123bd19b070bfa5cc82602fbcae6af4fdd0c492348845fa08b
|
4
|
+
data.tar.gz: 4a97b1a70c0ceae2485e9d9b0f9ea2127280d34d8103b884d39b91bd7e5a0186
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7c2feba99cd4b880553d8a442eba1e2219da28a0438fa5ea0caae45d90b038083e7c9288b78f5c70bc0d2b90a521d4a6a92ef8bbf9618898977ab2a206e023b
|
7
|
+
data.tar.gz: fbcba3d7007782d14d648e30cdf64b0aab4a73a91d60cab08ff78dc76765a80422f93b90f5100bee0dd4ab3ea5642a7093fb5ca7425aa1276461707437982db6
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "active_support"
|
4
4
|
require "pathname"
|
5
5
|
require "rake/tasklib"
|
6
6
|
|
@@ -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,6 +25,9 @@ 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
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: 306d1aec19defeb177e217d8aad9812a52bcd5eb
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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,13 +82,25 @@ gems:
|
|
92
82
|
source:
|
93
83
|
type: git
|
94
84
|
name: ruby/gem_rbs_collection
|
95
|
-
revision:
|
85
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
96
94
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
97
95
|
repo_dir: gems
|
98
96
|
- name: date
|
99
97
|
version: '0'
|
100
98
|
source:
|
101
99
|
type: stdlib
|
100
|
+
- name: erb
|
101
|
+
version: '0'
|
102
|
+
source:
|
103
|
+
type: stdlib
|
102
104
|
- name: fileutils
|
103
105
|
version: '0'
|
104
106
|
source:
|
@@ -108,7 +110,7 @@ gems:
|
|
108
110
|
source:
|
109
111
|
type: git
|
110
112
|
name: ruby/gem_rbs_collection
|
111
|
-
revision:
|
113
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
112
114
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
113
115
|
repo_dir: gems
|
114
116
|
- name: i18n
|
@@ -116,7 +118,7 @@ gems:
|
|
116
118
|
source:
|
117
119
|
type: git
|
118
120
|
name: ruby/gem_rbs_collection
|
119
|
-
revision:
|
121
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
120
122
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
121
123
|
repo_dir: gems
|
122
124
|
- name: json
|
@@ -132,7 +134,15 @@ gems:
|
|
132
134
|
source:
|
133
135
|
type: git
|
134
136
|
name: ruby/gem_rbs_collection
|
135
|
-
revision:
|
137
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
136
146
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
137
147
|
repo_dir: gems
|
138
148
|
- name: minitest
|
@@ -147,12 +157,20 @@ gems:
|
|
147
157
|
version: '0'
|
148
158
|
source:
|
149
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
|
150
168
|
- name: nokogiri
|
151
169
|
version: '1.11'
|
152
170
|
source:
|
153
171
|
type: git
|
154
172
|
name: ruby/gem_rbs_collection
|
155
|
-
revision:
|
173
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
156
174
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
157
175
|
repo_dir: gems
|
158
176
|
- name: parallel
|
@@ -160,7 +178,15 @@ gems:
|
|
160
178
|
source:
|
161
179
|
type: git
|
162
180
|
name: ruby/gem_rbs_collection
|
163
|
-
revision:
|
181
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
164
190
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
165
191
|
repo_dir: gems
|
166
192
|
- name: pathname
|
@@ -172,7 +198,7 @@ gems:
|
|
172
198
|
source:
|
173
199
|
type: git
|
174
200
|
name: ruby/gem_rbs_collection
|
175
|
-
revision:
|
201
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
176
202
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
177
203
|
repo_dir: gems
|
178
204
|
- name: rails-dom-testing
|
@@ -180,23 +206,47 @@ gems:
|
|
180
206
|
source:
|
181
207
|
type: git
|
182
208
|
name: ruby/gem_rbs_collection
|
183
|
-
revision:
|
209
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
184
210
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
185
211
|
repo_dir: gems
|
186
|
-
- name:
|
187
|
-
version: '
|
212
|
+
- name: rainbow
|
213
|
+
version: '3.0'
|
188
214
|
source:
|
189
215
|
type: git
|
190
216
|
name: ruby/gem_rbs_collection
|
191
|
-
revision:
|
217
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
192
218
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
193
219
|
repo_dir: gems
|
194
|
-
- name:
|
195
|
-
version: '
|
220
|
+
- name: rake
|
221
|
+
version: '13.0'
|
222
|
+
source:
|
223
|
+
type: git
|
224
|
+
name: ruby/gem_rbs_collection
|
225
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
242
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
243
|
+
repo_dir: gems
|
244
|
+
- name: rubocop-ast
|
245
|
+
version: '1.30'
|
196
246
|
source:
|
197
247
|
type: git
|
198
248
|
name: ruby/gem_rbs_collection
|
199
|
-
revision:
|
249
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
200
250
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
201
251
|
repo_dir: gems
|
202
252
|
- name: securerandom
|
@@ -207,6 +257,10 @@ gems:
|
|
207
257
|
version: '0'
|
208
258
|
source:
|
209
259
|
type: stdlib
|
260
|
+
- name: strscan
|
261
|
+
version: '0'
|
262
|
+
source:
|
263
|
+
type: stdlib
|
210
264
|
- name: tempfile
|
211
265
|
version: '0'
|
212
266
|
source:
|
@@ -223,6 +277,14 @@ gems:
|
|
223
277
|
version: '0'
|
224
278
|
source:
|
225
279
|
type: stdlib
|
280
|
+
- name: tzinfo
|
281
|
+
version: '2.0'
|
282
|
+
source:
|
283
|
+
type: git
|
284
|
+
name: ruby/gem_rbs_collection
|
285
|
+
revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
|
286
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
287
|
+
repo_dir: gems
|
226
288
|
- name: uri
|
227
289
|
version: '0'
|
228
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.0
|
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-04 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
|