acidic_job 0.5.0 → 0.5.1

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: 943a9bc87b07b1e4a2ec7d0a83ffa8a23917124386cfc601780f95d36c62d23a
4
- data.tar.gz: 2f534e9ebd0d533ae4b7572fb1da1451df9a1a2ed68fc231bc4f4de323de9e84
3
+ metadata.gz: 84a76328fcff18be9e2302440dc2bc7284764ba94737fbf5044c9d7111902fa9
4
+ data.tar.gz: 49f793646313f1d7373913dfbb745ec94e644472031b77eda41b49d622a4290f
5
5
  SHA512:
6
- metadata.gz: 59f4ecc2e773d72bbef2d386a223e9859ee6f14c657e706c593e7a3f4c994c86aae885ef0b2993cbb916a1380daf3231882255685b6ffa360ffc4bf5dee591d8
7
- data.tar.gz: 2a8d540fabb8528a9c305b9d7cf7fe12588c14760557f08f4c380dfb6b45fdafec1232767234809101d6aa0e8f44f8ac895b120664dec8e533d180900ad06c6f
6
+ metadata.gz: f61806e50dcae6c26a22e2cea13205f62f28a768c6642b20417cc1f12a5a6a04880c366cf0530bea68a8d51707caef54be9aefb7ef630e7b41dcff3e252d6369
7
+ data.tar.gz: a83e16a9bd2838df358e78d1d6a5eaebd94829e9f56241ec4b99763f92b319918954960a285f9a1475fc5321f6b8cf1fc8c2f38215245563eecd3ef391992c2c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acidic_job (0.5.0)
4
+ acidic_job (0.5.1)
5
5
  activerecord (>= 4.0.0)
6
6
  activesupport
7
7
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AcidicJob
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
data/lib/acidic_job.rb CHANGED
@@ -15,15 +15,25 @@ require "active_support/concern"
15
15
  module AcidicJob
16
16
  extend ActiveSupport::Concern
17
17
 
18
- included do
19
- attr_reader :key
20
- attr_accessor :arguments_for_perform
18
+ def self.wire_everything_up(klass)
19
+ klass.attr_reader :key
20
+ klass.attr_accessor :arguments_for_perform
21
21
 
22
22
  # Extend ActiveJob with `perform_transactionally` class method
23
- include PerformTransactionallyExtension
23
+ klass.include PerformTransactionallyExtension
24
24
 
25
25
  # Ensure our `perform` method always runs first to gather parameters
26
- prepend PerformWrapper
26
+ klass.prepend PerformWrapper
27
+ end
28
+
29
+ included do
30
+ AcidicJob.wire_everything_up(self)
31
+ end
32
+
33
+ class_methods do
34
+ def inherited(subclass)
35
+ AcidicJob.wire_everything_up(subclass)
36
+ end
27
37
  end
28
38
 
29
39
  # Number of seconds passed which we consider a held idempotency key lock to be
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acidic_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - fractaledmind
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-28 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord