carrierwave_backgrounder 1.0.0.beta.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -2
- data/README.md +2 -2
- data/lib/backgrounder/version.rb +1 -1
- data/lib/backgrounder/workers/base.rb +0 -4
- data/lib/carrierwave_backgrounder.rb +3 -3
- data/spec/support/global_macros.rb +1 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6e8ff06c13487a9d2cc4b62f2384e664f5071890b2ab3f84c8c4af51fe1d3aa
|
4
|
+
data.tar.gz: 2bc907bba296cf9c7a9007ca4a345911def1c88a3e1d6646c1a3dbd998598e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1129e8d192664e21f53a20b5ad3de4801c363bdaab8bb15e4b009b2f20f178631c1b731587686e2c70ea42723f57e6cea3de16a1154cc57d81e394194b58a6b5
|
7
|
+
data.tar.gz: add77ebea2c899b22c6ed8d8047b83286372adc360a7bd46b394f653d9e28d9dc24d9367067e5573765af99bbc41e467ee1b0c9f30aed009b20148a8df601248
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## 1.0.1
|
2
|
+
|
3
|
+
### bugfixes
|
4
|
+
* [#315] Fix an issue where the expectation was a string key for config [fero46]
|
5
|
+
|
6
|
+
## 1.0.0
|
7
|
+
* No Changes
|
8
|
+
## 1.0.0-beta.2
|
9
|
+
|
10
|
+
### enhancements
|
11
|
+
* Now fully testing using different queue_adapters in CI
|
12
|
+
|
13
|
+
### bugfixes
|
14
|
+
* Fix issue loading active_job
|
15
|
+
|
1
16
|
## 1.0.0-beta
|
2
17
|
|
3
18
|
### enhancements
|
@@ -9,9 +24,8 @@
|
|
9
24
|
* Fix issue where a new job would be queued when a upload was removed
|
10
25
|
|
11
26
|
### breaking changes
|
12
|
-
* Remove support for
|
27
|
+
* Remove support for after_save in favor of after_commit
|
13
28
|
* Remove support for queueing systems other than ActiveJob and Sidekiq.
|
14
|
-
This will simplify support and offload the heavy lifting to ActiveJob
|
15
29
|
|
16
30
|
## 0.4.3
|
17
31
|
|
data/README.md
CHANGED
@@ -161,7 +161,7 @@ Each method, #store_in_background and #process_in_background has there own worke
|
|
161
161
|
|
162
162
|
class User < ActiveRecord::Base
|
163
163
|
mount_uploader :avatar, AvatarUploader
|
164
|
-
process_in_background
|
164
|
+
process_in_background :avatar, MyParanoidWorker
|
165
165
|
end
|
166
166
|
|
167
167
|
class MyParanoidWorker < ::CarrierWave::Workers::ProcessAsset
|
@@ -180,7 +180,7 @@ end
|
|
180
180
|
|
181
181
|
class User < ActiveRecord::Base
|
182
182
|
mount_uploader :avatar, AvatarUploader
|
183
|
-
process_in_background
|
183
|
+
process_in_background :avatar, MyActiveJobWorker
|
184
184
|
end
|
185
185
|
|
186
186
|
class MyActiveJobWorker < ::CarrierWave::Workers::ActiveJob::StoreAsset
|
data/lib/backgrounder/version.rb
CHANGED
@@ -17,13 +17,13 @@ module CarrierWave
|
|
17
17
|
|
18
18
|
case backend
|
19
19
|
when :active_job
|
20
|
-
@worker_klass =
|
20
|
+
@worker_klass = 'CarrierWave::Workers::ActiveJob'
|
21
21
|
|
22
22
|
require 'active_job'
|
23
23
|
require 'backgrounder/workers/active_job/process_asset'
|
24
24
|
require 'backgrounder/workers/active_job/store_asset'
|
25
25
|
|
26
|
-
queue_name = queue_options[
|
26
|
+
queue_name = queue_options[:queue] || 'carrierwave'
|
27
27
|
|
28
28
|
::CarrierWave::Workers::ActiveJob::ProcessAsset.class_eval do
|
29
29
|
queue_as queue_name
|
@@ -32,7 +32,7 @@ module CarrierWave
|
|
32
32
|
queue_as queue_name
|
33
33
|
end
|
34
34
|
when :sidekiq
|
35
|
-
@worker_klass =
|
35
|
+
@worker_klass = 'CarrierWave::Workers'
|
36
36
|
|
37
37
|
require 'sidekiq'
|
38
38
|
::CarrierWave::Workers::ProcessAsset.class_eval do
|
@@ -16,14 +16,6 @@ module GlobalMacros
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def process_latest_sidekiq_job
|
19
|
-
|
20
|
-
worker_class = job['class']
|
21
|
-
worker = worker_class.constantize.new
|
22
|
-
|
23
|
-
if worker_class =~ /JobWrapper/
|
24
|
-
worker.perform job['args'].first
|
25
|
-
else
|
26
|
-
worker.perform(*job['args'])
|
27
|
-
end
|
19
|
+
Sidekiq::Job.drain_all
|
28
20
|
end
|
29
21
|
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.1
|
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-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|
@@ -248,9 +248,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
248
248
|
version: '0'
|
249
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
250
|
requirements:
|
251
|
-
- - "
|
251
|
+
- - ">="
|
252
252
|
- !ruby/object:Gem::Version
|
253
|
-
version:
|
253
|
+
version: '0'
|
254
254
|
requirements: []
|
255
255
|
rubygems_version: 3.2.3
|
256
256
|
signing_key:
|