ap4r 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,5 +1,9 @@
1
1
  == 0.3.x
2
2
 
3
+ === 0.3.5 (November 29, 2007)
4
+ * Fixed: bug that SAF transaction is NOT guaranteed when some models are created/updated
5
+ before using of ap4r.async_to API in ap4r.transaction block.
6
+
3
7
  === 0.3.4 (October 31, 2007)
4
8
  * Added: Support ActiveRecord as reliable RDBMS persistence.
5
9
  * Added: Capistrano recipes.
@@ -17,10 +21,10 @@
17
21
  * Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE.
18
22
  * Added: Dynamic configuration with ERb.
19
23
  * Added: Script to run AP4R on Mongrel.
20
- * Changed: How to plugin and main API names have changed.
21
- * Added: Support of several Content-type on asynchronous call.
24
+ * Changed: How to plugin and main API names have changed.
25
+ * Added: Support of several Content-type on asynchronous call.
22
26
  * Added: Block style for async_to.
23
- * Added: Url rewrite filter.
27
+ * Added: Url rewrite filter.
24
28
 
25
29
  === 0.3.1 (April 24th, 2007)
26
30
 
@@ -31,7 +31,7 @@ module Ap4r
31
31
 
32
32
  def dumped_headers
33
33
  # The warning occurs when putting backslash into binaly type in PostgreSQL.
34
- if "postgresql" == Ap4r::StoredMessage.establish_connection.config[:adapter]
34
+ if postgresql?
35
35
  self.headers
36
36
  else
37
37
  Marshal::dump(self.headers)
@@ -40,7 +40,7 @@ module Ap4r
40
40
 
41
41
  def dumped_object
42
42
  # The warning occurs when putting backslash into binaly type in PostgreSQL.
43
- if "postgresql" == Ap4r::StoredMessage.establish_connection.config[:adapter]
43
+ if postgresql?
44
44
  self.object
45
45
  else
46
46
  Marshal::dump(self.object)
@@ -63,7 +63,7 @@ module Ap4r
63
63
  s.status = STATUS_STORED
64
64
 
65
65
  # The warning occurs when putting backslash into binaly type in PostgreSQL.
66
- if "postgresql" == Ap4r::StoredMessage.establish_connection.config[:adapter]
66
+ if postgresql?
67
67
  s.object = YAML.dump(queue_message)
68
68
  s.headers = YAML.dump(rm_options)
69
69
  else
@@ -98,6 +98,10 @@ module Ap4r
98
98
  result.destroy_or_update(options)
99
99
  end
100
100
 
101
+ def self.postgresql?
102
+ "PostgreSQL" == Ap4r::StoredMessage.connection.adapter_name
103
+ end
104
+
101
105
  def destroy_or_update(options = {:delete_mode => PHYSICAL})
102
106
  case options[:delete_mode]
103
107
  when PHYSICAL
@@ -184,7 +188,7 @@ module Ap4r
184
188
  queue_name = self.queue
185
189
 
186
190
  # The warning occurs when putting backslash into binaly type in PostgreSQL.
187
- if "postgresql" == Ap4r::StoredMessage.establish_connection.config[:adapter]
191
+ if self.class.postgresql?
188
192
  queue_headers = YAML.load(self.headers)
189
193
  queue_messages = YAML.load(self.object)
190
194
  else
data/lib/ap4r/version.rb CHANGED
@@ -3,12 +3,12 @@
3
3
  # Licence:: MIT Licence
4
4
 
5
5
  module Ap4r
6
- # Defines version number contants, and provides
6
+ # Defines version number contants, and provides
7
7
  # its string expression.
8
8
  module VERSION #:nodoc:
9
9
  MAJOR = 0
10
10
  MINOR = 3
11
- TINY = 4
11
+ TINY = 5
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY].join('.')
14
14
  end
@@ -30,7 +30,7 @@ module Ap4r #:nodoc:
30
30
  @controller = controller
31
31
  end
32
32
 
33
- def_delegators :@controller, :logger, :url_for
33
+ def_delegators :@controller, :logger, :url_for, :controller_path
34
34
 
35
35
  # Queue a message for next asynchronous logic. Some options are supported.
36
36
  #
@@ -193,7 +193,7 @@ module Ap4r
193
193
  super
194
194
 
195
195
  @url_options ||= {}
196
- @url_options[:controller] ||= @controller.controller_path.gsub("/", ".")
196
+ @url_options[:controller] ||= @url_for_handler.controller_path.gsub("/", ".")
197
197
  @url_options[:url] ||= {:controller => url_options[:controller], :action => url_options[:action]}
198
198
  @url_options[:url][:controller] ||= url_options[:controller] if url_options[:url].kind_of?(Hash)
199
199
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: ap4r
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.4
7
- date: 2007-10-31 00:00:00 +09:00
6
+ version: 0.3.5
7
+ date: 2007-11-29 00:00:00 +09:00
8
8
  summary: Asynchronous Processing for Ruby.
9
9
  require_paths:
10
10
  - lib