simple_worker 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/simple_worker/base.rb +8 -7
- data/test/test_worker_2.rb +1 -0
- metadata +3 -3
data/lib/simple_worker/base.rb
CHANGED
@@ -19,13 +19,14 @@ module SimpleWorker
|
|
19
19
|
def inherited(subclass)
|
20
20
|
subclass.reset!
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
|
27
|
-
caller_file =
|
28
|
-
|
22
|
+
puts "subclass.inspect=" + subclass.inspect
|
23
|
+
puts 'existing caller=' + (subclass.instance_variable_defined?(:@caller_file) ? subclass.instance_variable_get(:@caller_file).inspect : "nil")
|
24
|
+
puts "caller=" + caller.inspect
|
25
|
+
# splits = caller[0].split(":")
|
26
|
+
# caller_file = splits[0] + ":" + splits[1]
|
27
|
+
caller_file = caller[0][0...(caller[0].index(":in"))]
|
28
|
+
caller_file = caller_file[0...(caller_file.rindex(":"))]
|
29
|
+
puts 'caller_file=' + caller_file
|
29
30
|
# don't need these class_variables anymore probably
|
30
31
|
subclass.instance_variable_set(:@caller_file, caller_file)
|
31
32
|
|
data/test/test_worker_2.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_worker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 6
|
10
|
+
version: 0.3.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis Reeder
|