pg 1.3.2-x64-mingw-ucrt → 1.3.3-x64-mingw-ucrt

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: 20ccac8e62fcc42cdbc3f690bb543269d3e6e067293909eed8899f51fc7afe58
4
- data.tar.gz: b813a5c565bafdfdc439e15ac519bd546cd9cf9e4466060d5455d7c381c11a9c
3
+ metadata.gz: a586adae8f2aad6f8adcfe66e6b67d4aec1bcb790cde7a922ef813471d38a461
4
+ data.tar.gz: cd028787accfeb7db805a02e55fd395562bf8ef15a0e11ab418d293dd69134b8
5
5
  SHA512:
6
- metadata.gz: 0f14ec9f08bed5d6c3831696f950f6b9a6c70f4060cc05bfcc0382d5dc32a0558b5e16014ae806c75577586f54dc2145d15b515eb6b467485a0dd79e726859b0
7
- data.tar.gz: ab87fb314c48f5f36491d60ae1f8f8e152d883d9c772e9d1de38473e34a35e41d58eca5e38e087270e5e481532bbc63c376c62f2193845e54eb2d8432999b0b8
6
+ metadata.gz: eb5efe02893299d3af8a33604afe6c29638f482eb447bfb71654df3fab3fad749761a6545124ff4ad5d08f967489a9a5a3e56add3763a128ce31abc895d72796
7
+ data.tar.gz: 4d0eb4dac631e59254eb3f6743e3907cb0ff030a4651952fb2d35933634082e33e9e0405d20cc299b4db7aa464e15a8617016c69f33f0956edb733f38cb7be9a
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/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: x64-mingw-ucrt
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.
@@ -135,6 +135,7 @@ files:
135
135
  - misc/ruby-pg/Rakefile
136
136
  - misc/ruby-pg/lib/ruby/pg.rb
137
137
  - pg.gemspec
138
+ - rakelib/task_extension.rb
138
139
  - sample/array_insert.rb
139
140
  - sample/async_api.rb
140
141
  - sample/async_copyto.rb
metadata.gz.sig CHANGED
Binary file