backgrounded 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
- :minor: 5
3
+ :minor: 6
4
4
  :build:
5
5
  :patch: 0
data/backgrounded.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{backgrounded}
8
- s.version = "0.5.0"
8
+ s.version = "0.6.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Sonnek"]
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
27
27
  "lib/backgrounded/handler/delayed_job_handler.rb",
28
28
  "lib/backgrounded/handler/inprocess_handler.rb",
29
29
  "lib/backgrounded/handler/resque_handler.rb",
30
+ "lib/backgrounded/handler/workling_handler.rb",
30
31
  "test/backgrounded/handler/delayed_job_handler_test.rb",
31
32
  "test/backgrounded/handler/resque_handler_test.rb",
32
33
  "test/backgrounded_test.rb",
@@ -0,0 +1,14 @@
1
+ class Backgrounded::Handler::WorklingHandler < Workling::Base
2
+ def request(object, method, *args)
3
+ options = {
4
+ :class => object.class.name,
5
+ :id => object.id,
6
+ :method => method,
7
+ :params => args
8
+ }
9
+ Backgrounded::Handler::WorklingHandler.async_perform options
10
+ end
11
+ def perform(options = {})
12
+ options[:class].constantize.find(options[:id]).send(options[:method], *options[:params])
13
+ end
14
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backgrounded
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 0
10
- version: 0.5.0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek
@@ -99,6 +99,7 @@ files:
99
99
  - lib/backgrounded/handler/delayed_job_handler.rb
100
100
  - lib/backgrounded/handler/inprocess_handler.rb
101
101
  - lib/backgrounded/handler/resque_handler.rb
102
+ - lib/backgrounded/handler/workling_handler.rb
102
103
  - test/backgrounded/handler/delayed_job_handler_test.rb
103
104
  - test/backgrounded/handler/resque_handler_test.rb
104
105
  - test/backgrounded_test.rb