rbs_discard 0.2.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf799cb56cfe433c75127cb1b808b8f36f97ec442f489df8849e77e732ff252f
4
- data.tar.gz: a2cf51f37804a9e661245142259d61eaacaa5beed2dbeb26f55e52ce38f686f9
3
+ metadata.gz: 8eecb798886b85123bd19b070bfa5cc82602fbcae6af4fdd0c492348845fa08b
4
+ data.tar.gz: 4a97b1a70c0ceae2485e9d9b0f9ea2127280d34d8103b884d39b91bd7e5a0186
5
5
  SHA512:
6
- metadata.gz: e16101f420de3625c4e8733329c8c954426da24646296d4c7ca5d19d7634b1656010059d973f12937bbcc08f7b660051f12f785db34107779f55cc6dff06bdbf
7
- data.tar.gz: f8acb01a7d6c008d4819a5f599c6c81559dc87270515705058a726ea7888237091a0d38440d72bd18ceaef099064ad91e04858e0527507cca24c161cba337c73
6
+ metadata.gz: b7c2feba99cd4b880553d8a442eba1e2219da28a0438fa5ea0caae45d90b038083e7c9288b78f5c70bc0d2b90a521d4a6a92ef8bbf9618898977ab2a206e023b
7
+ data.tar.gz: fbcba3d7007782d14d648e30cdf64b0aab4a73a91d60cab08ff78dc76765a80422f93b90f5100bee0dd4ab3ea5642a7093fb5ca7425aa1276461707437982db6
@@ -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" # load RbsDraper lazily
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbsDiscard
4
- VERSION = "0.2.2"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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.0'
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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,7 +82,15 @@ gems:
92
82
  source:
93
83
  type: git
94
84
  name: ruby/gem_rbs_collection
95
- revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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
@@ -112,7 +110,7 @@ gems:
112
110
  source:
113
111
  type: git
114
112
  name: ruby/gem_rbs_collection
115
- revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
113
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
121
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
173
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
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
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
201
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
209
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
188
210
  remote: https://github.com/ruby/gem_rbs_collection.git
189
211
  repo_dir: gems
190
- - name: railties
191
- version: '6.0'
212
+ - name: rainbow
213
+ version: '3.0'
192
214
  source:
193
215
  type: git
194
216
  name: ruby/gem_rbs_collection
195
- revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
217
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
196
218
  remote: https://github.com/ruby/gem_rbs_collection.git
197
219
  repo_dir: gems
198
- - name: rainbow
199
- version: '3.0'
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'
200
246
  source:
201
247
  type: git
202
248
  name: ruby/gem_rbs_collection
203
- revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
249
+ revision: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
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: a6ed3d2c66aa743a4f6f71b70e0c7e912b94d054
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.2.2
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: 2023-09-06 00:00:00.000000000 Z
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.10
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
data/sig/shims/thor.rbs DELETED
@@ -1,5 +0,0 @@
1
- class Thor
2
- module Actions
3
- def create_file: (String destination, *String? args, ?config: bool) ?{ () -> void } -> untyped
4
- end
5
- end