postgres-pr 0.3.4 → 0.3.5

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/examples/og/test.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  $LOAD_PATH.unshift '../../lib'
2
- $LOAD_PATH.unshift '/tmp/og-0.5.0/lib'
2
+ require 'rubygems'
3
3
  require 'og'
4
4
  require 'glue/logger'
5
5
 
@@ -15,6 +15,9 @@ PROTO_VERSION = 3 << 16 #196608
15
15
 
16
16
  class Connection
17
17
 
18
+ # A block which is called with the NoticeResponse object as parameter.
19
+ attr_accessor :notice_processor
20
+
18
21
  def initialize(database, user, password=nil, uri = nil)
19
22
  uri ||= DEFAULT_URI
20
23
 
@@ -51,7 +54,7 @@ class Connection
51
54
  when ErrorResponse
52
55
  raise msg.field_values.join("\t")
53
56
  when NoticeResponse
54
- # TODO
57
+ @notice_processor.call(msg) if @notice_processor
55
58
  when ParameterStatus
56
59
  @params[msg.key] = msg.value
57
60
  when BackendKeyData
@@ -103,7 +106,7 @@ class Connection
103
106
  # TODO
104
107
  errors << msg
105
108
  when NoticeResponse
106
- p msg
109
+ @notice_processor.call(msg) if @notice_processor
107
110
  else
108
111
  # TODO
109
112
  end
@@ -1,3 +1,3 @@
1
1
  module PostgresPR
2
- Version = "0.3.4"
2
+ Version = "0.3.5"
3
3
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.4
3
3
  specification_version: 1
4
4
  name: postgres-pr
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.4
7
- date: 2005-01-09
6
+ version: 0.3.5
7
+ date: 2005-01-22
8
8
  summary: A pure Ruby interface to the PostgreSQL (>= 7.4) database
9
9
  require_paths:
10
10
  - lib