beanstalker 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.12
1
+ 0.4.13
data/beanstalker.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beanstalker}
8
- s.version = "0.4.12"
8
+ s.version = "0.4.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gleb Pomykalov"]
12
- s.date = %q{2010-08-31}
12
+ s.date = %q{2010-09-01}
13
13
  s.description = %q{Beanstalker is a tool for executing long tasks in background in our rails application.}
14
14
  s.email = %q{glebpom@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -30,18 +30,19 @@ CLASSES_TO_EXTEND = [
30
30
 
31
31
  module Beanstalker::Extensions
32
32
  def self.included(receiver)
33
+ @@methods_async_options = {}
33
34
  receiver.extend(ClassMethods)
34
35
  end
35
-
36
+
36
37
  module ClassMethods
37
38
  def async_method(method, options = {})
38
- @methods_async_options ||= {}
39
+ methods_async_options = class_variable_get(:@@methods_async_options)
39
40
  if options
40
- @methods_async_options.merge!(method.to_sym => options)
41
+ class_variable_set(:@@methods_async_options, methods_async_options.merge(method.to_sym => options))
41
42
  end
42
43
  end
43
44
  end
44
-
45
+
45
46
  def interpolate_async_options(options, object, *args)
46
47
  result = {}
47
48
  options.each do |k,v|
@@ -53,10 +54,9 @@ module Beanstalker::Extensions
53
54
  end
54
55
  result
55
56
  end
56
-
57
+
57
58
  def async_send(selector, *args)
58
- @methods_async_options ||= {}
59
- async_send_opts(selector, @methods_async_options[selector.to_sym] || {}, *args)
59
+ async_send_opts(selector, @@methods_async_options[selector.to_sym] || {}, *args)
60
60
  end
61
61
 
62
62
  def async_send_opts(selector, opts, *args)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beanstalker
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 12
10
- version: 0.4.12
9
+ - 13
10
+ version: 0.4.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gleb Pomykalov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-31 00:00:00 +04:00
18
+ date: 2010-09-01 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency