acidic_job 0.7.2 → 0.7.3

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: 4910116a711c9df36b6266a92b97c71112bfd03ee6d403905f0f14ae61eea383
4
- data.tar.gz: 8965848f4a6c0e0d4888f00c691572f5219d66bdf29b45cc317bb8294d2ea683
3
+ metadata.gz: 7dd5ef2a75562917c4bc4340c794ba8d0bfe8cd16e16f87648281e55915cc415
4
+ data.tar.gz: beccac205aeac449f163a3474b0f0d906b0331a8f5495c3f48883378c3d08392
5
5
  SHA512:
6
- metadata.gz: 93d676f01d6e46410bbb91d41ae16f2c50c71a0ec3202ea48a2808daf6775ab2802fec5191b9326c60aaaadf6c31e67260ca173d6827ffaa3eb566dee4acb881
7
- data.tar.gz: 41c53dcc97dee5b14575fa83702dde9cb8eafaf0390cfa8d67ab75a1a7d62e1a2b213c02442a324818ef3fa816d2bfdf2a3f9ea21530cdf9567f5021405b1c20
6
+ metadata.gz: 8bef8f4e65efa86de60a3d44bdf2cfff86593a6da6bd7f6cc0c7261272b8fdb775f95bfee2990c1f7d03681fe182b1b54bbe8449cf068b8a97f2d54144b75bec
7
+ data.tar.gz: b5ad802967a4f5096fcffd6ee682c429d70194b9c4b549e2542fcc7be8206e0e3b7111824815c2f207504307af4a644bd81020a5be3ac6416728bebafa8c1c84
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acidic_job (0.7.2)
4
+ acidic_job (0.7.3)
5
5
  activerecord (>= 4.0.0)
6
6
  activesupport
7
7
 
@@ -2,7 +2,8 @@
2
2
 
3
3
  module AcidicJob
4
4
  module DeliverTransactionallyExtension
5
- def deliver_transactionally(options = {})
5
+ # rubocop:disable Metrics/MethodLength
6
+ def deliver_transactionally(_options = {})
6
7
  job = delivery_job_class
7
8
 
8
9
  attributes = {
@@ -11,14 +12,15 @@ module AcidicJob
11
12
  }
12
13
 
13
14
  job_args = if job <= ActionMailer::Parameterized::MailDeliveryJob
14
- [@mailer_class.name, @action.to_s, "deliver_now", {params: @params, args: @args}]
15
- else
16
- [@mailer_class.name, @action.to_s, "deliver_now", @params, *@args]
17
- end
15
+ [@mailer_class.name, @action.to_s, "deliver_now", { params: @params, args: @args }]
16
+ else
17
+ [@mailer_class.name, @action.to_s, "deliver_now", @params, *@args]
18
+ end
18
19
 
19
20
  attributes[:job_args] = job.new(job_args).serialize
20
21
 
21
22
  AcidicJob::Staged.create!(attributes)
22
23
  end
24
+ # rubocop:enable Metrics/MethodLength
23
25
  end
24
26
  end
@@ -18,7 +18,6 @@ module AcidicJob
18
18
 
19
19
  private
20
20
 
21
- # rubocop:disable Metrics/AbcSize
22
21
  def set_arguments_for_perform(*args, **kwargs)
23
22
  # store arguments passed into `perform` so that we can later persist
24
23
  # them to `AcidicJob::Key#job_args` for both ActiveJob and Sidekiq::Worker
@@ -32,6 +31,5 @@ module AcidicJob
32
31
  []
33
32
  end
34
33
  end
35
- # rubocop:enable Metrics/AbcSize
36
34
  end
37
35
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AcidicJob
4
- VERSION = "0.7.2"
4
+ VERSION = "0.7.3"
5
5
  end
data/lib/acidic_job.rb CHANGED
@@ -25,9 +25,7 @@ module AcidicJob
25
25
  # Extend ActiveJob with `perform_transactionally` class method
26
26
  klass.include PerformTransactionallyExtension
27
27
 
28
- if defined?(ActionMailer)
29
- ActionMailer::Parameterized::MessageDelivery.include DeliverTransactionallyExtension
30
- end
28
+ ActionMailer::Parameterized::MessageDelivery.include DeliverTransactionallyExtension if defined?(ActionMailer)
31
29
 
32
30
  # Ensure our `perform` method always runs first to gather parameters
33
31
  klass.prepend PerformWrapper
@@ -95,7 +93,7 @@ module AcidicJob
95
93
  recovery_point = @key.recovery_point.to_s
96
94
  current_step = @key.workflow[recovery_point]
97
95
 
98
- if recovery_point == Key::RECOVERY_POINT_FINISHED.to_s
96
+ if recovery_point == Key::RECOVERY_POINT_FINISHED.to_s # rubocop:disable Style/GuardClause
99
97
  break
100
98
  elsif current_step.nil?
101
99
  raise UnknownRecoveryPoint, "Defined workflow does not reference this step: #{recovery_point}"
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: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - fractaledmind