miscellany 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miscellany/active_record/arbitrary_prefetch.rb +40 -17
- data/lib/miscellany/active_record/computed_columns.rb +107 -0
- data/lib/miscellany/controller/sliced_response.rb +13 -3
- data/lib/miscellany/param_validator.rb +133 -86
- data/lib/miscellany/version.rb +1 -1
- data/lib/miscellany.rb +12 -0
- data/miscellany.gemspec +8 -17
- data/spec/db/database.yml +3 -0
- data/spec/miscellany/arbitrary_prefetch_spec.rb +69 -0
- data/spec/miscellany/computed_columns_spec.rb +62 -0
- data/spec/miscellany/param_validator_spec.rb +295 -0
- data/spec/spec_helper.rb +42 -0
- metadata +37 -176
- data/config/initializers/01_custom_preloaders.rb +0 -2
- data/config/initializers/arbitrary_prefetch.rb +0 -1
metadata
CHANGED
@@ -1,157 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miscellany
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan Knapp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.15'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.15'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec-rails
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pg
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: factory
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: factory_bot
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: timecop
|
14
|
+
name: rails
|
113
15
|
requirement: !ruby/object:Gem::Requirement
|
114
16
|
requirements:
|
115
17
|
- - ">="
|
116
18
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
118
|
-
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: webmock
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
19
|
+
version: '5'
|
20
|
+
- - "<"
|
130
21
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
132
|
-
type: :
|
22
|
+
version: '6.3'
|
23
|
+
type: :runtime
|
133
24
|
prerelease: false
|
134
25
|
version_requirements: !ruby/object:Gem::Requirement
|
135
26
|
requirements:
|
136
27
|
- - ">="
|
137
28
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
139
|
-
-
|
140
|
-
name: sinatra
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
29
|
+
version: '5'
|
30
|
+
- - "<"
|
151
31
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
32
|
+
version: '6.3'
|
153
33
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
34
|
+
name: rake
|
155
35
|
requirement: !ruby/object:Gem::Requirement
|
156
36
|
requirements:
|
157
37
|
- - ">="
|
@@ -165,49 +45,49 @@ dependencies:
|
|
165
45
|
- !ruby/object:Gem::Version
|
166
46
|
version: '0'
|
167
47
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
48
|
+
name: database_cleaner
|
169
49
|
requirement: !ruby/object:Gem::Requirement
|
170
50
|
requirements:
|
171
51
|
- - ">="
|
172
52
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
53
|
+
version: '1.2'
|
174
54
|
type: :development
|
175
55
|
prerelease: false
|
176
56
|
version_requirements: !ruby/object:Gem::Requirement
|
177
57
|
requirements:
|
178
58
|
- - ">="
|
179
59
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
60
|
+
version: '1.2'
|
181
61
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
62
|
+
name: rspec
|
183
63
|
requirement: !ruby/object:Gem::Requirement
|
184
64
|
requirements:
|
185
|
-
- - "
|
65
|
+
- - "~>"
|
186
66
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
67
|
+
version: '3'
|
188
68
|
type: :development
|
189
69
|
prerelease: false
|
190
70
|
version_requirements: !ruby/object:Gem::Requirement
|
191
71
|
requirements:
|
192
|
-
- - "
|
72
|
+
- - "~>"
|
193
73
|
- !ruby/object:Gem::Version
|
194
|
-
version: '
|
74
|
+
version: '3'
|
195
75
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
76
|
+
name: sqlite3
|
197
77
|
requirement: !ruby/object:Gem::Requirement
|
198
78
|
requirements:
|
199
|
-
- - "
|
79
|
+
- - "~>"
|
200
80
|
- !ruby/object:Gem::Version
|
201
|
-
version: '
|
81
|
+
version: '1.3'
|
202
82
|
type: :development
|
203
83
|
prerelease: false
|
204
84
|
version_requirements: !ruby/object:Gem::Requirement
|
205
85
|
requirements:
|
206
|
-
- - "
|
86
|
+
- - "~>"
|
207
87
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
88
|
+
version: '1.3'
|
209
89
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
90
|
+
name: with_model
|
211
91
|
requirement: !ruby/object:Gem::Requirement
|
212
92
|
requirements:
|
213
93
|
- - ">="
|
@@ -220,34 +100,6 @@ dependencies:
|
|
220
100
|
- - ">="
|
221
101
|
- !ruby/object:Gem::Version
|
222
102
|
version: '0'
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: rails
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - ">="
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '5'
|
230
|
-
type: :runtime
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: '5'
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: activerecord-import
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - ">="
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '0'
|
244
|
-
type: :runtime
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - ">="
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: '0'
|
251
103
|
description:
|
252
104
|
email:
|
253
105
|
- eknapp@instructure.com
|
@@ -256,13 +108,12 @@ extensions: []
|
|
256
108
|
extra_rdoc_files: []
|
257
109
|
files:
|
258
110
|
- README.md
|
259
|
-
- config/initializers/01_custom_preloaders.rb
|
260
|
-
- config/initializers/arbitrary_prefetch.rb
|
261
111
|
- config/initializers/cancancan.rb
|
262
112
|
- lib/miscellany.rb
|
263
113
|
- lib/miscellany/active_record/arbitrary_prefetch.rb
|
264
114
|
- lib/miscellany/active_record/batch_matcher.rb
|
265
115
|
- lib/miscellany/active_record/batched_destruction.rb
|
116
|
+
- lib/miscellany/active_record/computed_columns.rb
|
266
117
|
- lib/miscellany/active_record/custom_preloaders.rb
|
267
118
|
- lib/miscellany/batch_processor.rb
|
268
119
|
- lib/miscellany/batching_csv_processor.rb
|
@@ -272,6 +123,11 @@ files:
|
|
272
123
|
- lib/miscellany/param_validator.rb
|
273
124
|
- lib/miscellany/version.rb
|
274
125
|
- miscellany.gemspec
|
126
|
+
- spec/db/database.yml
|
127
|
+
- spec/miscellany/arbitrary_prefetch_spec.rb
|
128
|
+
- spec/miscellany/computed_columns_spec.rb
|
129
|
+
- spec/miscellany/param_validator_spec.rb
|
130
|
+
- spec/spec_helper.rb
|
275
131
|
homepage: https://instructure.com
|
276
132
|
licenses: []
|
277
133
|
metadata: {}
|
@@ -294,4 +150,9 @@ rubygems_version: 3.0.3
|
|
294
150
|
signing_key:
|
295
151
|
specification_version: 4
|
296
152
|
summary: Gem for a bunch of random, re-usable Rails Concerns & Helpers
|
297
|
-
test_files:
|
153
|
+
test_files:
|
154
|
+
- spec/db/database.yml
|
155
|
+
- spec/miscellany/arbitrary_prefetch_spec.rb
|
156
|
+
- spec/miscellany/param_validator_spec.rb
|
157
|
+
- spec/miscellany/computed_columns_spec.rb
|
158
|
+
- spec/spec_helper.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
Miscellany::ArbitraryPrefetch.install
|