beanstalker 0.4.11 → 0.4.12

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.11
1
+ 0.4.12
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.11"
8
+ s.version = "0.4.12"
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-05}
12
+ s.date = %q{2010-08-31}
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,19 +30,18 @@ CLASSES_TO_EXTEND = [
30
30
 
31
31
  module Beanstalker::Extensions
32
32
  def self.included(receiver)
33
- @@methods_async_options = {}
34
33
  receiver.extend(ClassMethods)
35
34
  end
36
-
35
+
37
36
  module ClassMethods
38
37
  def async_method(method, options = {})
39
- methods_async_options = class_variable_get(:@@methods_async_options)
38
+ @methods_async_options ||= {}
40
39
  if options
41
- class_variable_set(:@@methods_async_options, methods_async_options.merge(method.to_sym => options))
40
+ @methods_async_options.merge!(method.to_sym => options)
42
41
  end
43
42
  end
44
43
  end
45
-
44
+
46
45
  def interpolate_async_options(options, object, *args)
47
46
  result = {}
48
47
  options.each do |k,v|
@@ -54,9 +53,10 @@ module Beanstalker::Extensions
54
53
  end
55
54
  result
56
55
  end
57
-
56
+
58
57
  def async_send(selector, *args)
59
- async_send_opts(selector, @@methods_async_options[selector.to_sym] || {}, *args)
58
+ @methods_async_options ||= {}
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 11
10
- version: 0.4.11
9
+ - 12
10
+ version: 0.4.12
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-05 00:00:00 +04:00
18
+ date: 2010-08-31 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency