pg 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1,3 +1 @@
1
- ]���B���;�v>>�}!���;�)�I|�����<ٮOT$()�2mYoJꞳ�Uq��\��}bu3��&�;a
2
- -��9����9x7�>��C)�����CwB:
3
- ���@�����%RQ�#��R���C�m�B��m��5!{yU�:��5<�,�nA���R�yQ�l�ȵ�VZ��b�zcP#�����Y�A� ��m^:
1
+ �|ۺ����(;�eHt0���#i���"�L�8�e޼�Z �\x��@�`Y�c����s ��M�F�Ǵc~F�����m���D���R�,(��m���kH���j4��'Q�T��1�<SӉI�7�z35�?�f��Mؔ�v��5j������uNR`��!���c�`Ys89�|����������H�4:✺l��0I\w{s��޺�3T� 7�y�e)
data/BSDL ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (C) 1993-2010 Yukihiro Matsumoto. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
+ SUCH DAMAGE.
data/ChangeLog CHANGED
@@ -1,8 +1,71 @@
1
+ 2012-02-12 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * .hgtags:
4
+ Added tag v0.13.1 for changeset 9e60b2c477cd
5
+ [f20d1b488312] [tip]
6
+
7
+ * .hgsigs:
8
+ Added signature for changeset 1ba641824000
9
+ [9e60b2c477cd] [v0.13.1]
10
+
11
+ * .hoerc, History.rdoc, Manifest.txt, lib/pg.rb:
12
+ Bumped patch version, updated History, Manifest.
13
+ [1ba641824000]
14
+
15
+ * ext/pg_connection.c, spec/pg/connection_spec.rb:
16
+ Raise a rescue-able exception when a connection is used after it's
17
+ been closed. (fixes #110)
18
+ [679b1db2b430]
19
+
20
+ 2012-02-11 Lars Kanis <kanis@comcard.de>
21
+
22
+ * Rakefile:
23
+ allow overriding of RUBY_CC_VERSION
24
+ [a9b8576bb35c]
25
+
26
+ * Rakefile.cross:
27
+ update Postgresql download URL for cross compilation
28
+ [216d08f2bc92]
29
+
30
+ 2012-02-09 Michael Granger <ged@FaerieMUD.org>
31
+
32
+ * misc/postgres/README.txt, misc/postgres/lib/postgres.rb:
33
+ Fix the Google group email and bump the patch version
34
+ [64aa4a38059e] [github/master]
35
+
36
+ * .hgignore, misc/postgres/History.txt, misc/postgres/Manifest.txt,
37
+ misc/postgres/README.txt, misc/postgres/Rakefile,
38
+ misc/postgres/lib/postgres.rb:
39
+ Add a stub gem build for the deprecated 'postgres' gem
40
+ [62271bf75eac]
41
+
42
+ * .hgignore, misc/ruby-pg/History.txt, misc/ruby-pg/Manifest.txt, misc
43
+ /ruby-pg/README.txt, misc/ruby-pg/Rakefile, misc/ruby-
44
+ pg/lib/ruby/pg.rb:
45
+ Add a stub gem build for the deprecated 'ruby-pg' gem
46
+ [b7521150de9d]
47
+
48
+ * BSDL:
49
+ Add missing BSDL license file (fixes #108)
50
+ [4d629ff60589]
51
+
52
+ * History.rdoc:
53
+ Add the missing date to the History file
54
+ [29de189a4581]
55
+
56
+ * .hgtags:
57
+ Added tag v0.13.0 for changeset 7b2da7e0815c
58
+ [150ea5f80ee4]
59
+
60
+ * .hgsigs:
61
+ Added signature for changeset 9c262b875047
62
+ [7b2da7e0815c] [v0.13.0]
63
+
1
64
  2012-01-28 Michael Granger <ged@FaerieMUD.org>
2
65
 
3
66
  * .hgsigs:
4
67
  Added signature for changeset 0e7f0c2451e5
5
- [9c262b875047] [github/master, tip]
68
+ [9c262b875047]
6
69
 
7
70
  * ext/extconf.rb:
8
71
  Backed out the addition of `pg_config --libs` to the linked
@@ -1,4 +1,11 @@
1
- == v0.13.0 [] Michael Granger <ged@FaerieMUD.org>
1
+ == v0.13.1 [2012-02-12] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ - Made use of a finished PG::Connection raise a PG::Error instead of
4
+ a fatal error (#110).
5
+ - Added missing BSDL license file (#108)
6
+
7
+
8
+ == v0.13.0 [2012-02-09] Michael Granger <ged@FaerieMUD.org>
2
9
 
3
10
  Reorganization of modules/classes to be better Ruby citizens (with backward-compatible aliases):
4
11
  - Created toplevel namespace 'PG' to correspond with the gem name.
@@ -1,6 +1,5 @@
1
1
  .gemtest
2
- .hoerc
3
- .tm_properties
2
+ BSDL
4
3
  ChangeLog
5
4
  Contributors.rdoc
6
5
  History.rdoc
@@ -26,7 +25,6 @@ lib/pg/connection.rb
26
25
  lib/pg/constants.rb
27
26
  lib/pg/exceptions.rb
28
27
  lib/pg/result.rb
29
- misc/openssl-pg-segfault.rb
30
28
  sample/async_api.rb
31
29
  sample/async_copyto.rb
32
30
  sample/async_mixed.rb
data/Rakefile CHANGED
@@ -96,7 +96,7 @@ task :maint do
96
96
  ENV['MAINTAINER_MODE'] = 'yes'
97
97
  end
98
98
 
99
- ENV['RUBY_CC_VERSION'] = '1.8.7:1.9.2'
99
+ ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.2'
100
100
 
101
101
  # Rake-compiler task
102
102
  Rake::ExtensionTask.new do |ext|
@@ -41,8 +41,8 @@ OPENSSL_PATCHES = Rake::FileList[ MISCDIR + "openssl-#{OPENSSL_VERSIO
41
41
  # Static PostgreSQL build vars
42
42
  STATIC_POSTGRESQL_BUILDDIR = STATIC_BUILDDIR + "postgresql-#{POSTGRESQL_VERSION}"
43
43
  POSTGRESQL_SOURCE_URI = begin
44
- uristring = "http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/" +
45
- "v%s/postgresql-%s.tar.bz2" % [ POSTGRESQL_VERSION, POSTGRESQL_VERSION ]
44
+ uristring = "http://ftp.postgresql.org/pub/source/v%s/postgresql-%s.tar.bz2" %
45
+ [ POSTGRESQL_VERSION, POSTGRESQL_VERSION ]
46
46
  URI( uristring )
47
47
  end
48
48
  POSTGRESQL_TARBALL = STATIC_SOURCESDIR + File.basename( POSTGRESQL_SOURCE_URI.path )
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * pg_connection.c - PG::Connection class extension
3
- * $Id: pg_connection.c,v b67309d3ccf2 2012/01/27 04:14:07 ged $
3
+ * $Id: pg_connection.c,v 679b1db2b430 2012/02/12 20:50:47 ged $
4
4
  *
5
5
  */
6
6
 
@@ -46,7 +46,7 @@ pg_get_pgconn( VALUE self )
46
46
  PGconn *conn = pgconn_check( self );
47
47
 
48
48
  if ( !conn )
49
- rb_fatal( "Use of uninitialized PG::Connection." );
49
+ rb_raise( rb_ePGerror, "connection is closed" );
50
50
 
51
51
  return conn;
52
52
  }
data/lib/pg.rb CHANGED
@@ -19,10 +19,10 @@ end
19
19
  module PG
20
20
 
21
21
  # Library version
22
- VERSION = '0.13.0'
22
+ VERSION = '0.13.1'
23
23
 
24
24
  # VCS revision
25
- REVISION = %q$Revision: b2cd37832d02 $
25
+ REVISION = %q$Revision: 1ba641824000 $
26
26
 
27
27
 
28
28
  ### Get the PG library version. If +include_buildnum+ is +true+, include the build ID.
@@ -672,6 +672,13 @@ describe PG::Connection do
672
672
  result.should == { 'one' => '47' }
673
673
  end
674
674
 
675
+ it "raises a rescue-able error if #finish is called twice", :without_transaction do
676
+ conn = PG.connect( @conninfo )
677
+
678
+ conn.finish
679
+ expect { conn.finish }.to raise_error( PG::Error, /connection is closed/i )
680
+ end
681
+
675
682
 
676
683
  describe "multinationalization support", :ruby_19 => true do
677
684
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -48,11 +48,11 @@ cert_chain:
48
48
  -----END CERTIFICATE-----
49
49
 
50
50
  '
51
- date: 2012-02-09 00:00:00.000000000 Z
51
+ date: 2012-02-12 00:00:00.000000000 Z
52
52
  dependencies:
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: hoe-mercurial
55
- requirement: &70298899246740 !ruby/object:Gem::Requirement
55
+ requirement: &70289989983200 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: 1.3.1
61
61
  type: :development
62
62
  prerelease: false
63
- version_requirements: *70298899246740
63
+ version_requirements: *70289989983200
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: hoe-highline
66
- requirement: &70298899245760 !ruby/object:Gem::Requirement
66
+ requirement: &70289989982740 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: 0.0.1
72
72
  type: :development
73
73
  prerelease: false
74
- version_requirements: *70298899245760
74
+ version_requirements: *70289989982740
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rake-compiler
77
- requirement: &70298899245120 !ruby/object:Gem::Requirement
77
+ requirement: &70289989982280 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: '0.7'
83
83
  type: :development
84
84
  prerelease: false
85
- version_requirements: *70298899245120
85
+ version_requirements: *70289989982280
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: rspec
88
- requirement: &70298899244460 !ruby/object:Gem::Requirement
88
+ requirement: &70289989998220 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: '2.6'
94
94
  type: :development
95
95
  prerelease: false
96
- version_requirements: *70298899244460
96
+ version_requirements: *70289989998220
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rdoc
99
- requirement: &70298899243860 !ruby/object:Gem::Requirement
99
+ requirement: &70289989997800 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ~>
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: '3.10'
105
105
  type: :development
106
106
  prerelease: false
107
- version_requirements: *70298899243860
107
+ version_requirements: *70289989997800
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: hoe
110
- requirement: &70298899243200 !ruby/object:Gem::Requirement
110
+ requirement: &70289989996860 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,7 +115,7 @@ dependencies:
115
115
  version: '2.13'
116
116
  type: :development
117
117
  prerelease: false
118
- version_requirements: *70298899243200
118
+ version_requirements: *70289989996860
119
119
  description: ! "Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].\n\nIt
120
120
  works with {PostgreSQL 8.3 and later}[http://bit.ly/6AfPhm].\n\nA small example
121
121
  usage:\n\n #!/usr/bin/env ruby\n \n require 'pg'\n \n # Output a table of current
@@ -143,8 +143,7 @@ extra_rdoc_files:
143
143
  - ext/pg_result.c
144
144
  files:
145
145
  - .gemtest
146
- - .hoerc
147
- - .tm_properties
146
+ - BSDL
148
147
  - ChangeLog
149
148
  - Contributors.rdoc
150
149
  - History.rdoc
@@ -170,7 +169,6 @@ files:
170
169
  - lib/pg/constants.rb
171
170
  - lib/pg/exceptions.rb
172
171
  - lib/pg/result.rb
173
- - misc/openssl-pg-segfault.rb
174
172
  - sample/async_api.rb
175
173
  - sample/async_copyto.rb
176
174
  - sample/async_mixed.rb
metadata.gz.sig CHANGED
Binary file
data/.hoerc DELETED
@@ -1,2 +0,0 @@
1
- ---
2
- exclude: !ruby/regexp /\.(hg|DS_Store|rvm.*|irbrc|pryrc)|(coverage|manual|tmp\w*)\/|\.(bundle|so)$/
@@ -1,12 +0,0 @@
1
- # Settings
2
- projectDirectory = "$CWD"
3
- windowTitle = "${CWD/^.*\///} «$TM_DISPLAYNAME»"
4
- excludeInFileChooser = "{$exclude,.hg}"
5
-
6
- TM_MAKE = 'rake'
7
- TM_MAKE_FILE = '${projectDirectory}/Rakefile'
8
-
9
- [ source ]
10
- softTabs = false
11
- tabSize = 4
12
-
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- PGHOST = 'localhost'
4
- PGDB = 'test'
5
- #SOCKHOST = 'github.com'
6
- SOCKHOST = 'it-trac.laika.com'
7
-
8
- # Load pg first, so the libssl.so that libpq is linked against is loaded.
9
- require 'pg'
10
- $stderr.puts "connecting to postgres://#{PGHOST}/#{PGDB}"
11
- conn = PG.connect( PGHOST, :dbname => PGDB )
12
-
13
- # Now load OpenSSL, which might be linked against a different libssl.
14
- require 'socket'
15
- require 'openssl'
16
- $stderr.puts "Connecting to #{SOCKHOST}"
17
- sock = TCPSocket.open( SOCKHOST, 443 )
18
- ctx = OpenSSL::SSL::SSLContext.new
19
- sock = OpenSSL::SSL::SSLSocket.new( sock, ctx )
20
- sock.sync_close = true
21
-
22
- # The moment of truth...
23
- $stderr.puts "Attempting to connect..."
24
- begin
25
- sock.connect
26
- rescue Errno
27
- $stderr.puts "Got an error connecting, but no segfault."
28
- else
29
- $stderr.puts "Nope, no segfault!"
30
- end
31
-