pg 0.13.0 → 0.13.1
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.tar.gz.sig +1 -3
- data/BSDL +22 -0
- data/ChangeLog +64 -1
- data/History.rdoc +8 -1
- data/Manifest.txt +1 -3
- data/Rakefile +1 -1
- data/Rakefile.cross +2 -2
- data/ext/pg_connection.c +2 -2
- data/lib/pg.rb +2 -2
- data/spec/pg/connection_spec.rb +7 -0
- metadata +15 -17
- metadata.gz.sig +0 -0
- data/.hoerc +0 -2
- data/.tm_properties +0 -12
- data/misc/openssl-pg-segfault.rb +0 -31
data.tar.gz.sig
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
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�z�35�?�f��Mؔ�v��5j������uN�R`��!���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]
|
|
68
|
+
[9c262b875047]
|
|
6
69
|
|
|
7
70
|
* ext/extconf.rb:
|
|
8
71
|
Backed out the addition of `pg_config --libs` to the linked
|
data/History.rdoc
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
== v0.13.
|
|
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.
|
data/Manifest.txt
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.gemtest
|
|
2
|
-
|
|
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
data/Rakefile.cross
CHANGED
|
@@ -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://
|
|
45
|
-
|
|
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 )
|
data/ext/pg_connection.c
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* pg_connection.c - PG::Connection class extension
|
|
3
|
-
* $Id: pg_connection.c,v
|
|
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
|
-
|
|
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.
|
|
22
|
+
VERSION = '0.13.1'
|
|
23
23
|
|
|
24
24
|
# VCS revision
|
|
25
|
-
REVISION = %q$Revision:
|
|
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.
|
data/spec/pg/connection_spec.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
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: &
|
|
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: *
|
|
63
|
+
version_requirements: *70289989983200
|
|
64
64
|
- !ruby/object:Gem::Dependency
|
|
65
65
|
name: hoe-highline
|
|
66
|
-
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: *
|
|
74
|
+
version_requirements: *70289989982740
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
76
|
name: rake-compiler
|
|
77
|
-
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: *
|
|
85
|
+
version_requirements: *70289989982280
|
|
86
86
|
- !ruby/object:Gem::Dependency
|
|
87
87
|
name: rspec
|
|
88
|
-
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: *
|
|
96
|
+
version_requirements: *70289989998220
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: rdoc
|
|
99
|
-
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: *
|
|
107
|
+
version_requirements: *70289989997800
|
|
108
108
|
- !ruby/object:Gem::Dependency
|
|
109
109
|
name: hoe
|
|
110
|
-
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: *
|
|
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
|
-
-
|
|
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
data/.tm_properties
DELETED
data/misc/openssl-pg-segfault.rb
DELETED
|
@@ -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
|
-
|