pg 0.20.0 → 0.21.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 642890442c08990cf445b8926d7bdde94d965081
4
- data.tar.gz: 21af86e5b1fb03b33a5d1002fe2fe036730d8a05
3
+ metadata.gz: d459edbf441a30095d92512f986194a7e183efe9
4
+ data.tar.gz: 90ba3a4e5b506aa68d9addab7e8af76f5efcee8e
5
5
  SHA512:
6
- metadata.gz: fce3aaff228c7e971ca888b55c434805a7514ea88fb5a7f4a7ceabe7adbbaf8c2f41b0e0a38806c9c9f6d11262d003874814efc15476a1666051fd51dd3bd632
7
- data.tar.gz: e2b4278db901f0ce1be9d1694faa215358a593f4a8f602e9914183cad61ccc2982ff076e1a47e7aacf3b80333aa2a070619803da8dbe92362b18e4e5ea02b541
6
+ metadata.gz: 0212d8cb8cd8a29ab8f120d6d1c4a90087107fd273785b53fa6b59e1583c48eb350420a53132a51ab6e9c1d10ccb821fa2924b850b14fbf8a759fe915d73251b
7
+ data.tar.gz: b3bbd17f06fb3ab2a7864bbdeeead245c7f47348c618e39fb732f20b58f46591bac774844438fe410c96fbd460dbaa204c705e1617d62a4c74d3da18e425c001
Binary file
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,8 +1,89 @@
1
+ 2017-06-12 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * Closing branch.
4
+ [d199582de47f] [tip] <olleolleolle/readmerdoc-use-svg-for-travis-build-badg-1489403729779>
5
+
6
+ * Merge with bitbucket upstream
7
+ [7cb095bb8e34]
8
+
9
+ 2017-06-12 Lars Kanis <lars@greiz-reinsdorf.de>
10
+
11
+ * Merged in olleolleolle/ruby-pg/olleolleolle/readmerdoc-use-svg-for-
12
+ travis-build-badg-1489403729779 (pull request #24)
13
+
14
+ README.rdoc: use SVG for Travis build badge
15
+ [97eca85fc660]
16
+
17
+ 2017-03-13 Olle Jonsson <olle.jonsson@gmail.com>
18
+
19
+ * README.rdoc:
20
+ README.rdoc: use SVG for Travis build badge
21
+ [75dcedbff32e] <olleolleolle/readmerdoc-use-svg-for-travis-build-badg-1489403729779>
22
+
23
+ 2017-06-12 Michael Granger <ged@FaerieMUD.org>
24
+
25
+ * .hgignore, .hoerc, History.rdoc, Manifest.txt, lib/pg.rb:
26
+ Bunp minor version, update history, fix manifest/ignore files
27
+ [4729196c11cb]
28
+
29
+ * Merged with bitbucket default
30
+ [f6063a34ae2b]
31
+
32
+ 2017-04-07 Lars Kanis <lars@greiz-reinsdorf.de>
33
+
34
+ * lib/pg.rb:
35
+ Move add_dll_directory to the Runtime namespace.
36
+
37
+ RubyInstaller::Runtime.add_dll_directory is deprecated with
38
+ rubyinstaller-2.4.1-1rc1.
39
+ [050a996456b1]
40
+
41
+ 2017-05-31 Michael Granger <ged@FaerieMUD.org>
42
+
43
+ * Rakefile, lib/pg.rb, lib/pg/connection.rb,
44
+ lib/pg/deprecated_constants.rb, lib/pg/result.rb, pg.gemspec:
45
+ Deprecate the old PGconn, PGresult, and PGError constants.
46
+ [3ce331d8c88e]
47
+
48
+ 2017-06-01 Michael Granger <ged@FaerieMUD.org>
49
+
50
+ * ext/pg_result.c, pg.gemspec, sample/copydata.rb:
51
+ Fix the docs for PG::Result#cmd_tuples
52
+
53
+ Also add an example of the nicer #copy_data way of doing `COPY`.
54
+ [c4a1abc36c47]
55
+
56
+ 2017-03-13 Michael Granger <ged@FaerieMUD.org>
57
+
58
+ * .gems, .rvm.gems, Rakefile, pg.gemspec:
59
+ Update dependencies to latest versions
60
+ [8a15026cfe77]
61
+
62
+ * .hgignore:
63
+ Ignore bundler vendor directory
64
+ [fff7debf0630]
65
+
66
+ * Rakefile.cross:
67
+ Bump Postgresql version for windows binary to 9.6.2
68
+ [11296e69a17f]
69
+
1
70
  2017-03-10 Michael Granger <ged@FaerieMUD.org>
2
71
 
72
+ * .hgtags:
73
+ Added tag v0.20.0 for changeset e5eb92cca97a
74
+ [409cae555174]
75
+
76
+ * .hgsigs:
77
+ Added signature for changeset 838985377b48
78
+ [e5eb92cca97a] [v0.20.0]
79
+
80
+ * History.rdoc, lib/pg.rb, pg.gemspec:
81
+ Bump the minor version, update history.
82
+ [838985377b48]
83
+
3
84
  * .hgignore:
4
85
  Ignore .lock files
5
- [379c198c7185] [tip]
86
+ [379c198c7185]
6
87
 
7
88
  2017-02-16 Lars Kanis <lars@greiz-reinsdorf.de>
8
89
 
@@ -1,3 +1,16 @@
1
+ == v0.21.0 [2017-06-12] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Enhancements:
4
+ - Move add_dll_directory to the Runtime namespace for newest versions
5
+ of RubyInstaller.
6
+ - Deprecate PGconn, PGresult, and PGError top-level constants; a warning
7
+ will be output the first time one of them is used. They will be
8
+ removed in the upcoming 1.0 release.
9
+
10
+ Documentation fixes:
11
+ - Update the docs for PG::Result#cmd_tuples
12
+
13
+
1
14
  == v0.20.0 [2017-03-10] Michael Granger <ged@FaerieMUD.org>
2
15
 
3
16
  Enhancements:
@@ -46,29 +46,12 @@ lib/pg/basic_type_mapping.rb
46
46
  lib/pg/coder.rb
47
47
  lib/pg/connection.rb
48
48
  lib/pg/constants.rb
49
+ lib/pg/deprecated_constants.rb
49
50
  lib/pg/exceptions.rb
50
51
  lib/pg/result.rb
51
52
  lib/pg/text_decoder.rb
52
53
  lib/pg/text_encoder.rb
53
54
  lib/pg/type_map_by_column.rb
54
- sample/array_insert.rb
55
- sample/async_api.rb
56
- sample/async_copyto.rb
57
- sample/async_mixed.rb
58
- sample/check_conn.rb
59
- sample/copyfrom.rb
60
- sample/copyto.rb
61
- sample/cursor.rb
62
- sample/disk_usage_report.rb
63
- sample/issue-119.rb
64
- sample/losample.rb
65
- sample/minimal-testcase.rb
66
- sample/notify_wait.rb
67
- sample/pg_statistics.rb
68
- sample/replication_monitor.rb
69
- sample/test_binary_values.rb
70
- sample/wal_shipper.rb
71
- sample/warehouse_partitions.rb
72
55
  spec/data/expected_trace.out
73
56
  spec/data/random_binary_data
74
57
  spec/helpers.rb
@@ -31,7 +31,7 @@ A small example usage:
31
31
 
32
32
  == Build Status
33
33
 
34
- {<img src="https://travis-ci.org/ged/ruby-pg.png?branch=master" alt="Build Status Travis-CI" />}[https://travis-ci.org/ged/ruby-pg]
34
+ {<img src="https://travis-ci.org/ged/ruby-pg.svg?branch=master" alt="Build Status Travis-CI" />}[https://travis-ci.org/ged/ruby-pg]
35
35
  {<img src="https://ci.appveyor.com/api/projects/status/at4g4swb2cd4xji7/branch/master?svg=true" alt="Build Status Appveyor" />}[https://ci.appveyor.com/project/ged/ruby-pg]
36
36
 
37
37
 
data/Rakefile CHANGED
@@ -60,12 +60,12 @@ $hoespec = Hoe.spec 'pg' do
60
60
  self.developer 'Michael Granger', 'ged@FaerieMUD.org'
61
61
  self.developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
62
62
 
63
- self.dependency 'rake-compiler', '~> 1.0.3', :developer
64
- self.dependency 'rake-compiler-dock', '~> 0.6.0', :developer
65
- self.dependency 'hoe', '~> 3.12', :developer
66
- self.dependency 'hoe-deveiate', '~> 0.6', :developer
63
+ self.dependency 'rake-compiler', '~> 1.0', :developer
64
+ self.dependency 'rake-compiler-dock', '~> 0.6', :developer
65
+ self.dependency 'hoe-deveiate', '~> 0.9', :developer
67
66
  self.dependency 'hoe-bundler', '~> 1.0', :developer
68
- self.dependency 'rspec', '~> 3.0', :developer
67
+ self.dependency 'rspec', '~> 3.5', :developer
68
+ self.dependency 'rdoc', '~> 5.1', :developer
69
69
 
70
70
  self.spec_extras[:extensions] = [ 'ext/extconf.rb' ]
71
71
 
@@ -30,7 +30,7 @@ class CrossLibrary < OpenStruct
30
30
 
31
31
  # Cross-compilation constants
32
32
  self.openssl_version = ENV['OPENSSL_VERSION'] || '1.0.2j'
33
- self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.6.1'
33
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '9.6.2'
34
34
 
35
35
  # Check if symlinks work in the current working directory.
36
36
  # This fails, if rake-compiler-dock is running on a Windows box.
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * pg_result.c - PG::Result class extension
3
- * $Id: pg_result.c,v 2e17f315848e 2017/01/14 20:05:06 lars $
3
+ * $Id: pg_result.c,v c4a1abc36c47 2017/06/02 01:00:09 ged $
4
4
  *
5
5
  */
6
6
 
@@ -772,11 +772,17 @@ pgresult_cmd_status(VALUE self)
772
772
  * Returns the number of tuples (rows) affected by the SQL command.
773
773
  *
774
774
  * If the SQL command that generated the PG::Result was not one of:
775
- * * +INSERT+
776
- * * +UPDATE+
777
- * * +DELETE+
778
- * * +MOVE+
779
- * * +FETCH+
775
+ *
776
+ * * <tt>SELECT</tt>
777
+ * * <tt>CREATE TABLE AS</tt>
778
+ * * <tt>INSERT</tt>
779
+ * * <tt>UPDATE</tt>
780
+ * * <tt>DELETE</tt>
781
+ * * <tt>MOVE</tt>
782
+ * * <tt>FETCH</tt>
783
+ * * <tt>COPY</tt>
784
+ * * an +EXECUTE+ of a prepared query that contains an +INSERT+, +UPDATE+, or +DELETE+ statement
785
+ *
780
786
  * or if no tuples were affected, <tt>0</tt> is returned.
781
787
  */
782
788
  static VALUE
data/lib/pg.rb CHANGED
@@ -10,8 +10,8 @@ rescue LoadError
10
10
 
11
11
  add_dll_path = proc do |path, &block|
12
12
  begin
13
- require 'ruby_installer'
14
- RubyInstaller.add_dll_directory(path, &block)
13
+ require 'ruby_installer/runtime'
14
+ RubyInstaller::Runtime.add_dll_directory(path, &block)
15
15
  rescue LoadError
16
16
  old_path = ENV['PATH']
17
17
  ENV['PATH'] = "#{path};#{old_path}"
@@ -35,10 +35,10 @@ end
35
35
  module PG
36
36
 
37
37
  # Library version
38
- VERSION = '0.20.0'
38
+ VERSION = '0.21.0'
39
39
 
40
40
  # VCS revision
41
- REVISION = %q$Revision: 838985377b48 $
41
+ REVISION = %q$Revision: f6063a34ae2b $
42
42
 
43
43
  class NotAllCopyDataRetrieved < PG::Error
44
44
  end
@@ -70,5 +70,7 @@ module PG
70
70
  end # module PG
71
71
 
72
72
 
73
- # Backward-compatible aliase
74
- PGError = PG::Error
73
+ autoload :PGError, 'pg/deprecated_constants'
74
+ autoload :PGconn, 'pg/deprecated_constants'
75
+ autoload :PGresult, 'pg/deprecated_constants'
76
+
@@ -265,7 +265,3 @@ class PG::Connection
265
265
 
266
266
  end # class PG::Connection
267
267
 
268
- # :stopdoc:
269
- # Backward-compatible alias
270
- PGconn = PG::Connection
271
-
@@ -0,0 +1,21 @@
1
+ # -*- ruby -*-
2
+ #encoding: utf-8
3
+
4
+ # Warn about use of deprecated constants when this is autoloaded
5
+ callsite = caller(3).first
6
+
7
+ warn <<END_OF_WARNING
8
+ The PGconn, PGresult, and PGError constants are deprecated, and will be
9
+ removed as of version 1.0.
10
+
11
+ You should use PG::Connection, PG::Result, and PG::Error instead, respectively.
12
+
13
+ Called from #{callsite}
14
+ END_OF_WARNING
15
+
16
+
17
+
18
+ PGconn = PG::Connection
19
+ PGresult = PG::Result
20
+ PGError = PG::Error
21
+
@@ -29,6 +29,3 @@ class PG::Result
29
29
 
30
30
  end # class PG::Result
31
31
 
32
- # :stopdoc:
33
- # Backward-compatible alias
34
- PGresult = PG::Result
@@ -100,11 +100,11 @@ describe PG::Result do
100
100
  expect( res[0]['n'] ).to be_nil()
101
101
  end
102
102
 
103
- it "encapsulates errors in a PGError object" do
103
+ it "encapsulates errors in a PG::Error object" do
104
104
  exception = nil
105
105
  begin
106
106
  @conn.exec( "SELECT * FROM nonexistant_table" )
107
- rescue PGError => err
107
+ rescue PG::Error => err
108
108
  exception = err
109
109
  end
110
110
 
@@ -136,7 +136,7 @@ describe PG::Result do
136
136
  exception = nil
137
137
  begin
138
138
  @conn.exec( "INSERT INTO integrity VALUES (NULL)" )
139
- rescue PGError => err
139
+ rescue PG::Error => err
140
140
  exception = err
141
141
  end
142
142
  result = exception.result
@@ -152,7 +152,7 @@ describe PG::Result do
152
152
  sqlstate = nil
153
153
  begin
154
154
  res = @conn.exec("SELECT 1/0")
155
- rescue PGError => e
155
+ rescue PG::Error => e
156
156
  sqlstate = e.result.result_error_field( PG::PG_DIAG_SQLSTATE ).to_i
157
157
  end
158
158
  expect( sqlstate ).to eq( 22012 )
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.20.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -36,7 +36,7 @@ cert_chain:
36
36
  w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
37
37
  p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
38
38
  -----END CERTIFICATE-----
39
- date: 2017-03-10 00:00:00.000000000 Z
39
+ date: 2017-06-12 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: hoe-mercurial
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.7'
61
+ version: '0.9'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.7'
68
+ version: '0.9'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: hoe-highline
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,89 +81,89 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.2'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rdoc
84
+ name: rake-compiler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '4.0'
89
+ version: '1.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '4.0'
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rake-compiler
98
+ name: rake-compiler-dock
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.0.3
103
+ version: '0.6'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.0.3
110
+ version: '0.6'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rake-compiler-dock
112
+ name: hoe-bundler
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.6.0
117
+ version: '1.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.6.0
124
+ version: '1.0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: hoe
126
+ name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '3.12'
131
+ version: '3.5'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.12'
138
+ version: '3.5'
139
139
  - !ruby/object:Gem::Dependency
140
- name: hoe-bundler
140
+ name: rdoc
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.0'
145
+ version: '5.1'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.0'
152
+ version: '5.1'
153
153
  - !ruby/object:Gem::Dependency
154
- name: rspec
154
+ name: hoe
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '3.0'
159
+ version: '3.16'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '3.0'
166
+ version: '3.16'
167
167
  description: |-
168
168
  Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].
169
169
 
@@ -269,29 +269,12 @@ files:
269
269
  - lib/pg/coder.rb
270
270
  - lib/pg/connection.rb
271
271
  - lib/pg/constants.rb
272
+ - lib/pg/deprecated_constants.rb
272
273
  - lib/pg/exceptions.rb
273
274
  - lib/pg/result.rb
274
275
  - lib/pg/text_decoder.rb
275
276
  - lib/pg/text_encoder.rb
276
277
  - lib/pg/type_map_by_column.rb
277
- - sample/array_insert.rb
278
- - sample/async_api.rb
279
- - sample/async_copyto.rb
280
- - sample/async_mixed.rb
281
- - sample/check_conn.rb
282
- - sample/copyfrom.rb
283
- - sample/copyto.rb
284
- - sample/cursor.rb
285
- - sample/disk_usage_report.rb
286
- - sample/issue-119.rb
287
- - sample/losample.rb
288
- - sample/minimal-testcase.rb
289
- - sample/notify_wait.rb
290
- - sample/pg_statistics.rb
291
- - sample/replication_monitor.rb
292
- - sample/test_binary_values.rb
293
- - sample/wal_shipper.rb
294
- - sample/warehouse_partitions.rb
295
278
  - spec/data/expected_trace.out
296
279
  - spec/data/random_binary_data
297
280
  - spec/helpers.rb
@@ -328,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
328
311
  version: '0'
329
312
  requirements: []
330
313
  rubyforge_project:
331
- rubygems_version: 2.6.2
314
+ rubygems_version: 2.6.12
332
315
  signing_key:
333
316
  specification_version: 4
334
317
  summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]