run_this_async 0.2.2 → 0.2.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fd70847b296259b88022ec10d7b3f3fdade68ed
|
4
|
+
data.tar.gz: 750e36e4878702f4a6ad8fa748020fc67110d5ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c3fadc5cd02780b2b59a0cad4e16d2dfcc91a66868ebf5af97118189fb4a975a201f9b98dc8b74d863c3f624c3cd7fbae227a295e541def26d3ed45510a2027
|
7
|
+
data.tar.gz: 372dfbaaae0cb210fc94daf8c38087cbd7dc068fbac2cd4668963b4b83f185189952f763d6dec4fb7c69bb7c6234a2d84bae7f5b4af72358dddbe3401d4a7f3c
|
data/lib/run_this_async.rb
CHANGED
@@ -5,21 +5,10 @@ module RunThisAsync::Callee
|
|
5
5
|
|
6
6
|
def call
|
7
7
|
if callee.instance_of?(String)
|
8
|
-
return
|
9
|
-
elsif callee.instance_of?(RunThisAsync::ActiveRecordPointer)
|
10
|
-
return activerecord_model
|
8
|
+
return Object.const_get(callee)
|
11
9
|
end
|
12
10
|
|
13
11
|
callee
|
14
12
|
end
|
15
|
-
|
16
|
-
private
|
17
|
-
def class_from_string
|
18
|
-
Object.const_get(callee)
|
19
|
-
end
|
20
|
-
|
21
|
-
def activerecord_model
|
22
|
-
callee.klass.find_by(id: callee.id)
|
23
|
-
end
|
24
13
|
end
|
25
14
|
end
|
@@ -5,21 +5,10 @@ module RunThisAsync::Callee
|
|
5
5
|
|
6
6
|
def call
|
7
7
|
if callee.instance_of?(Class)
|
8
|
-
return
|
9
|
-
elsif callee.is_a?(ActiveRecord::Base)
|
10
|
-
return activerecord_pointer
|
8
|
+
return callee.to_s
|
11
9
|
end
|
12
10
|
|
13
11
|
callee
|
14
12
|
end
|
15
|
-
|
16
|
-
private
|
17
|
-
def stringified_class
|
18
|
-
callee.to_s
|
19
|
-
end
|
20
|
-
|
21
|
-
def activerecord_pointer
|
22
|
-
RunThisAsync::ActiveRecordPointer.new(callee.class, callee.id)
|
23
|
-
end
|
24
13
|
end
|
25
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: run_this_async
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Bylica
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -112,7 +112,6 @@ files:
|
|
112
112
|
- bin/setup
|
113
113
|
- lib/run_this_async.rb
|
114
114
|
- lib/run_this_async/async_runner.rb
|
115
|
-
- lib/run_this_async/callee/active_record_pointer.rb
|
116
115
|
- lib/run_this_async/callee/decoder.rb
|
117
116
|
- lib/run_this_async/callee/encoder.rb
|
118
117
|
- lib/run_this_async/version.rb
|