background_worker 0.0.3 → 0.0.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
  SHA1:
3
- metadata.gz: d96a3cbffa01ee490b1a2542a80b8fdf9593aacc
4
- data.tar.gz: 609ef34234495ba8fa0f17da87ead826a2c134b5
3
+ metadata.gz: 8571c96ec0aca2ab3d9cf9f4fc0aa283152b77af
4
+ data.tar.gz: 51694792968c8e536ad250b6384de5d9a5c82c8d
5
5
  SHA512:
6
- metadata.gz: 2ae408b3eeb8261323d747d279c518a9a8e07906b86eb9b5c74d4d7b9830e58ef16dd146b480d4407e1a7fe7054d894c5ac7f8f65a29a48d5f063cd00ae61b8c
7
- data.tar.gz: dd3a09b5ebe64ec8bffd43d8381b1024c1cc3344f74e24ba0cc423b7b0ad12cd37032e666ad50a4679eaed113f4f471d6104ee4fab1b2a834dd4fc67f1430820
6
+ metadata.gz: b4c475813fd08d41afe57a2d19ec98ce0646bfc5dd872189fd451adaedf8bee3dca36cccdcf1b8c5ad8fa7402515d84dbf7835f6f1eeb6df4c19d765a8248d4e
7
+ data.tar.gz: 81a60b3710d2592f14e150998fa49a1232778f69c9e93a86e0bc5ab11285552f8aaf2636b6082aa324a8ae90659adf96bcee175ab4f88372cbd7d9ce96494259
@@ -1,8 +1,6 @@
1
1
  require 'background_worker/version'
2
2
  require 'background_worker/config'
3
- require 'background_worker/uid'
4
3
  require 'background_worker/base'
5
- require 'background_worker/persistent_state'
6
4
 
7
5
  module BackgroundWorker
8
6
  # Configure worker
@@ -35,7 +33,7 @@ module BackgroundWorker
35
33
  end
36
34
 
37
35
  def self.config
38
- raise "Not configured!" unless @config
36
+ fail 'Not configured!' unless @config
39
37
  @config
40
38
  end
41
39
 
@@ -1,3 +1,7 @@
1
+ require 'background_worker/uid'
2
+ require 'background_worker/persistent_state'
3
+ require 'background_worker/worker_execution'
4
+
1
5
  module BackgroundWorker
2
6
  class Base
3
7
  attr_accessor :uid, :state
@@ -75,11 +79,9 @@ module BackgroundWorker
75
79
  def perform(method_name, options = {})
76
80
  BackgroundWorker.verify_active_connections!
77
81
 
78
-
79
82
  worker = new(options)
80
83
  execution = WorkerExecution.new(worker, method_name, options)
81
84
  execution.call
82
-
83
85
  end
84
86
  end
85
87
  end
@@ -2,8 +2,7 @@ require 'logger'
2
2
 
3
3
  module BackgroundWorker
4
4
  class Config
5
-
6
- attr_reader :logger
5
+ attr_reader :logger
7
6
 
8
7
  # Configuration includes following options:
9
8
  # logger: what logger to user throughout
@@ -1,3 +1,3 @@
1
1
  module BackgroundWorker
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: background_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack