acidic_job 1.0.0.beta.3 → 1.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae3f13ed2a45c147047c0f09348bd4e9d5b4ecca9ca87230b1cacdaf0c371102
4
- data.tar.gz: f3078b9df6b56f27aad3ed4e18cd361d5f735e871513dd308fdc2d6c18e767de
3
+ metadata.gz: 9516f1c035c3f7256c178aa23c6966f19420e718f2f0e24d0ec0d751c5e8beb5
4
+ data.tar.gz: 0dcf21315d4afefbd1861f69aff453b293818b9166fb58fe36ac45b62266ea13
5
5
  SHA512:
6
- metadata.gz: 37063209e88853721910ab7f0952348c20471eb334327cc18e13a7e688314c813541d6ade50e19934919e5de7126d6e888d1f4b90ebb89a61bc978079d121de0
7
- data.tar.gz: 99c717f971401a1e6034c31a7816d3ffa2b31fc91bff705aa408c61a27c172d9f49907bdc44c96563c8276162a03b1eac9b6ceae1da7614b159e530978e2d1de
6
+ metadata.gz: 1c742edbc7e301b035276a93ca8d68f1118c6899b024ef7edbf0694790ee6804a18ae7e7d1c2a2d89c40b5e05b966a0bee9114a61aeca0307618c8d0715a047f
7
+ data.tar.gz: 5cfda7f2d2cdc602da3bcb6225e8c38647e79b1f1b08e153e4d524594551fc42ce4116240d4837dee59bf17adbf8390e5d0d036120816e0aa379cadb872c787a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acidic_job (1.0.0.beta.3)
4
+ acidic_job (1.0.0.beta.4)
5
5
  activejob
6
6
  activerecord
7
7
  activesupport
@@ -7,9 +7,6 @@ module AcidicJob
7
7
  extend ActiveSupport::Concern
8
8
 
9
9
  def self.wire_up(other)
10
- raise UnknownJobAdapter unless (defined?(::ActiveJob::Base) && other < ::ActiveJob::Base) ||
11
- (defined?(::Sidekiq::Worker) && other.include?(::Sidekiq::Worker))
12
-
13
10
  # Ensure our `perform` method always runs first to gather parameters
14
11
  # and run perform callbacks for Sidekiq workers
15
12
  other.prepend PerformWrapper
@@ -76,6 +73,9 @@ module AcidicJob
76
73
  end
77
74
 
78
75
  def with_acidic_workflow(persisting: {}, &block)
76
+ raise UnknownJobAdapter unless (defined?(::AcidicJob::Base) && self.class < ::AcidicJob::Base) ||
77
+ (defined?(::AcidicJob::ActiveKiq) && self.class < ::AcidicJob::ActiveKiq)
78
+
79
79
  raise RedefiningWorkflow if defined? @workflow_builder
80
80
 
81
81
  @workflow_builder = WorkflowBuilder.new
@@ -5,12 +5,23 @@ require "rails/railtie"
5
5
  module AcidicJob
6
6
  class Rails < ::Rails::Railtie
7
7
  initializer "acidic_job.action_mailer_extension" do
8
- ActiveSupport.on_load(:action_mailer) do
8
+ ::ActiveSupport.on_load(:action_mailer) do
9
9
  # Add `deliver_acidicly` to ActionMailer
10
- if defined?(::ActionMailer)
11
- ::ActionMailer::Parameterized::MessageDelivery.include(::AcidicJob::Extensions::ActionMailer)
12
- end
13
- ::ActionMailer::MessageDelivery.include(::AcidicJob::Extensions::ActionMailer) if defined?(::ActionMailer)
10
+ ::ActionMailer::Parameterized::MessageDelivery.include(Extensions::ActionMailer)
11
+ ::ActionMailer::MessageDelivery.include(Extensions::ActionMailer)
12
+ end
13
+ end
14
+
15
+ initializer "acidic_job.active_job_serializers" do
16
+ ::ActiveSupport.on_load(:active_job) do
17
+ ::ActiveJob::Serializers.add_serializers(
18
+ Serializers::ExceptionSerializer,
19
+ Serializers::FinishedPointSerializer,
20
+ Serializers::JobSerializer,
21
+ Serializers::RangeSerializer,
22
+ Serializers::RecoveryPointSerializer,
23
+ Serializers::WorkerSerializer
24
+ )
14
25
  end
15
26
  end
16
27
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AcidicJob
4
- VERSION = "1.0.0.beta.3"
4
+ VERSION = "1.0.0.beta.4"
5
5
  end
data/lib/acidic_job.rb CHANGED
@@ -18,25 +18,17 @@ require_relative "acidic_job/extensions/action_mailer"
18
18
  require_relative "acidic_job/extensions/noticed"
19
19
  require_relative "acidic_job/mixin"
20
20
  require_relative "acidic_job/base"
21
- require_relative "acidic_job/active_kiq"
21
+ # require_relative "acidic_job/active_kiq"
22
22
 
23
+ require "active_job/serializers"
23
24
  require_relative "acidic_job/serializers/exception_serializer"
24
25
  require_relative "acidic_job/serializers/finished_point_serializer"
25
26
  require_relative "acidic_job/serializers/job_serializer"
26
27
  require_relative "acidic_job/serializers/range_serializer"
27
28
  require_relative "acidic_job/serializers/recovery_point_serializer"
28
29
  require_relative "acidic_job/serializers/worker_serializer"
29
- require "active_job/serializers"
30
30
 
31
31
  require_relative "acidic_job/rails"
32
32
 
33
33
  module AcidicJob
34
- ::ActiveJob::Serializers.add_serializers(
35
- Serializers::ExceptionSerializer,
36
- Serializers::FinishedPointSerializer,
37
- Serializers::JobSerializer,
38
- Serializers::RangeSerializer,
39
- Serializers::RecoveryPointSerializer,
40
- Serializers::WorkerSerializer
41
- )
42
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acidic_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.3
4
+ version: 1.0.0.beta.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - fractaledmind