carrierwave_backgrounder 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/backgrounder/version.rb +1 -1
- data/lib/backgrounder/workers/process_asset_mixin.rb +1 -0
- data/spec/backgrounder/workers/process_asset_spec.rb +2 -0
- data/spec/integrations/process_in_background_multi_upload_spec.rb +4 -2
- data/spec/integrations/process_in_background_spec.rb +4 -2
- data/spec/integrations/store_in_background_multi_upload_spec.rb +4 -2
- data/spec/integrations/store_in_background_spec.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9db3ebd17e2fba8538ee90f3f451f6d37738a9d833bc5ac9f6f8123a3f7a214a
|
4
|
+
data.tar.gz: 3ef48ab1f8ac80b9ea3e374fd4806b769927baec00cc8c6d7a19b9340cebe906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67965fc212f3fa08aa5936815b63a63215550780e2150759d6dc8d87683ca7be2d5614f8d7ba9b93a22e4c1537e6db9fcffb938649708e2e42508bb868835062
|
7
|
+
data.tar.gz: 20c1a3d50441f061701e8ada2af4b2b26706794496f71fa707ff865338358c834ede9de39369e2448b39c149a9cfb6f8528f8a7daa126c3f51a4e7bc1767fe81
|
data/CHANGELOG.md
CHANGED
data/lib/backgrounder/version.rb
CHANGED
@@ -24,6 +24,7 @@ RSpec.describe CarrierWave::Workers::ProcessAsset do
|
|
24
24
|
allow(user).to receive(:find).with('22').and_return(user).once
|
25
25
|
allow(user).to receive(:image).thrice.and_return(image)
|
26
26
|
|
27
|
+
expect(user).to receive(:process_image_upload=).with(true).once
|
27
28
|
expect(image).to receive(:recreate_versions!).once.and_return(true)
|
28
29
|
expect(image).to receive(:file).and_return(image)
|
29
30
|
end
|
@@ -51,6 +52,7 @@ RSpec.describe CarrierWave::Workers::ProcessAsset do
|
|
51
52
|
allow(admin).to receive(:avatar).twice.and_return(avatar)
|
52
53
|
|
53
54
|
expect(admin).to receive(:respond_to?).with(:avatar_processing).once.and_return(false)
|
55
|
+
expect(admin).to receive(:process_avatar_upload=).with(true).once
|
54
56
|
expect(avatar).to receive(:recreate_versions!).once.and_return(true)
|
55
57
|
expect(avatar).to receive(:file).and_return(avatar)
|
56
58
|
|
@@ -32,7 +32,9 @@ RSpec.describe '::process_in_background multi-upload support', clear_images: tru
|
|
32
32
|
|
33
33
|
it 'creates the versions' do
|
34
34
|
version_paths = AvatarUploader.versions.keys.map { |key| admin.images.map { |i| i.send(key).current_path } }.flatten
|
35
|
-
version_paths.each { |path| expect(File.exist?
|
35
|
+
version_paths.each { |path| expect(File.exist?(path)).to be(true) }
|
36
|
+
file_sizes = version_paths.map { |path| File.size(path) }
|
37
|
+
expect(file_sizes.uniq.count).to be(4)
|
36
38
|
end
|
37
39
|
|
38
40
|
it 'removes the files tmp directory' do
|
@@ -78,4 +80,4 @@ RSpec.describe '::process_in_background multi-upload support', clear_images: tru
|
|
78
80
|
expect(Sidekiq::Queues["carrierwave"].size).to be(0)
|
79
81
|
end
|
80
82
|
end
|
81
|
-
end
|
83
|
+
end
|
@@ -32,7 +32,9 @@ RSpec.describe '::process_in_background', clear_images: true do
|
|
32
32
|
|
33
33
|
it 'creates the versions' do
|
34
34
|
version_paths = admin.avatar.versions.keys.map { |key| admin.avatar.send(key).current_path }
|
35
|
-
version_paths.each { |path| expect(File.exist?
|
35
|
+
version_paths.each { |path| expect(File.exist?(path)).to be(true) }
|
36
|
+
file_sizes = version_paths.map { |path| File.size(path) }
|
37
|
+
expect(file_sizes.uniq.count).to be(4)
|
36
38
|
end
|
37
39
|
|
38
40
|
it 'removes the files tmp directory' do
|
@@ -72,4 +74,4 @@ RSpec.describe '::process_in_background', clear_images: true do
|
|
72
74
|
expect(admin.avatar.file.nil?).to be(true)
|
73
75
|
end
|
74
76
|
end
|
75
|
-
end
|
77
|
+
end
|
@@ -33,7 +33,9 @@ RSpec.describe '::store_in_background multi-upload support', clear_images: true
|
|
33
33
|
|
34
34
|
it 'creates the versions' do
|
35
35
|
version_paths = AvatarUploader.versions.keys.map { |key| user.images.map { |i| i.send(key).current_path } }.flatten
|
36
|
-
version_paths.each { |path| expect(File.exist?
|
36
|
+
version_paths.each { |path| expect(File.exist?(path)).to be(true) }
|
37
|
+
file_sizes = version_paths.map { |path| File.size(path) }
|
38
|
+
expect(file_sizes.uniq.count).to be(4)
|
37
39
|
end
|
38
40
|
|
39
41
|
it 'sets the <column>_tmp to nil' do
|
@@ -84,4 +86,4 @@ RSpec.describe '::store_in_background multi-upload support', clear_images: true
|
|
84
86
|
end
|
85
87
|
|
86
88
|
end
|
87
|
-
end
|
89
|
+
end
|
@@ -33,7 +33,9 @@ RSpec.describe '::store_in_background', clear_images: true do
|
|
33
33
|
|
34
34
|
it 'creates the versions' do
|
35
35
|
version_paths = user.avatar.versions.keys.map { |key| user.avatar.send(key).current_path }
|
36
|
-
version_paths.each { |path| expect(File.exist?
|
36
|
+
version_paths.each { |path| expect(File.exist?(path)).to be(true) }
|
37
|
+
file_sizes = version_paths.map { |path| File.size(path) }
|
38
|
+
expect(file_sizes.uniq.count).to be(4)
|
37
39
|
end
|
38
40
|
|
39
41
|
it 'sets the <column>_tmp to nil' do
|
@@ -83,4 +85,4 @@ RSpec.describe '::store_in_background', clear_images: true do
|
|
83
85
|
expect(Sidekiq::Queues["carrierwave"].size).to be(0)
|
84
86
|
end
|
85
87
|
end
|
86
|
-
end
|
88
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave_backgrounder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Larry Sprock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|