anachronic 0.43.3 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1742cd2c69944236145c23ba37f3c9ee355dd02e05913066f6989dd49e95d191
4
- data.tar.gz: 8f28901c9c5d7a8c35ac1a84fcac8d0fdb63af3bdd864e353560994e62d71a5c
3
+ metadata.gz: 1a9d5dc6fb44c62df056b23ee82749130f11331dc589918b4cbd0582274824d2
4
+ data.tar.gz: fcccffa0545173600919bd6888318a047db22c6d7d70175e6f01ae7b1e705a54
5
5
  SHA512:
6
- metadata.gz: d088e4b8e592ac8ba3ffb621b4ecd4778fb0d0da77093201ab897ca82c9d8d6a415b5f868b4e0cb5bb7522a33bf5382a60c69f50c3c0326037dbf6d3732c4dc7
7
- data.tar.gz: 40741088da5211fa6a19bb254b9238a0c52ce5e3a6f3e0b28b3b49d8d0bfedc3eee9bb3bb2e3e7722cfc0b17b30db5112dc48d57a33f519a9cb3a3efedb2b4c8
6
+ metadata.gz: cffcf27a85768dcb4826d76df0850e3e7f6b363fb39f4182fadc414caecb7d17d5c550bd7c55249b5d4ec7387eeffdfd74923fbd211d868c35daae8e30d1d907
7
+ data.tar.gz: 0a94207e7181afadc8ee8fcec943678c493ca151dc22c426beed64ffde0266d35bb7175d483672bc17bcadee5e2f502318c86288e4fb2e9143750a2565ba7404
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anachronic (0.43.3)
4
+ anachronic (0.44.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -188,4 +188,4 @@ DEPENDENCIES
188
188
  sidekiq (~> 6.0)
189
189
 
190
190
  BUNDLED WITH
191
- 2.1.4
191
+ 2.2.15
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anachronic
4
+ module Executors
5
+ # Default executor for Resque backend
6
+ class Resque
7
+ class << self
8
+ def call(instance, method, *args)
9
+ executor.perform(instance, method, *args)
10
+ end
11
+
12
+ def executor
13
+ @executor ||= begin
14
+ return unless defined? Resque
15
+
16
+ Class.new(Resque) do
17
+ def self.perform(instance, method, *args)
18
+ instance.public_send(method, *args)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anachronic
4
+ module Executors
5
+ # Default executor for Sidekiq backend
6
+ class Sidekiq
7
+ class << self
8
+ def call(instance, method, *args)
9
+ executor.perform_async(instance, method, *args)
10
+ end
11
+
12
+ def executor
13
+ @executor ||= begin
14
+ Class.new(Sidekiq) do
15
+ include ::Sidekiq::Worker
16
+
17
+ def perform_async(instance, method, *args)
18
+ instance.public_send(method, *args)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anachronic
4
- VERSION = '0.43.3'
4
+ VERSION = '0.44.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anachronic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.3
4
+ version: 0.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danielius Visockas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-27 00:00:00.000000000 Z
11
+ date: 2021-09-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Removing boilerplate from async code
14
14
  email:
@@ -35,6 +35,8 @@ files:
35
35
  - lib/anachronic/configuration.rb
36
36
  - lib/anachronic/error.rb
37
37
  - lib/anachronic/executors/application_job.rb
38
+ - lib/anachronic/executors/resque.rb
39
+ - lib/anachronic/executors/sidekiq.rb
38
40
  - lib/anachronic/override.rb
39
41
  - lib/anachronic/version.rb
40
42
  homepage: https://github.com/dvisockas/anachronic
@@ -60,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
62
  - !ruby/object:Gem::Version
61
63
  version: '0'
62
64
  requirements: []
63
- rubygems_version: 3.1.4
65
+ rubygems_version: 3.2.15
64
66
  signing_key:
65
67
  specification_version: 4
66
68
  summary: Moving your method execution to the world of asynchronity