activejob-perform_later 1.0.1 → 1.0.2
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 +4 -4
- data/.rubocop.yml +119 -0
- data/README.md +3 -0
- data/lib/activejob/perform_later.rb +5 -2
- data/lib/activejob/perform_later/mixin.rb +6 -26
- data/lib/activejob/perform_later/proxy.rb +1 -1
- data/lib/activejob/perform_later/util.rb +33 -0
- data/lib/activejob/perform_later/version.rb +1 -1
- data/test/cases/{class_methods_always_test.rb → classes/class_methods_always_test.rb} +5 -5
- data/test/cases/{class_methods_on_demand_test.rb → classes/class_methods_on_demand_test.rb} +7 -8
- data/test/cases/{instance_methods_on_demand_test.rb → classes/instance_methods_on_demand_test.rb} +8 -10
- data/test/cases/modules/always_test.rb +56 -0
- data/test/cases/modules/on_demand_test.rb +58 -0
- data/test/{classes → support}/test_class.rb +1 -1
- data/test/support/test_module.rb +20 -0
- metadata +19 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d508092f2ef6a4fc5bd5f60ec442ea4ee10f8975
|
4
|
+
data.tar.gz: 3486db8eba486b5f7a7102855742eda024d29d20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e60e0bca26484a94c12cbbe3f9971d96eed6d980435314db8f4224e62c35cf7be4cba799d6f091475f59408cb7a513ba3a73b4c26dd3e92007b62b49119af2b
|
7
|
+
data.tar.gz: 69dfc83edede4301f1ac69d0ba76fed5bf41c4cb43f9cd9a53b519a412bf03af325719353f3543183f20add6a80f263569bf3f0c5076fe2a19b8fcf58859d240
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.2
|
3
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
4
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
5
|
+
DisabledByDefault: true
|
6
|
+
Exclude:
|
7
|
+
- '**/templates/**/*'
|
8
|
+
- '**/vendor/**/*'
|
9
|
+
|
10
|
+
# Prefer &&/|| over and/or.
|
11
|
+
Style/AndOr:
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
# Do not use braces for hash literals when they are the last argument of a
|
15
|
+
# method call.
|
16
|
+
Style/BracesAroundHashParameters:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
# Align `when` with `case`.
|
20
|
+
Style/CaseIndentation:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
# Align comments with method definitions.
|
24
|
+
Style/CommentIndentation:
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
# No extra empty lines.
|
28
|
+
Style/EmptyLines:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# In a regular class definition, no empty lines around the body.
|
32
|
+
Style/EmptyLinesAroundClassBody:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
# In a regular module definition, no empty lines around the body.
|
36
|
+
Style/EmptyLinesAroundModuleBody:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
40
|
+
Style/HashSyntax:
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
44
|
+
# extra level of indentation.
|
45
|
+
Style/IndentationConsistency:
|
46
|
+
Enabled: true
|
47
|
+
EnforcedStyle: rails
|
48
|
+
|
49
|
+
# Two spaces, no tabs (for indentation).
|
50
|
+
Style/IndentationWidth:
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
Style/SpaceAfterColon:
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Style/SpaceAfterComma:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Style/SpaceAroundKeyword:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Style/SpaceAroundOperators:
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Style/SpaceBeforeFirstArg:
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
# Defining a method with parameters needs parentheses.
|
72
|
+
Style/MethodDefParentheses:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
# Use `foo {}` not `foo{}`.
|
76
|
+
Style/SpaceBeforeBlockBraces:
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
# Use `foo { bar }` not `foo {bar}`.
|
80
|
+
Style/SpaceInsideBlockBraces:
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
84
|
+
Style/SpaceInsideHashLiteralBraces:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Style/SpaceInsideParens:
|
88
|
+
Enabled: true
|
89
|
+
|
90
|
+
# Check quotes usage according to lint rule below.
|
91
|
+
Style/StringLiterals:
|
92
|
+
Enabled: true
|
93
|
+
EnforcedStyle: double_quotes
|
94
|
+
|
95
|
+
# Detect hard tabs, no hard tabs.
|
96
|
+
Style/Tab:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
# Blank lines should not have any spaces.
|
100
|
+
Style/TrailingBlankLines:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
# No trailing whitespace.
|
104
|
+
Style/TrailingWhitespace:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
# Use quotes for string literals when they are enough.
|
108
|
+
Style/UnneededPercentQ:
|
109
|
+
Enabled: true
|
110
|
+
|
111
|
+
# Align `end` with the matching keyword or starting expression except for
|
112
|
+
# assignments, where it should be aligned with the LHS.
|
113
|
+
Lint/EndAlignment:
|
114
|
+
Enabled: true
|
115
|
+
AlignWith: variable
|
116
|
+
|
117
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
118
|
+
Lint/RequireParentheses:
|
119
|
+
Enabled: true
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "activejob/perform_later/version"
|
2
|
-
require
|
3
|
-
require
|
2
|
+
require "active_support"
|
3
|
+
require "active_job"
|
4
4
|
|
5
5
|
module Activejob
|
6
6
|
module PerformLater
|
@@ -9,7 +9,10 @@ module Activejob
|
|
9
9
|
autoload :Job
|
10
10
|
autoload :Proxy
|
11
11
|
autoload :Mixin
|
12
|
+
autoload :Util
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
15
16
|
Object.send(:include, Activejob::PerformLater::Mixin)
|
17
|
+
Object.send(:extend, Activejob::PerformLater::Mixin)
|
18
|
+
Module.send(:extend, Activejob::PerformLater::Mixin)
|
@@ -1,34 +1,14 @@
|
|
1
1
|
module Activejob
|
2
2
|
module PerformLater
|
3
3
|
module Mixin
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
method = args[0]
|
11
|
-
options = args[1]||{}
|
12
|
-
|
13
|
-
aliased_method, punctuation = method.to_s.sub(/([?!=])$/, ''), $1
|
14
|
-
now_method, later_method = "#{aliased_method}_now#{punctuation}", "#{aliased_method}_later#{punctuation}"
|
15
|
-
|
16
|
-
singleton_class.send(:define_method, later_method) do |*args|
|
17
|
-
Job.new(self.name, now_method, args).enqueue options
|
18
|
-
end
|
19
|
-
|
20
|
-
singleton_class.send(:alias_method, now_method, method)
|
21
|
-
singleton_class.send(:alias_method, method, later_method)
|
22
|
-
else
|
23
|
-
options = args[0]||{}
|
24
|
-
Proxy.new(self.name, options)
|
25
|
-
end
|
4
|
+
def perform_later(*method_names)
|
5
|
+
options = method_names.extract_options!
|
6
|
+
if method_names.empty?
|
7
|
+
Activejob::PerformLater::Util.proxy_calls(self, options)
|
8
|
+
else
|
9
|
+
Activejob::PerformLater::Util.perform_methods_later(self, method_names, options)
|
26
10
|
end
|
27
11
|
end
|
28
|
-
|
29
|
-
def perform_later(options={})
|
30
|
-
Proxy.new(self, options)
|
31
|
-
end
|
32
12
|
end
|
33
13
|
end
|
34
14
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Activejob
|
2
|
+
module PerformLater
|
3
|
+
module Util
|
4
|
+
extend self
|
5
|
+
|
6
|
+
def proxy_calls(obj, options)
|
7
|
+
Proxy.new(obj, options)
|
8
|
+
end
|
9
|
+
|
10
|
+
def perform_methods_later(obj, method_names, options)
|
11
|
+
raise ArgumentError, "You can only declare class methods as delayed" unless obj.class == Class || obj.class == Module
|
12
|
+
method_names.each do |method_name|
|
13
|
+
perform_method_later(obj, method_name, options)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def perform_method_later(obj, method_name, options)
|
18
|
+
raise ArgumentError, "#{self} must respond to `#{method_name}`" unless obj.respond_to?(method_name)
|
19
|
+
aliased_method, punctuation = method_name.to_s.sub(/([?!=])$/, ""), $1
|
20
|
+
now_method, later_method = "#{aliased_method}_now#{punctuation}", "#{aliased_method}_later#{punctuation}"
|
21
|
+
obj.singleton_class.send(:define_method, later_method) do |*args|
|
22
|
+
Job.new(::Activejob::PerformLater::Util.proxiable_object(obj), now_method, args).enqueue options
|
23
|
+
end
|
24
|
+
obj.singleton_class.send(:alias_method, now_method, method_name)
|
25
|
+
obj.singleton_class.send(:alias_method, method_name, later_method)
|
26
|
+
end
|
27
|
+
|
28
|
+
def proxiable_object(obj)
|
29
|
+
obj.class == ::Class || obj.class == ::Module ? obj.name : obj
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "helper"
|
2
|
+
require "support/test_class"
|
3
3
|
|
4
|
-
class
|
4
|
+
class ClassesClassMethodsAlwaysTest < ActiveSupport::TestCase
|
5
5
|
include ActiveJob::TestHelper
|
6
6
|
|
7
7
|
def test_creates_later_and_now_methods
|
@@ -29,7 +29,7 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def test_enqueues_the_job_on_a_queue
|
32
|
-
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestClass", "three_now", [1, 2]], queue:
|
32
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestClass", "three_now", [1, 2]], queue: "non_default") do
|
33
33
|
TestClass.three(1, 2)
|
34
34
|
end
|
35
35
|
end
|
@@ -49,7 +49,7 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def test_performs_the_job_on_a_queue
|
52
|
-
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestClass", "three_now", [1, 2]], queue:
|
52
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestClass", "three_now", [1, 2]], queue: "non_default") do
|
53
53
|
TestClass.three(1, 2)
|
54
54
|
end
|
55
55
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "helper"
|
2
|
+
require "support/test_class"
|
3
3
|
|
4
|
-
class
|
4
|
+
class ClassesClassMethodsOnDemandTest < ActiveSupport::TestCase
|
5
5
|
include ActiveJob::TestHelper
|
6
6
|
|
7
7
|
def test_enqueues_the_job
|
@@ -25,12 +25,11 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_enqueues_the_job_on_a_queue
|
28
|
-
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestClass", "five", [1, 2]], queue:
|
29
|
-
|
28
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestClass", "five", [1, 2]], queue: "non_default") do
|
29
|
+
TestClass.perform_later(queue: "non_default").five(1, 2)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
33
|
def test_performs_the_job
|
35
34
|
assert_performed_jobs 1 do
|
36
35
|
TestClass.perform_later.five
|
@@ -52,8 +51,8 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
52
51
|
end
|
53
52
|
|
54
53
|
def test_performs_the_job_on_a_queue
|
55
|
-
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestClass", "five", [1, 2]], queue:
|
56
|
-
|
54
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestClass", "five", [1, 2]], queue: "non_default") do
|
55
|
+
TestClass.perform_later(queue: "non_default").five(1, 2)
|
57
56
|
end
|
58
57
|
end
|
59
58
|
end
|
data/test/cases/{instance_methods_on_demand_test.rb → classes/instance_methods_on_demand_test.rb}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "helper"
|
2
|
+
require "support/test_class"
|
3
3
|
|
4
|
-
class
|
4
|
+
class ClassesInstanceMethodsOnDemandTest < ActiveSupport::TestCase
|
5
5
|
include ActiveJob::TestHelper
|
6
6
|
|
7
7
|
def test_enqueues_the_job
|
@@ -11,7 +11,7 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def test_enqueues_the_job_with_arguments
|
14
|
-
assert_enqueued_with(job: Activejob::PerformLater::Job, args: [
|
14
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: [TestClass.new, "six", [1, 2]]) do
|
15
15
|
TestClass.new.perform_later.six(1, 2)
|
16
16
|
end
|
17
17
|
end
|
@@ -25,12 +25,11 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_enqueues_the_job_on_a_queue
|
28
|
-
assert_enqueued_with(job: Activejob::PerformLater::Job, queue:
|
29
|
-
|
28
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, queue: "non_default") do
|
29
|
+
TestClass.new.perform_later(queue: "non_default").six
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
33
|
def test_performs_the_job
|
35
34
|
assert_performed_jobs 1 do
|
36
35
|
TestClass.new.perform_later.six
|
@@ -38,7 +37,7 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
38
37
|
end
|
39
38
|
|
40
39
|
def test_performs_the_job_with_arguments
|
41
|
-
assert_performed_with(job: Activejob::PerformLater::Job, args: [
|
40
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: [TestClass.new, "six", [1, 2]]) do
|
42
41
|
TestClass.new.perform_later.six(1, 2)
|
43
42
|
end
|
44
43
|
end
|
@@ -52,9 +51,8 @@ class ClassMethodsAlwaysTest < ActiveSupport::TestCase
|
|
52
51
|
end
|
53
52
|
|
54
53
|
def test_performs_the_job_on_a_queue
|
55
|
-
assert_performed_with(job: Activejob::PerformLater::Job, queue:
|
54
|
+
assert_performed_with(job: Activejob::PerformLater::Job, queue: "non_default") do
|
56
55
|
TestClass.new.perform_later(queue: "non_default").six
|
57
56
|
end
|
58
57
|
end
|
59
|
-
|
60
58
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require "helper"
|
2
|
+
require "support/test_module"
|
3
|
+
|
4
|
+
class ModulesAlwaysTest < ActiveSupport::TestCase
|
5
|
+
include ActiveJob::TestHelper
|
6
|
+
|
7
|
+
def test_creates_later_and_now_methods
|
8
|
+
assert_respond_to TestModule, :one_later
|
9
|
+
assert_respond_to TestModule, :one_now
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_creates_later_and_now_methods_with_punctuation
|
13
|
+
assert_respond_to TestModule, :four_later?
|
14
|
+
assert_respond_to TestModule, :four_now?
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_enqueues_the_job
|
18
|
+
assert_enqueued_jobs 1 do
|
19
|
+
TestModule.one
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_enqueues_the_job_with_delay
|
24
|
+
travel_to Time.now do
|
25
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestModule", "two_now", [1, 2]], at: 60.seconds.from_now.to_f) do
|
26
|
+
TestModule.two(1, 2)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_enqueues_the_job_on_a_queue
|
32
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestModule", "three_now", [1, 2]], queue: "non_default") do
|
33
|
+
TestModule.three(1, 2)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_performs_the_job
|
38
|
+
assert_performed_jobs 1 do
|
39
|
+
TestModule.one
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_performs_the_job_with_delay
|
44
|
+
travel_to Time.now do
|
45
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestModule", "two_now", [1, 2]], at: 60.seconds.from_now.to_f) do
|
46
|
+
TestModule.two(1, 2)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_performs_the_job_on_a_queue
|
52
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestModule", "three_now", [1, 2]], queue: "non_default") do
|
53
|
+
TestModule.three(1, 2)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require "helper"
|
2
|
+
require "support/test_module"
|
3
|
+
|
4
|
+
class ModulesOnDemandTest < ActiveSupport::TestCase
|
5
|
+
include ActiveJob::TestHelper
|
6
|
+
|
7
|
+
def test_enqueues_the_job
|
8
|
+
assert_enqueued_jobs 1 do
|
9
|
+
TestModule.perform_later.five
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_enqueues_the_job_with_arguments
|
14
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestModule", "five", [1, 2]]) do
|
15
|
+
TestModule.perform_later.five(1, 2)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_enqueues_the_job_with_delay
|
20
|
+
travel_to Time.now do
|
21
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestModule", "five", [1, 2]], at: 60.seconds.from_now.to_f) do
|
22
|
+
TestModule.perform_later(wait: 60.seconds).five(1, 2)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_enqueues_the_job_on_a_queue
|
28
|
+
assert_enqueued_with(job: Activejob::PerformLater::Job, args: ["TestModule", "five", [1, 2]], queue: "non_default") do
|
29
|
+
TestModule.perform_later(queue: "non_default").five(1, 2)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_performs_the_job
|
34
|
+
assert_performed_jobs 1 do
|
35
|
+
TestModule.perform_later.five
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_performs_the_job_with_arguments
|
40
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestModule", "five", [1, 2]]) do
|
41
|
+
TestModule.perform_later.five(1, 2)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_performs_the_job_with_delay
|
46
|
+
travel_to Time.now do
|
47
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestModule", "five", [1, 2]], at: 60.seconds.from_now.to_f) do
|
48
|
+
TestModule.perform_later(wait: 60.seconds).five(1, 2)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_performs_the_job_on_a_queue
|
54
|
+
assert_performed_with(job: Activejob::PerformLater::Job, args: ["TestModule", "five", [1, 2]], queue: "non_default") do
|
55
|
+
TestModule.perform_later(queue: "non_default").five(1, 2)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module TestModule
|
2
|
+
def self.one(*)
|
3
|
+
end
|
4
|
+
perform_later :one
|
5
|
+
|
6
|
+
def self.two(*)
|
7
|
+
end
|
8
|
+
perform_later :two, wait: 60
|
9
|
+
|
10
|
+
def self.three(*)
|
11
|
+
end
|
12
|
+
perform_later :three, queue: "non_default"
|
13
|
+
|
14
|
+
def self.four?(*)
|
15
|
+
end
|
16
|
+
perform_later :four?
|
17
|
+
|
18
|
+
def self.five(*)
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activejob-perform_later
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristian Bica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- ".rubocop.yml"
|
63
64
|
- ".travis.yml"
|
64
65
|
- Gemfile
|
65
66
|
- LICENSE.txt
|
@@ -70,12 +71,16 @@ files:
|
|
70
71
|
- lib/activejob/perform_later/job.rb
|
71
72
|
- lib/activejob/perform_later/mixin.rb
|
72
73
|
- lib/activejob/perform_later/proxy.rb
|
74
|
+
- lib/activejob/perform_later/util.rb
|
73
75
|
- lib/activejob/perform_later/version.rb
|
74
|
-
- test/cases/class_methods_always_test.rb
|
75
|
-
- test/cases/class_methods_on_demand_test.rb
|
76
|
-
- test/cases/instance_methods_on_demand_test.rb
|
77
|
-
- test/
|
76
|
+
- test/cases/classes/class_methods_always_test.rb
|
77
|
+
- test/cases/classes/class_methods_on_demand_test.rb
|
78
|
+
- test/cases/classes/instance_methods_on_demand_test.rb
|
79
|
+
- test/cases/modules/always_test.rb
|
80
|
+
- test/cases/modules/on_demand_test.rb
|
78
81
|
- test/helper.rb
|
82
|
+
- test/support/test_class.rb
|
83
|
+
- test/support/test_module.rb
|
79
84
|
homepage: ''
|
80
85
|
licenses:
|
81
86
|
- MIT
|
@@ -96,14 +101,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
101
|
version: '0'
|
97
102
|
requirements: []
|
98
103
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.5.1
|
100
105
|
signing_key:
|
101
106
|
specification_version: 4
|
102
107
|
summary: Make any method perfomed later.
|
103
108
|
test_files:
|
104
|
-
- test/cases/class_methods_always_test.rb
|
105
|
-
- test/cases/class_methods_on_demand_test.rb
|
106
|
-
- test/cases/instance_methods_on_demand_test.rb
|
107
|
-
- test/
|
109
|
+
- test/cases/classes/class_methods_always_test.rb
|
110
|
+
- test/cases/classes/class_methods_on_demand_test.rb
|
111
|
+
- test/cases/classes/instance_methods_on_demand_test.rb
|
112
|
+
- test/cases/modules/always_test.rb
|
113
|
+
- test/cases/modules/on_demand_test.rb
|
108
114
|
- test/helper.rb
|
109
|
-
|
115
|
+
- test/support/test_class.rb
|
116
|
+
- test/support/test_module.rb
|