kithe 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,27 @@ describe "Kithe::Asset derivative definitions", queue_adapter: :test do
50
50
  expect(asset.derivatives_created?).to be(true)
51
51
  end
52
52
 
53
+
54
+ describe "Original deleted before derivatives can be created", queue_adapter: :inline do
55
+ let(:short_lived_asset) do
56
+ TestAssetSubclass.create!(title: "test",
57
+ file: File.open(Kithe::Engine.root.join("spec/test_support/images/1x1_pixel.jpg")))
58
+ end
59
+ it """catches the ActiveJob::DeserializationError
60
+ if the asset is no longer in the database
61
+ once the derivative creation job starts up.""" do
62
+ id_to_delete = short_lived_asset.id
63
+ Kithe::Derivative.where(asset_id: id_to_delete).delete_all
64
+ Kithe::Model.where(id: id_to_delete).delete_all
65
+
66
+ # short_lived_asset is no longer in the DB.
67
+ # Let's try and create derivatives for it:
68
+ expect do
69
+ Kithe::CreateDerivativesJob.perform_later(short_lived_asset)
70
+ end.not_to raise_error
71
+ end
72
+ end
73
+
53
74
  describe "under normal operation", queue_adapter: :inline do
54
75
  let(:asset) do
55
76
  TestAssetSubclass.create!(title: "test",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kithe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-23 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -490,8 +490,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
490
490
  - !ruby/object:Gem::Version
491
491
  version: '0'
492
492
  requirements: []
493
- rubyforge_project:
494
- rubygems_version: 2.7.6
493
+ rubygems_version: 3.0.3
495
494
  signing_key:
496
495
  specification_version: 4
497
496
  summary: Shareable tools/components for building a digital collections app in Rails.