doozer 0.4.2 → 0.4.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.
- data/VERSION +1 -1
- data/doozer.gemspec +2 -2
- data/lib/doozer/mailer.rb +35 -6
- data/lib/doozer/task.rb +5 -0
- data/lib/doozer/version.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/doozer.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{doozer}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["grippy"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-07}
|
13
13
|
s.default_executable = %q{doozer}
|
14
14
|
s.description = %q{This GEM provides a small, barebones framework for creating MVC Rack applications.}
|
15
15
|
s.email = %q{gmelton@whorde.com}
|
data/lib/doozer/mailer.rb
CHANGED
@@ -213,21 +213,43 @@ module Doozer
|
|
213
213
|
include Object.const_get(Doozer::Lib.classify("#{helper}"))
|
214
214
|
end
|
215
215
|
|
216
|
-
# Call this method to
|
216
|
+
# Call this method to generate a Mailer#action instance
|
217
217
|
#
|
218
218
|
# Arguments
|
219
219
|
# - action: The action of the mailer to call passed as a symbol.
|
220
220
|
# - args: The mail arguments to initialize the email with.
|
221
221
|
# All remaining arguments are turned into instance variables and bound to the view.
|
222
|
-
|
223
|
-
|
224
|
-
def self.deliver(action, args={})
|
225
|
-
# puts "deliver.."
|
222
|
+
def self.generate(action, args={})
|
223
|
+
# puts "process.."
|
226
224
|
mailer = self.new(action, args)
|
227
225
|
mailer.method(action).call()
|
228
226
|
mailer.finished! #close the db connections
|
229
227
|
mailer.package
|
230
|
-
|
228
|
+
mailer
|
229
|
+
end
|
230
|
+
|
231
|
+
# Call this method to deliver a Mailer#action instance
|
232
|
+
#
|
233
|
+
# Arguments
|
234
|
+
# - action: The action of the mailer to call passed as a symbol.
|
235
|
+
# - args: The mail arguments to initialize the email with.
|
236
|
+
# All remaining arguments are turned into instance variables and bound to the view.
|
237
|
+
|
238
|
+
# Note: The send mechanism is empty and must be overriden in the calling application.
|
239
|
+
def self.deliver(action, args={})
|
240
|
+
# puts "deliver.."
|
241
|
+
send(generate(action, args))
|
242
|
+
end
|
243
|
+
|
244
|
+
# Call this method to queue a Mailer#action instance for defered sending
|
245
|
+
#
|
246
|
+
# Arguments
|
247
|
+
# - action: The action of the mailer to call passed as a symbol.
|
248
|
+
# - args: The mail arguments to initialize the email with.
|
249
|
+
# All remaining arguments are turned into instance variables and bound to the view.
|
250
|
+
def self.queue(action, args={})
|
251
|
+
# puts "save.."
|
252
|
+
save(generate(action, args))
|
231
253
|
end
|
232
254
|
|
233
255
|
# The send method must be overriden by the calling class.
|
@@ -236,6 +258,13 @@ module Doozer
|
|
236
258
|
# => You can access the mailer.envelope.encoded (tmail) object which handles all the encoding.
|
237
259
|
def self.send(mailer); end
|
238
260
|
|
261
|
+
# The save method must be overriden by the calling class.
|
262
|
+
#
|
263
|
+
# => Implement this method to serialize a mailer and store it in the db.
|
264
|
+
# => The mailer object passed to this mehod of the instance of the mailer.
|
265
|
+
# => You can access the mailer.envelope.encoded (tmail) object which handles all the encoding.
|
266
|
+
def self.save(mailer); end
|
267
|
+
|
239
268
|
private
|
240
269
|
def change_layout(sym)
|
241
270
|
if sym == :none
|
data/lib/doozer/task.rb
CHANGED
data/lib/doozer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doozer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- grippy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-07 00:00:00 -08:00
|
13
13
|
default_executable: doozer
|
14
14
|
dependencies: []
|
15
15
|
|