thermos 0.5.2 → 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/Rakefile +4 -0
- data/lib/thermos/beverage.rb +37 -24
- data/lib/thermos/notifier.rb +1 -3
- data/lib/thermos/refill_job.rb +12 -4
- data/lib/thermos/version.rb +1 -1
- data/lib/thermos.rb +48 -13
- data/test/dependencies_test.rb +307 -0
- data/test/dummy/app/models/category.rb +4 -6
- data/test/dummy/config/application.rb +2 -5
- data/test/dummy/config/boot.rb +3 -3
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +4 -4
- data/test/dummy/config/environments/production.rb +6 -5
- data/test/dummy/config/environments/test.rb +3 -3
- data/test/dummy/config/initializers/assets.rb +1 -1
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/dummy/config/routes.rb +0 -9
- data/test/dummy/db/schema.rb +9 -11
- data/test/filter_test.rb +52 -0
- data/test/queue_test.rb +36 -0
- data/test/test_helper.rb +15 -5
- data/test/thermos_test.rb +18 -368
- metadata +74 -40
data/test/thermos_test.rb
CHANGED
@@ -1,20 +1,13 @@
|
|
1
|
-
require
|
1
|
+
require "test_helper"
|
2
2
|
|
3
3
|
class ThermosTest < ActiveSupport::TestCase
|
4
|
-
ActiveSupport.test_order = :random
|
5
4
|
self.use_transactional_tests = true
|
6
|
-
|
7
|
-
def teardown
|
8
|
-
Thermos::BeverageStorage.instance.empty
|
9
|
-
Rails.cache.clear
|
10
|
-
end
|
5
|
+
teardown :clear_cache
|
11
6
|
|
12
7
|
test "keeps the cache warm using fill / drink" do
|
13
8
|
mock = Minitest::Mock.new
|
14
9
|
|
15
|
-
Thermos.fill(key: "key", model: Category)
|
16
|
-
mock.call(id)
|
17
|
-
end
|
10
|
+
Thermos.fill(key: "key", model: Category) { |id| mock.call(id) }
|
18
11
|
|
19
12
|
mock.expect(:call, 1, [1])
|
20
13
|
assert_equal 1, Thermos.drink(key: "key", id: 1)
|
@@ -29,28 +22,28 @@ class ThermosTest < ActiveSupport::TestCase
|
|
29
22
|
mock = Minitest::Mock.new
|
30
23
|
|
31
24
|
mock.expect(:call, 1, [1])
|
32
|
-
response =
|
33
|
-
|
34
|
-
|
25
|
+
response =
|
26
|
+
Thermos.keep_warm(key: "key", model: Category, id: 1) do |id|
|
27
|
+
mock.call(id)
|
28
|
+
end
|
35
29
|
assert_equal 1, response
|
36
30
|
mock.verify
|
37
31
|
|
38
32
|
mock.expect(:call, 2, [1])
|
39
|
-
response =
|
40
|
-
|
41
|
-
|
33
|
+
response =
|
34
|
+
Thermos.keep_warm(key: "key", model: Category, id: 1) do |id|
|
35
|
+
mock.call(id)
|
36
|
+
end
|
42
37
|
assert_equal 1, response
|
43
38
|
assert_raises(MockExpectationError) { mock.verify }
|
44
39
|
end
|
45
40
|
|
46
|
-
# primary model changes
|
41
|
+
# primary model changes
|
47
42
|
test "rebuilds the cache on primary model change" do
|
48
43
|
mock = Minitest::Mock.new
|
49
44
|
category = categories(:baseball)
|
50
45
|
|
51
|
-
Thermos.fill(key: "key", model: Category)
|
52
|
-
mock.call(id)
|
53
|
-
end
|
46
|
+
Thermos.fill(key: "key", model: Category) { |id| mock.call(id) }
|
54
47
|
|
55
48
|
mock.expect(:call, 1, [category.id])
|
56
49
|
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
@@ -69,9 +62,7 @@ class ThermosTest < ActiveSupport::TestCase
|
|
69
62
|
mock = Minitest::Mock.new
|
70
63
|
category = categories(:baseball)
|
71
64
|
|
72
|
-
Thermos.fill(key: "key", model: Category)
|
73
|
-
mock.call(id)
|
74
|
-
end
|
65
|
+
Thermos.fill(key: "key", model: Category) { |id| mock.call(id) }
|
75
66
|
|
76
67
|
mock.expect(:call, 1, [category.id])
|
77
68
|
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
@@ -94,9 +85,7 @@ class ThermosTest < ActiveSupport::TestCase
|
|
94
85
|
category = categories(:baseball)
|
95
86
|
other_category = Category.create!(name: "bar")
|
96
87
|
|
97
|
-
Thermos.fill(key: "key", model: Category)
|
98
|
-
mock.call(id)
|
99
|
-
end
|
88
|
+
Thermos.fill(key: "key", model: Category) { |id| mock.call(id) }
|
100
89
|
|
101
90
|
mock.expect(:call, 2, [other_category.id])
|
102
91
|
assert_equal 2, Thermos.drink(key: "key", id: other_category.id)
|
@@ -115,9 +104,7 @@ class ThermosTest < ActiveSupport::TestCase
|
|
115
104
|
mock = Minitest::Mock.new
|
116
105
|
category = categories(:baseball)
|
117
106
|
|
118
|
-
Thermos.fill(key: "key", model: Category)
|
119
|
-
mock.call(id)
|
120
|
-
end
|
107
|
+
Thermos.fill(key: "key", model: Category) { |id| mock.call(id) }
|
121
108
|
|
122
109
|
mock.expect(:call, 1, [category.id])
|
123
110
|
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
@@ -143,345 +130,12 @@ class ThermosTest < ActiveSupport::TestCase
|
|
143
130
|
assert_equal 1, Thermos.drink(key: "key", id: "foo")
|
144
131
|
assert_raises(MockExpectationError) { mock.verify }
|
145
132
|
end
|
146
|
-
|
147
|
-
test "allows filtering for which records should be rebuilt" do
|
148
|
-
mock = Minitest::Mock.new
|
149
|
-
category = categories(:baseball)
|
150
|
-
filter = ->(model) { model.name.match("ball") }
|
151
|
-
Thermos.fill(key: "key", model: Category, lookup_key: "name", filter: filter) do |name|
|
152
|
-
mock.call(name)
|
153
|
-
end
|
154
|
-
|
155
|
-
mock.expect(:call, 1, ["basketball"])
|
156
|
-
category.update!(name: "basketball")
|
157
|
-
mock.verify
|
158
|
-
|
159
|
-
mock.expect(:call, 1, ["hockey"])
|
160
|
-
category.update!(name: "hockey")
|
161
|
-
assert_raises(MockExpectationError) { mock.verify }
|
162
|
-
end
|
163
|
-
|
164
|
-
test "allows filtering based on the beverage when multiple beverages are configured and only one of them has a filter" do
|
165
|
-
mock = Minitest::Mock.new
|
166
|
-
store = stores(:supermarket)
|
167
|
-
category = categories(:baseball)
|
168
|
-
# filter method specific to one model
|
169
|
-
# store.ball? doesn't exist
|
170
|
-
filter = ->(model) { model.ball? }
|
171
|
-
|
172
|
-
Thermos.fill(key: "key", model: Category, lookup_key: "name", filter: filter) do |name|
|
173
|
-
mock.call(name)
|
174
|
-
end
|
175
|
-
|
176
|
-
Thermos.fill(key: "key_2", model: Store, lookup_key: "name") do |name|
|
177
|
-
mock.call(name)
|
178
|
-
end
|
179
|
-
|
180
|
-
mock.expect(:call, 1, ["groceries"])
|
181
|
-
store.update!(name: "groceries")
|
182
|
-
assert_equal 1, Thermos.drink(key: "key_2", id: "groceries")
|
183
|
-
mock.verify
|
184
|
-
end
|
185
|
-
|
186
|
-
# has_many model changes
|
187
|
-
test "rebuilds the cache on has_many model change" do
|
188
|
-
mock = Minitest::Mock.new
|
189
|
-
category = categories(:baseball)
|
190
|
-
category_item = category_items(:baseball_glove)
|
191
|
-
|
192
|
-
Thermos.fill(key: "key", model: Category, deps: [:category_items]) do |id|
|
193
|
-
mock.call(id)
|
194
|
-
end
|
195
|
-
|
196
|
-
mock.expect(:call, 1, [category.id])
|
197
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
198
|
-
mock.verify
|
199
|
-
|
200
|
-
mock.expect(:call, 2, [category.id])
|
201
|
-
category_item.update!(name: "foo")
|
202
|
-
mock.verify
|
203
|
-
|
204
|
-
mock.expect(:call, 3, [category.id])
|
205
|
-
assert_equal 2, Thermos.drink(key: "key", id: category.id)
|
206
|
-
assert_raises(MockExpectationError) { mock.verify }
|
207
|
-
end
|
208
|
-
|
209
|
-
test "does not rebuild the cache for an unrelated has_many model change" do
|
210
|
-
mock = Minitest::Mock.new
|
211
|
-
category = categories(:baseball)
|
212
|
-
category_item = CategoryItem.create(category: nil)
|
213
|
-
|
214
|
-
Thermos.fill(key: "key", model: Category, deps: [:category_items]) do |id|
|
215
|
-
mock.call(id)
|
216
|
-
end
|
217
|
-
|
218
|
-
mock.expect(:call, 1, [category.id])
|
219
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
220
|
-
mock.verify
|
221
|
-
|
222
|
-
mock.expect(:call, 2, [category.id])
|
223
|
-
category_item.update!(name: "foo")
|
224
|
-
assert_raises(MockExpectationError) { mock.verify }
|
225
|
-
|
226
|
-
mock.expect(:call, 3, [category.id])
|
227
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
228
|
-
assert_raises(MockExpectationError) { mock.verify }
|
229
|
-
end
|
230
|
-
|
231
|
-
test "re-builds the cache for new has_many records" do
|
232
|
-
mock = Minitest::Mock.new
|
233
|
-
category = categories(:baseball)
|
234
|
-
|
235
|
-
Thermos.fill(key: "key", model: Category, deps: [:category_items]) do |id|
|
236
|
-
mock.call(id)
|
237
|
-
end
|
238
|
-
|
239
|
-
mock.expect(:call, 1, [category.id])
|
240
|
-
CategoryItem.create!(category: category)
|
241
|
-
mock.verify
|
242
|
-
|
243
|
-
mock.expect(:call, 2, [category.id])
|
244
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
245
|
-
assert_raises(MockExpectationError) { mock.verify }
|
246
|
-
end
|
247
|
-
|
248
|
-
test "re-builds the cache for has_many record changes when filter condition is met" do
|
249
|
-
mock = Minitest::Mock.new
|
250
|
-
category = categories(:baseball)
|
251
|
-
filter = ->(model) { model.ball? }
|
252
|
-
|
253
|
-
Thermos.fill(key: "key", model: Category, deps: [:category_items], filter: filter) do |id|
|
254
|
-
mock.call(id)
|
255
|
-
end
|
256
|
-
|
257
|
-
mock.expect(:call, 1, [category.id])
|
258
|
-
CategoryItem.create!(category: category)
|
259
|
-
mock.verify
|
260
|
-
|
261
|
-
category.update!(name: "hockey")
|
262
|
-
|
263
|
-
mock.expect(:call, 1, [category.id])
|
264
|
-
CategoryItem.create!(category: category)
|
265
|
-
assert_raises(MockExpectationError) { mock.verify }
|
266
|
-
end
|
267
|
-
|
268
|
-
# belongs_to model changes
|
269
|
-
test "rebuilds the cache on belongs_to model change" do
|
270
|
-
mock = Minitest::Mock.new
|
271
|
-
category = categories(:baseball)
|
272
|
-
store = stores(:sports)
|
273
|
-
|
274
|
-
Thermos.fill(key: "key", model: Category, deps: [:store]) do |id|
|
275
|
-
mock.call(id)
|
276
|
-
end
|
277
|
-
|
278
|
-
mock.expect(:call, 1, [category.id])
|
279
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
280
|
-
mock.verify
|
281
|
-
|
282
|
-
mock.expect(:call, 2, [category.id])
|
283
|
-
store.update!(name: "foo")
|
284
|
-
mock.verify
|
285
|
-
|
286
|
-
mock.expect(:call, 3, [category.id])
|
287
|
-
assert_equal 2, Thermos.drink(key: "key", id: category.id)
|
288
|
-
assert_raises(MockExpectationError) { mock.verify }
|
289
|
-
end
|
290
|
-
|
291
|
-
test "does not rebuild the cache for an unrelated belongs_to model change" do
|
292
|
-
mock = Minitest::Mock.new
|
293
|
-
category = categories(:baseball)
|
294
|
-
store = Store.create!
|
295
|
-
|
296
|
-
Thermos.fill(key: "key", model: Category, deps: [:store]) do |id|
|
297
|
-
mock.call(id)
|
298
|
-
end
|
299
|
-
|
300
|
-
mock.expect(:call, 1, [category.id])
|
301
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
302
|
-
mock.verify
|
303
|
-
|
304
|
-
mock.expect(:call, 2, [category.id])
|
305
|
-
store.update!(name: "foo")
|
306
|
-
assert_raises(MockExpectationError) { mock.verify }
|
307
|
-
|
308
|
-
mock.expect(:call, 3, [category.id])
|
309
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
310
|
-
assert_raises(MockExpectationError) { mock.verify }
|
311
|
-
end
|
312
|
-
|
313
|
-
test "re-builds the cache for new belongs_to records" do
|
314
|
-
mock = Minitest::Mock.new
|
315
|
-
category = categories(:baseball)
|
316
|
-
|
317
|
-
Thermos.fill(key: "key", model: Category, deps: [:store]) do |id|
|
318
|
-
mock.call(id)
|
319
|
-
end
|
320
|
-
|
321
|
-
mock.expect(:call, 1, [category.id])
|
322
|
-
mock.expect(:call, 1, [category.id])
|
323
|
-
Store.create!(name: "foo", categories: [category])
|
324
|
-
mock.verify
|
325
|
-
|
326
|
-
mock.expect(:call, 2, [category.id])
|
327
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
328
|
-
assert_raises(MockExpectationError) { mock.verify }
|
329
|
-
end
|
330
|
-
|
331
|
-
test "re-builds the cache for belongs_to record changes when filter condition is met" do
|
332
|
-
mock = Minitest::Mock.new
|
333
|
-
category = categories(:baseball)
|
334
|
-
filter = ->(model) { model.ball? }
|
335
|
-
|
336
|
-
Thermos.fill(key: "key", model: Category, deps: [:store], filter: filter) do |id|
|
337
|
-
mock.call(id)
|
338
|
-
end
|
339
|
-
|
340
|
-
mock.expect(:call, 1, [category.id])
|
341
|
-
mock.expect(:call, 1, [category.id])
|
342
|
-
Store.create!(name: "foo", categories: [category])
|
343
|
-
mock.verify
|
344
|
-
|
345
|
-
category.update!(name: "hockey")
|
346
|
-
|
347
|
-
mock.expect(:call, 2, [category.id])
|
348
|
-
Store.create!(name: "bar", categories: [category])
|
349
|
-
assert_raises(MockExpectationError) { mock.verify }
|
350
|
-
end
|
351
|
-
|
352
|
-
# has_many through model changes
|
353
|
-
test "rebuilds the cache on has_many through model change" do
|
354
|
-
mock = Minitest::Mock.new
|
355
|
-
category = categories(:baseball)
|
356
|
-
product = products(:glove)
|
357
|
-
|
358
|
-
Thermos.fill(key: "key", model: Category, deps: [:products]) do |id|
|
359
|
-
mock.call(id)
|
360
|
-
end
|
361
|
-
|
362
|
-
mock.expect(:call, 1, [category.id])
|
363
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
364
|
-
mock.verify
|
365
|
-
|
366
|
-
mock.expect(:call, 2, [category.id])
|
367
|
-
product.update!(name: "foo")
|
368
|
-
mock.verify
|
369
|
-
|
370
|
-
mock.expect(:call, 3, [category.id])
|
371
|
-
assert_equal 2, Thermos.drink(key: "key", id: category.id)
|
372
|
-
assert_raises(MockExpectationError) { mock.verify }
|
373
|
-
end
|
374
|
-
|
375
|
-
test "does not rebuild the cache for an unrelated has_many through model change" do
|
376
|
-
mock = Minitest::Mock.new
|
377
|
-
category = categories(:baseball)
|
378
|
-
product = Product.create!
|
379
|
-
|
380
|
-
Thermos.fill(key: "key", model: Category, deps: [:products]) do |id|
|
381
|
-
mock.call(id)
|
382
|
-
end
|
383
|
-
|
384
|
-
mock.expect(:call, 1, [category.id])
|
385
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
386
|
-
mock.verify
|
387
|
-
|
388
|
-
mock.expect(:call, 2, [category.id])
|
389
|
-
product.update!(name: "foo")
|
390
|
-
assert_raises(MockExpectationError) { mock.verify }
|
391
|
-
|
392
|
-
mock.expect(:call, 3, [category.id])
|
393
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
394
|
-
assert_raises(MockExpectationError) { mock.verify }
|
395
|
-
end
|
396
|
-
|
397
|
-
test "re-builds the cache for new has_many through records" do
|
398
|
-
mock = Minitest::Mock.new
|
399
|
-
category = categories(:baseball)
|
400
|
-
|
401
|
-
Thermos.fill(key: "key", model: Category, deps: [:products]) do |id|
|
402
|
-
mock.call(id)
|
403
|
-
end
|
404
|
-
|
405
|
-
mock.expect(:call, 1, [category.id])
|
406
|
-
Product.create!(categories: [category])
|
407
|
-
mock.verify
|
408
|
-
|
409
|
-
mock.expect(:call, 2, [category.id])
|
410
|
-
assert_equal 1, Thermos.drink(key: "key", id: category.id)
|
411
|
-
assert_raises(MockExpectationError) { mock.verify }
|
412
|
-
end
|
413
|
-
|
414
|
-
test "re-builds the cache for has_many through record changes when filter condition is met" do
|
415
|
-
mock = Minitest::Mock.new
|
416
|
-
category = categories(:baseball)
|
417
|
-
filter = ->(model) { model.ball? }
|
418
|
-
|
419
|
-
Thermos.fill(key: "key", model: Category, deps: [:products], filter: filter) do |id|
|
420
|
-
mock.call(id)
|
421
|
-
end
|
422
|
-
|
423
|
-
mock.expect(:call, 1, [category.id])
|
424
|
-
Product.create!(categories: [category])
|
425
|
-
mock.verify
|
426
|
-
|
427
|
-
category.update!(name: "hockey")
|
428
|
-
|
429
|
-
mock.expect(:call, 2, [category.id])
|
430
|
-
Product.create!(categories: [category])
|
431
|
-
assert_raises(MockExpectationError) { mock.verify }
|
432
|
-
end
|
433
|
-
|
434
|
-
test "handles indirect associations" do
|
435
|
-
mock = Minitest::Mock.new
|
436
|
-
category = categories(:baseball)
|
437
|
-
store = category.store
|
438
|
-
|
439
|
-
Thermos.fill(key: "key", model: Store, deps: [categories: [:products]]) do |id|
|
440
|
-
mock.call(id)
|
441
|
-
end
|
442
|
-
|
443
|
-
mock.expect(:call, 1, [store.id])
|
444
|
-
category.update!(name: "foo")
|
445
|
-
mock.verify
|
446
|
-
|
447
|
-
mock.expect(:call, 2, [store.id])
|
448
|
-
assert_equal 1, Thermos.drink(key: "key", id: store.id)
|
449
|
-
assert_raises(MockExpectationError) { mock.verify }
|
450
|
-
Product.create!(categories: [category])
|
451
|
-
mock.verify
|
452
|
-
|
453
|
-
mock.expect(:call, 3, [store.id])
|
454
|
-
assert_equal 2, Thermos.drink(key: "key", id: store.id)
|
455
|
-
assert_raises(MockExpectationError) { mock.verify }
|
456
|
-
end
|
457
|
-
|
458
|
-
test "only rebuilds cache for stated dependencies, even if another cache has an associated model of the primary" do
|
459
|
-
category_mock = Minitest::Mock.new
|
460
|
-
product_mock = Minitest::Mock.new
|
461
|
-
category = categories(:baseball)
|
462
|
-
product = products(:glove)
|
463
|
-
|
464
|
-
Thermos.fill(key: "category_key", model: Category) do |id|
|
465
|
-
category_mock.call(id)
|
466
|
-
end
|
467
|
-
|
468
|
-
Thermos.fill(key: "product_key", model: Product) do |id|
|
469
|
-
product_mock.call(id)
|
470
|
-
end
|
471
|
-
|
472
|
-
category_mock.expect(:call, 2, [category.id])
|
473
|
-
product_mock.expect(:call, 2, [product.id])
|
474
|
-
product.update!(name: "foo")
|
475
|
-
assert_raises(MockExpectationError) { category_mock.verify }
|
476
|
-
product_mock.verify
|
477
|
-
end
|
478
133
|
|
479
134
|
test "accepts and can rebuild off of an id other than the 'id'" do
|
480
135
|
mock = Minitest::Mock.new
|
481
136
|
category = categories(:baseball)
|
482
|
-
product = products(:glove)
|
483
137
|
|
484
|
-
Thermos.fill(key: "key", model: Category,
|
138
|
+
Thermos.fill(key: "key", model: Category, lookup_key: :name) do |id|
|
485
139
|
mock.call(id)
|
486
140
|
end
|
487
141
|
|
@@ -494,11 +148,7 @@ class ThermosTest < ActiveSupport::TestCase
|
|
494
148
|
mock.verify
|
495
149
|
|
496
150
|
mock.expect(:call, 3, [category.name])
|
497
|
-
|
498
|
-
mock.verify
|
499
|
-
|
500
|
-
mock.expect(:call, 4, [category.name])
|
501
|
-
assert_equal 3, Thermos.drink(key: "key", id: category.name)
|
151
|
+
assert_equal 2, Thermos.drink(key: "key", id: category.name)
|
502
152
|
assert_raises(MockExpectationError) { mock.verify }
|
503
153
|
end
|
504
154
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thermos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Thal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 7.1.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 6.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 7.1.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,6 +58,34 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: prettier
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: psych
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "<"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 4.0.0
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 4.0.0
|
61
89
|
description: |
|
62
90
|
Thermos is a library for caching in rails that re-warms caches
|
63
91
|
in the background based on model changes.
|
@@ -77,6 +105,7 @@ files:
|
|
77
105
|
- lib/thermos/rebuild_cache_job.rb
|
78
106
|
- lib/thermos/refill_job.rb
|
79
107
|
- lib/thermos/version.rb
|
108
|
+
- test/dependencies_test.rb
|
80
109
|
- test/dummy/README.rdoc
|
81
110
|
- test/dummy/Rakefile
|
82
111
|
- test/dummy/app/assets/config/manifest.js
|
@@ -121,10 +150,12 @@ files:
|
|
121
150
|
- test/dummy/public/422.html
|
122
151
|
- test/dummy/public/500.html
|
123
152
|
- test/dummy/public/favicon.ico
|
153
|
+
- test/filter_test.rb
|
124
154
|
- test/fixtures/categories.yml
|
125
155
|
- test/fixtures/category_items.yml
|
126
156
|
- test/fixtures/products.yml
|
127
157
|
- test/fixtures/stores.yml
|
158
|
+
- test/queue_test.rb
|
128
159
|
- test/test_helper.rb
|
129
160
|
- test/thermos_test.rb
|
130
161
|
homepage: https://github.com/athal7/thermos
|
@@ -139,68 +170,71 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
170
|
requirements:
|
140
171
|
- - ">="
|
141
172
|
- !ruby/object:Gem::Version
|
142
|
-
version: 2.
|
173
|
+
version: 2.7.0
|
143
174
|
- - "<"
|
144
175
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.
|
176
|
+
version: 3.2.0
|
146
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
178
|
requirements:
|
148
179
|
- - ">="
|
149
180
|
- !ruby/object:Gem::Version
|
150
181
|
version: '0'
|
151
182
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.1.6
|
153
184
|
signing_key:
|
154
185
|
specification_version: 4
|
155
186
|
summary: Always-warm, auto-rebuilding rails caching without timers or touching.
|
156
187
|
test_files:
|
157
|
-
- test/
|
188
|
+
- test/test_helper.rb
|
189
|
+
- test/dependencies_test.rb
|
190
|
+
- test/thermos_test.rb
|
191
|
+
- test/queue_test.rb
|
158
192
|
- test/fixtures/stores.yml
|
159
193
|
- test/fixtures/categories.yml
|
160
194
|
- test/fixtures/products.yml
|
161
|
-
- test/
|
162
|
-
- test/dummy/
|
163
|
-
- test/dummy/
|
164
|
-
- test/dummy/
|
165
|
-
- test/dummy/
|
166
|
-
- test/dummy/
|
167
|
-
- test/dummy/config/application.rb
|
168
|
-
- test/dummy/config/routes.rb
|
169
|
-
- test/dummy/config/environments/production.rb
|
170
|
-
- test/dummy/config/environments/test.rb
|
171
|
-
- test/dummy/config/environments/development.rb
|
195
|
+
- test/fixtures/category_items.yml
|
196
|
+
- test/dummy/db/schema.rb
|
197
|
+
- test/dummy/db/migrate/20160325214744_create_categories.rb
|
198
|
+
- test/dummy/db/migrate/20160326174530_create_stores.rb
|
199
|
+
- test/dummy/db/migrate/20160325214849_create_products.rb
|
200
|
+
- test/dummy/db/migrate/20160325220006_create_category_items.rb
|
172
201
|
- test/dummy/config/database.yml
|
173
202
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
174
203
|
- test/dummy/config/initializers/assets.rb
|
175
204
|
- test/dummy/config/initializers/wrap_parameters.rb
|
176
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
177
|
-
- test/dummy/config/initializers/session_store.rb
|
178
|
-
- test/dummy/config/initializers/inflections.rb
|
179
205
|
- test/dummy/config/initializers/mime_types.rb
|
206
|
+
- test/dummy/config/initializers/inflections.rb
|
207
|
+
- test/dummy/config/initializers/session_store.rb
|
208
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
180
209
|
- test/dummy/config/initializers/cookies_serializer.rb
|
181
|
-
- test/dummy/config/locales/en.yml
|
182
210
|
- test/dummy/config/environment.rb
|
183
|
-
- test/dummy/config/
|
211
|
+
- test/dummy/config/locales/en.yml
|
184
212
|
- test/dummy/config/boot.rb
|
213
|
+
- test/dummy/config/environments/test.rb
|
214
|
+
- test/dummy/config/environments/production.rb
|
215
|
+
- test/dummy/config/environments/development.rb
|
216
|
+
- test/dummy/config/application.rb
|
217
|
+
- test/dummy/config/secrets.yml
|
218
|
+
- test/dummy/config/routes.rb
|
219
|
+
- test/dummy/README.rdoc
|
220
|
+
- test/dummy/config.ru
|
221
|
+
- test/dummy/app/helpers/application_helper.rb
|
222
|
+
- test/dummy/app/controllers/application_controller.rb
|
223
|
+
- test/dummy/app/models/product.rb
|
185
224
|
- test/dummy/app/models/category_item.rb
|
186
|
-
- test/dummy/app/models/category.rb
|
187
225
|
- test/dummy/app/models/store.rb
|
188
|
-
- test/dummy/app/models/
|
226
|
+
- test/dummy/app/models/category.rb
|
189
227
|
- test/dummy/app/views/layouts/application.html.erb
|
190
|
-
- test/dummy/app/assets/javascripts/application.js
|
191
228
|
- test/dummy/app/assets/stylesheets/application.css
|
229
|
+
- test/dummy/app/assets/javascripts/application.js
|
192
230
|
- test/dummy/app/assets/config/manifest.js
|
193
|
-
- test/dummy/
|
194
|
-
- test/dummy/
|
195
|
-
- test/dummy/
|
196
|
-
- test/dummy/
|
197
|
-
- test/dummy/
|
198
|
-
- test/dummy/db/migrate/20160326174530_create_stores.rb
|
199
|
-
- test/dummy/db/migrate/20160325214744_create_categories.rb
|
200
|
-
- test/dummy/db/schema.rb
|
231
|
+
- test/dummy/Rakefile
|
232
|
+
- test/dummy/public/500.html
|
233
|
+
- test/dummy/public/404.html
|
234
|
+
- test/dummy/public/favicon.ico
|
235
|
+
- test/dummy/public/422.html
|
201
236
|
- test/dummy/bin/rails
|
202
237
|
- test/dummy/bin/rake
|
203
|
-
- test/dummy/bin/bundle
|
204
238
|
- test/dummy/bin/setup
|
205
|
-
- test/
|
206
|
-
- test/
|
239
|
+
- test/dummy/bin/bundle
|
240
|
+
- test/filter_test.rb
|