famoseagle-sweat_shop 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/sweat_shop/worker.rb +2 -1
  3. metadata +2 -2
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :patch: 0
3
3
  :major: 0
4
- :minor: 7
4
+ :minor: 8
@@ -7,12 +7,13 @@ module SweatShop
7
7
  end
8
8
 
9
9
  def self.method_missing(method, *args, &block)
10
- if method.to_s =~ /^async_(.*)/ and config['enable']
10
+ if method.to_s =~ /^async_(.*)/
11
11
  method = $1
12
12
  expected_args = instance.method(method).arity
13
13
  if expected_args != args.size
14
14
  raise ArgumentError.new("#{method} expects #{expected_args} arguments")
15
15
  end
16
+ return instance.send(method, *args) unless config['enable']
16
17
 
17
18
  uid = ::Digest::MD5.hexdigest("#{name}:#{method}:#{args}:#{Time.now.to_f}")
18
19
  task = {:args => args, :method => method, :uid => uid, :queued_at => Time.now.to_i}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: famoseagle-sweat_shop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amos Elliston
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-22 00:00:00 -07:00
12
+ date: 2009-05-29 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15