request_queue 0.3.0 → 0.3.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
  SHA1:
3
- metadata.gz: fb4fadeffad30cc58d4d70f10ab82ba428a0716d
4
- data.tar.gz: d3b1f3ca280bad3c268d152a7682289cab0985d2
3
+ metadata.gz: 5337d852e069df7e317860a0bbb9718f1c07f577
4
+ data.tar.gz: add46e260a7ec5d8d49eeb29af49d0df3da7e7e2
5
5
  SHA512:
6
- metadata.gz: ae9b1bf0a3a381c85a134ca470e976dd45d9bb52c1c3cf281de18241b133bf07c505d83fec9eba5bc78d06eccb1f4d434aba16f7417feede8dae59b3a7bc8abc
7
- data.tar.gz: 47cde5ad4130e189775c6936e04dc533cb0bc859075b1405fb1cf80e147dc5cbfef61abad3ebf91c7494b1e86734f0227f8290f504cc8381044ca1ca49d81069
6
+ metadata.gz: 5001f83b78c4043dd207d8ad23e50852f15f6c38d60fe7871b005a98b7fbd999d8ee74aa3e8bac36f9465bfb225c87b322909d3582bd711e92ddd4848d3437e6
7
+ data.tar.gz: 901028ba17bb95acb1c3cffc19a1b5555afc2e93d3dbd563622b27823f249fd714211eb3832347f9de652433a6f0a869a76a61188fe93ef7ea5374be53df234d
@@ -1,3 +1,3 @@
1
1
  module RequestQueue
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/lib/request_queue.rb CHANGED
@@ -4,7 +4,7 @@ require 'request_queue/queue'
4
4
  require 'request_queue/inline_queue'
5
5
  require 'request_queue/fake_queue'
6
6
  require 'request_queue/middleware'
7
- require 'request_store/railtie' if defined?(Rails::Railtie)
7
+ require 'request_queue/railtie' if defined? Rails::Railtie
8
8
 
9
9
  module RequestQueue
10
10
  BACKENDS = {
@@ -34,18 +34,11 @@ module RequestQueue
34
34
  end
35
35
 
36
36
  def process(backend = :default)
37
- restore do
38
- self.queue = BACKENDS.fetch(backend).new
39
- yield if block_given?
40
- queue.process
41
- end
42
- end
43
-
44
- private
45
-
46
- def restore
47
37
  original_queue = self.queue
48
- yield
38
+ self.queue = BACKENDS.fetch(backend).new
39
+ result = yield if block_given?
40
+ queue.process unless queue.nil?
41
+ result
49
42
  ensure
50
43
  self.queue = original_queue
51
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Zane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-18 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: request_store