pg 1.3.2-x86-mingw32 → 1.3.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b2d524251b3c5c9dc707282858b33d6a58af1343e665022b215a44779416ff9
4
- data.tar.gz: 76ca33a83b6eb375fa8929c5043685db3a67cbdf90bb944e70be2b9a81e56fe6
3
+ metadata.gz: 1d5da0cfcf68e16db9a1c11999e660d57e7434c8d1dd3c326ee490a1d4e10e06
4
+ data.tar.gz: 472237ce516723618f6c544e057284227fb8a36ee4ed4a599eed0b0654c14828
5
5
  SHA512:
6
- metadata.gz: 85993b177e54786984bbe8ab450dabb187526511ecc9667514692bbb037f562a31b3366931aa5a9c6f46630975c380de23a0413214c46dd19e16d4ff21cd326a
7
- data.tar.gz: 1ec89aad7c3823abf649501dd9ad66748bdff8826a04163d5ce9c74b60999be747acdd60aa9a334cdad20f484d210544594f2ed4dcfee549d754a5bd4b622ba0
6
+ metadata.gz: aab78a4df6b198a9a0c4c541bcdde42fe2f3b9f6e7b5a0a1cec1350303e94f9c978052a32bd88dca77e101d94f87875fb1178afc9d216d8e50b54cccfb4b5cb7
7
+ data.tar.gz: 467a38ea236eb7ff2f1fcd6d85001b7730273347b7676e74775abf770c24129ede5ff333e3e4df720313a7e8d7b26ead79384c05e23a9f34f848fe3cecec789b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -56,7 +56,7 @@ jobs:
56
56
  steps:
57
57
  - uses: actions/checkout@v2
58
58
  - name: Set up Ruby
59
- uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
59
+ uses: ruby/setup-ruby@v1
60
60
  with:
61
61
  ruby-version: ${{ matrix.ruby }}
62
62
 
@@ -35,8 +35,8 @@ jobs:
35
35
  PGVER: "14"
36
36
  - os: windows
37
37
  ruby: "2.5"
38
- PGVERSION: 9.3.25-1-windows-x64
39
- PGVER: "9.3"
38
+ PGVERSION: 9.4.26-1-windows-x64
39
+ PGVER: "9.4"
40
40
  - os: ubuntu
41
41
  ruby: "head"
42
42
  PGVER: "14"
@@ -65,7 +65,7 @@ jobs:
65
65
  steps:
66
66
  - uses: actions/checkout@v2
67
67
  - name: Set up Ruby
68
- uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
68
+ uses: ruby/setup-ruby@v1
69
69
  with:
70
70
  ruby-version: ${{ matrix.ruby }}
71
71
 
@@ -116,7 +116,6 @@ jobs:
116
116
  - run: gem install --local *.gem --verbose
117
117
 
118
118
  - name: Run specs
119
- continue-on-error: ${{ matrix.ruby == 'truffleruby-head' }}
120
119
  env:
121
120
  PG_DEBUG: 0
122
121
  run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc
data/History.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ == v1.3.3 [2022-02-22] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ Bugfixes:
4
+
5
+ - Fix omission of the third digit of IPv4 addresses in connection URI. #435
6
+ - Fix wrong permission of certs/larskanis-2022.pem in the pg-1.3.2.gem. #432
7
+
8
+
1
9
  == v1.3.2 [2022-02-14] Lars Kanis <lars@greiz-reinsdorf.de>
2
10
 
3
11
  Bugfixes:
@@ -55,7 +63,7 @@ API Enhancements:
55
63
  - Run Connection.ping in a second thread.
56
64
  - Make discard_results scheduler friendly
57
65
  - Do all socket waiting through the conn.socket_io object.
58
- - Avoid PG.connect blocking while address resolution by automatically providing the +hostaddr+ parameter.
66
+ - Avoid PG.connect blocking while address resolution by automatically providing the +hostaddr+ parameter and resolving in Ruby instead of libpq.
59
67
  - On Windows Fiber.scheduler support requires Ruby-3.1+.
60
68
  It is also only partly usable since may ruby IO methods are not yet scheduler aware on Windows.
61
69
  - Add support for pipeline mode of PostgreSQL-14. #401
data/Rakefile.cross CHANGED
@@ -7,6 +7,7 @@ require 'rake/clean'
7
7
  require 'rake/extensiontask'
8
8
  require 'rake/extensioncompiler'
9
9
  require 'ostruct'
10
+ require_relative 'rakelib/task_extension'
10
11
 
11
12
  MISCDIR = BASEDIR + 'misc'
12
13
 
@@ -20,6 +21,7 @@ end
20
21
 
21
22
  class CrossLibrary < OpenStruct
22
23
  include Rake::DSL
24
+ prepend TaskExtension
23
25
 
24
26
  def initialize(for_platform, openssl_config, toolchain)
25
27
  super()
data/ext/extconf.rb CHANGED
@@ -37,12 +37,12 @@ else
37
37
 
38
38
  if pgconfig && pgconfig != 'ignore'
39
39
  $stderr.puts "Using config values from %s" % [ pgconfig ]
