threadless 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/threadless.rb +11 -1
- data/threadless.gemspec +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/threadless.rb
CHANGED
@@ -8,6 +8,16 @@ class Threadless
|
|
8
8
|
@threadless ||= Adapter.new(request)
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
12
|
+
def self.background?(m)
|
13
|
+
@background
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.background=(m)
|
17
|
+
@background = m
|
18
|
+
end
|
19
|
+
|
20
|
+
self.background = true
|
11
21
|
|
12
22
|
#
|
13
23
|
# The adapter; use it as
|
@@ -22,7 +32,7 @@ class Threadless
|
|
22
32
|
end
|
23
33
|
|
24
34
|
def run_later(run_later = true)
|
25
|
-
if run_later
|
35
|
+
if run_later && Threadless.background?
|
26
36
|
@request.env[ENV_KEY] ||= []
|
27
37
|
@request.env[ENV_KEY].push Proc.new
|
28
38
|
else
|
data/threadless.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{threadless}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["pboy"]
|
9
|
-
s.date = %q{2009-12-
|
9
|
+
s.date = %q{2009-12-19}
|
10
10
|
s.description = %q{run_later without threads}
|
11
11
|
s.email = %q{eno-pboy@open-lab.org}
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/threadless.rb"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: threadless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pboy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-19 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|