40
- incdir = `"#{pgconfig}" --includedir`.chomp
41
- libdir = `"#{pgconfig}" --libdir`.chomp
40
+ incdir = IO.popen([pgconfig, "--includedir"], &:read).chomp
41
+ libdir = IO.popen([pgconfig, "--libdir"], &:read).chomp
42
42
  dir_config 'pg', incdir, libdir
43
43
 
44
44
  # Windows traditionally stores DLLs beside executables, not in libdir
45
- dlldir = RUBY_PLATFORM=~/mingw|mswin/ ? `"#{pgconfig}" --bindir`.chomp : libdir
45
+ dlldir = RUBY_PLATFORM=~/mingw|mswin/ ? IO.popen([pgconfig, "--bindir"], &:read).chomp : libdir
46
46
 
47
47
  elsif checking_for "libpq per pkg-config" do
48
48
  _cflags, ldflags, _libs = pkg_config("libpq")
@@ -87,7 +87,7 @@ begin
87
87
  have_library( 'libpq', 'PQconnectdb', ['libpq-fe.h'] ) ||
88
88
  have_library( 'ms/libpq', 'PQconnectdb', ['libpq-fe.h'] )
89
89
 
90
- rescue SystemExit => err
90
+ rescue SystemExit
91
91
  install_text = case RUBY_PLATFORM
92
92
  when /linux/
93
93
  <<-EOT
data/lib/2.5/pg_ext.so CHANGED
Binary file
data/lib/2.6/pg_ext.so CHANGED
Binary file
data/lib/2.7/pg_ext.so CHANGED
Binary file
data/lib/3.0/pg_ext.so CHANGED
Binary file
data/lib/3.1/pg_ext.so CHANGED
Binary file
data/lib/pg/connection.rb CHANGED
@@ -105,7 +105,7 @@ class PG::Connection
105
105
  end
106
106
  # extract "host1,host2" from "host1:5432,host2:5432"
107
107
  iopts[:host] = uri_match['hostports'].split(',', -1).map do |hostport|
108
- hostmatch = HOST_AND_PORT.match(hostport)
108
+ hostmatch = /\A#{HOST_AND_PORT}\z/.match(hostport)
109
109
  hostmatch['IPv6address'] || hostmatch['IPv4address'] || hostmatch['reg-name']&.gsub(/%(\h\h)/){ $1.hex.chr }
110
110
  end.join(',')
111
111
  oopts = {}
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.3.2'
3
+ VERSION = '1.3.3'
4
4
  end
Binary file
@@ -0,0 +1,46 @@
1
+ # This source code is borrowed from:
2
+ # https://github.com/oneclick/rubyinstaller2/blob/b3dcbf69f131e44c78ea3a1c5e0041c223f266ce/lib/ruby_installer/build/utils.rb#L104-L144
3
+
4
+ module TaskExtension
5
+ # Extend rake's file task to be defined only once and to check the expected file is indeed generated
6
+ #
7
+ # The same as #task, but for #file.
8
+ # In addition this file task raises an error, if the file that is expected to be generated is not present after the block was executed.
9
+ def file(name, *args, &block)
10
+ task_once(name, block) do
11
+ super(name, *args) do |ta|
12
+ block.call(ta).tap do
13
+ raise "file #{ta.name} is missing after task executed" unless File.exist?(ta.name)
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ # Extend rake's task definition to be defined only once, even if called several times
20
+ #
21
+ # This allows to define common tasks next to specific tasks.
22
+ # It is expected that any variation of the task's block is reflected in the task name or namespace.
23
+ # If the task name is identical, the task block is executed only once, even if the file task definition is executed twice.
24
+ def task(name, *args, &block)
25
+ task_once(name, block) do
26
+ super
27
+ end
28
+ end
29
+
30
+ private def task_once(name, block)
31
+ name = name.keys.first if name.is_a?(Hash)
32
+ if block &&
33
+ Rake::Task.task_defined?(name) &&
34
+ Rake::Task[name].instance_variable_get('@task_block_location') == block.source_location
35
+ # task is already defined for this target and the same block
36
+ # So skip double definition of the same action
37
+ Rake::Task[name]
38
+ elsif block
39
+ yield.tap do
40
+ Rake::Task[name].instance_variable_set('@task_block_location', block.source_location)
41
+ end
42
+ else
43
+ yield
44
+ end
45
+ end
46
+ end
data.tar.gz.sig CHANGED
Binary file
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: 1.3.2
4
+ version: 1.3.3
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Michael Granger
@@ -36,7 +36,7 @@ cert_chain:
36
36
  oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
37
37
  nA==
38
38
  -----END CERTIFICATE-----
39
- date: 2022-02-14 00:00:00.000000000 Z
39
+ date: 2022-02-22 00:00:00.000000000 Z
40
40
  dependencies: []
41
41
  description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
42
42
  9.3 and later.
@@ -139,6 +139,7 @@ files:
139
139
  - misc/ruby-pg/Rakefile
140
140
  - misc/ruby-pg/lib/ruby/pg.rb
141
141
  - pg.gemspec
142
+ - rakelib/task_extension.rb
142
143
  - sample/array_insert.rb
143
144
  - sample/async_api.rb
144
145
  - sample/async_copyto.rb
metadata.gz.sig CHANGED
Binary file