pg 1.2.1 → 1.2.2

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
  SHA256:
3
- metadata.gz: 3c640c9fcec2200f5de6f54e4966312d71998eeda8df38e4b103318871b0332e
4
- data.tar.gz: 5d298acf56930ebbbb96908bd69d34bcc2c59eb9b0567436d2c6b8793b6153d8
3
+ metadata.gz: a07adb58b0060e91909dcffc56c527bc539ab4ccd8a208644386f9c1010a1ba1
4
+ data.tar.gz: f32870256474e8495feb8a8c17d9313c25e48d5d79e743d6dff99ba063aa6057
5
5
  SHA512:
6
- metadata.gz: aa78484afbafd0533fdc2fca192c946c5914ffd30a748c11d4a0dc8401b6dbeb925bebcd3ed7fb78c85f578341dc86dc652975ac28e91fa458034d205a928b4f
7
- data.tar.gz: 3ad1e7faf70460a1324adb3ca0e6cd11371870f57dd4a5d996fdb9cbba1db2800fa409acacadd39024d38e6e2983e455d2432db90ac2f28f3dd684d3b7984e66
6
+ metadata.gz: d93ea73305d727ccd5d0a672b339038c19af2e7884fec45d145a5496dd310c3a161e77bc429f2c8ab93906c41b124e4eb33772bdfbb5205f3950c919f98b6876
7
+ data.tar.gz: 26213376d23c07bcb28192a8ec9815679f2b6409b353750b560af1c9d7d592c3ec136f16872d2e3cce5762f4a51954c643f8560923a5381da107171c9312a7fd
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ == v1.2.2 [2020-01-06] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Enhancements:
4
+
5
+ - Add a binary gem for Ruby 2.7.
6
+
7
+
1
8
  == v1.2.1 [2020-01-02] Michael Granger <ged@FaerieMUD.org>
2
9
 
3
10
  Enhancements:
data/Rakefile CHANGED
@@ -35,6 +35,8 @@ TEST_DIRECTORY = BASEDIR + "tmp_test_specs"
35
35
 
36
36
  CLOBBER.include( TEST_DIRECTORY.to_s )
37
37
  CLEAN.include( PKGDIR.to_s, TMPDIR.to_s )
38
+ CLEAN.include "lib/*/libpq.dll"
39
+ CLEAN.include "lib/pg_ext.*"
38
40
 
39
41
  # Set up Hoe plugins
40
42
  Hoe.plugin :mercurial
@@ -61,7 +63,7 @@ $hoespec = Hoe.spec 'pg' do
61
63
  self.developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
62
64
 
63
65
  self.dependency 'rake-compiler', '~> 1.0', :developer
64
- self.dependency 'rake-compiler-dock', ['~> 0.7.0'], :developer
66
+ self.dependency 'rake-compiler-dock', ['~> 1.0'], :developer
65
67
  self.dependency 'hoe-deveiate', '~> 0.9', :developer
66
68
  self.dependency 'hoe-bundler', '~> 1.0', :developer
67
69
  self.dependency 'rspec', '~> 3.5', :developer
@@ -129,7 +131,7 @@ Rake::ExtensionTask.new do |ext|
129
131
 
130
132
  # Add libpq.dll to windows binary gemspec
131
133
  ext.cross_compiling do |spec|
132
- spec.files << "lib/libpq.dll"
134
+ spec.files << "lib/#{spec.platform}/libpq.dll"
133
135
  end
134
136
  end
135
137
 
@@ -45,6 +45,8 @@ class CrossLibrary < OpenStruct
45
45
  end
46
46
  self.static_sourcesdir = compile_home + 'sources'
47
47
  self.static_builddir = compile_home + 'builds' + for_platform
48
+ CLOBBER.include( static_sourcesdir )
49
+ CLEAN.include( static_builddir )
48
50
 
49
51
  # Static OpenSSL build vars
50
52
  self.static_openssl_builddir = static_builddir + "openssl-#{openssl_version}"
@@ -141,9 +143,9 @@ class CrossLibrary < OpenStruct
141
143
  end
142
144
 
143
145
  desc "compile static openssl libraries"
144
- task :openssl_libs => [ libssl, libcrypto ]
146
+ task "openssl_libs:#{for_platform}" => [ libssl, libcrypto ]
145
147
 
146
- task :compile_static_openssl => openssl_makefile do |t|
148
+ task "compile_static_openssl:#{for_platform}" => openssl_makefile do |t|
147
149
  chdir( static_openssl_builddir ) do
148
150
  cmd = cmd_prelude.dup
149
151
  cmd << 'make' << "-j#{NUM_CPUS}" << 'build_libs'
@@ -153,12 +155,12 @@ class CrossLibrary < OpenStruct
153
155
  end
154
156
 
155
157
  desc "compile static #{libssl}"
156
- file libssl => :compile_static_openssl do |t|
158
+ file libssl => "compile_static_openssl:#{for_platform}" do |t|
157
159
  rm t.name.gsub(/\.a$/, ".dll.a")
158
160
  end
159
161
 
160
162
  desc "compile static #{libcrypto}"
161
- file libcrypto => :compile_static_openssl do |t|
163
+ file libcrypto => "compile_static_openssl:#{for_platform}" do |t|
162
164
  rm t.name.gsub(/\.a$/, ".dll.a")
163
165
  end
164
166
 
@@ -189,7 +191,7 @@ class CrossLibrary < OpenStruct
189
191
  end
190
192
 
191
193
  # generate the makefile in a clean build location
192
- file postgresql_global_makefile => [ static_postgresql_builddir, :openssl_libs ] do |t|
194
+ file postgresql_global_makefile => [ static_postgresql_builddir, "openssl_libs:#{for_platform}" ] do |t|
193
195
  options = [
194
196
  "--target=#{host_platform}",
195
197
  "--host=#{host_platform}",
@@ -231,10 +233,10 @@ class CrossLibrary < OpenStruct
231
233
 
232
234
 
233
235
  #desc 'compile libpg.a'
234
- task :libpq => postgresql_lib
236
+ task "native:#{for_platform}" => postgresql_lib
235
237
 
236
238
  # copy libpq.dll to lib dir
237
- dest_libpq = "lib/#{postgresql_lib.basename}"
239
+ dest_libpq = "lib/#{for_platform}/#{postgresql_lib.basename}"
238
240
  directory File.dirname(dest_libpq)
239
241
  file dest_libpq => [postgresql_lib, File.dirname(dest_libpq)] do
240
242
  cp postgresql_lib, dest_libpq
@@ -248,20 +250,15 @@ class CrossLibrary < OpenStruct
248
250
  end
249
251
  end
250
252
 
251
- if File.exist?(File.expand_path("~/.rake-compiler/config.yml"))
252
- CrossLibraries = [
253
- ['i386-mingw32', 'mingw', 'i686-w64-mingw32'],
254
- ['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
255
- ].map do |platform, openssl_config, toolchain|
256
- CrossLibrary.new platform, openssl_config, toolchain
257
- end
258
- else
259
- $stderr.puts "Cross-compilation disabled -- rake-compiler not properly installed"
260
- CrossLibraries = []
253
+ CrossLibraries = [
254
+ ['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
255
+ ['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
256
+ ].map do |platform, openssl_config, toolchain|
257
+ CrossLibrary.new platform, openssl_config, toolchain
261
258
  end
262
259
 
263
260
  desc 'cross compile pg for win32'
264
- task :cross => [ :mingw32, :libpq ]
261
+ task :cross => [ :mingw32 ]
265
262
 
266
263
  task :mingw32 do
267
264
  # Use Rake::ExtensionCompiler helpers to find the proper host
@@ -272,30 +269,32 @@ task :mingw32 do
272
269
  end
273
270
  end
274
271
 
275
- # To reduce the gem file size strip mingw32 dlls before packaging
276
- ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
277
- task "tmp/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so" do |t|
278
- sh "i686-w64-mingw32-strip -S tmp/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so"
279
- end
280
-
281
- task "tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so" do |t|
282
- sh "x86_64-w64-mingw32-strip -S tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/pg_ext.so"
283
- end
272
+ task 'gem:windows:prepare' do
273
+ require 'io/console'
274
+ require 'rake_compiler_dock'
275
+
276
+ # Copy gem signing key and certs to be accessable from the docker container
277
+ mkdir_p 'build/gem'
278
+ sh "cp ~/.gem/gem-*.pem build/gem/ || true"
279
+ sh "bundle package"
280
+ begin
281
+ OpenSSL::PKey.read(File.read(File.expand_path("~/.gem/gem-private_key.pem")), ENV["GEM_PRIVATE_KEY_PASSPHRASE"] || "")
282
+ rescue OpenSSL::PKey::PKeyError
283
+ ENV["GEM_PRIVATE_KEY_PASSPHRASE"] = STDIN.getpass("Enter passphrase of gem signature key: ")
284
+ retry
285
+ end
284
286
  end
285
287
 
286
- desc "Build the windows binary gems"
287
- task 'gem:windows' => ['ChangeLog'] do
288
- require 'rake_compiler_dock'
289
-
290
- # Copy gem signing key and certs to be accessable from the docker container
291
- mkdir_p 'build/gem'
292
- sh "cp ~/.gem/gem-*.pem build/gem/ || true"
293
- sh "bundle package"
294
-
295
- RakeCompilerDock.sh <<-EOT
296
- mkdir ~/.gem &&
297
- (cp build/gem/gem-*.pem ~/.gem/ || true) &&
298
- bundle install --local &&
299
- rake cross native gem MAKE="make -j`nproc`"
300
- EOT
288
+ CrossLibraries.each do |xlib|
289
+ platform = xlib.for_platform
290
+ desc "Build fat binary gem for platform #{platform}"
291
+ task "gem:windows:#{platform}" => ['ChangeLog', 'gem:windows:prepare', xlib.openssl_tarball, xlib.postgresql_tarball] do
292
+ RakeCompilerDock.sh <<-EOT, platform: platform
293
+ (cp build/gem/gem-*.pem ~/.gem/ || true) &&
294
+ bundle install --local &&
295
+ rake native:#{platform} pkg/#{$hoespec.spec.full_name}-#{platform}.gem MAKE="make -j`nproc`"
296
+ EOT
297
+ end
298
+ desc "Build the windows binary gems"
299
+ multitask 'gem:windows' => "gem:windows:#{platform}"
301
300
  end
data/lib/pg.rb CHANGED
@@ -22,7 +22,8 @@ rescue LoadError
22
22
  end
23
23
 
24
24
  # Temporary add this directory for DLL search, so that libpq.dll can be found.
25
- add_dll_path.call(__dir__) do
25
+ # mingw32-platform strings differ (RUBY_PLATFORM=i386-mingw32 vs. x86-mingw32 for rubygems)
26
+ add_dll_path.call(File.join(__dir__, RUBY_PLATFORM.gsub(/^i386-/, "x86-"))) do
26
27
  require "#{major_minor}/pg_ext"
27
28
  end
28
29
  else
@@ -36,7 +37,7 @@ end
36
37
  module PG
37
38
 
38
39
  # Library version
39
- VERSION = '1.2.1'
40
+ VERSION = '1.2.2'
40
41
 
41
42
  # VCS revision
42
43
  REVISION = %q$Revision: 6f611e78845a $
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.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -11,9 +11,9 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIENDCCApygAwIBAgIBATANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
15
- REM9RmFlcmllTVVEL0RDPW9yZzAeFw0xOTEwMDkwMDM2NTdaFw0yMDEwMDgwMDM2
16
- NTdaMCIxIDAeBgNVBAMMF2dlZC9EQz1GYWVyaWVNVUQvREM9b3JnMIIBojANBgkq
14
+ MIID+DCCAmCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
15
+ REM9RmFlcmllTVVEL0RDPW9yZzAeFw0xOTEyMjQyMDE5NTFaFw0yMDEyMjMyMDE5
16
+ NTFaMCIxIDAeBgNVBAMMF2dlZC9EQz1GYWVyaWVNVUQvREM9b3JnMIIBojANBgkq
17
17
  hkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAvyVhkRzvlEs0fe7145BYLfN6njX9ih5H
18
18
  L60U0p0euIurpv84op9CNKF9tx+1WKwyQvQP7qFGuZxkSUuWcP/sFhDXL1lWUuIl
19
19
  M4uHbGCRmOshDrF4dgnBeOvkHr1fIhPlJm5FO+Vew8tSQmlDsosxLUx+VB7DrVFO
@@ -22,20 +22,19 @@ cert_chain:
22
22
  vQ66lts4alKC69TE5cuKasWBm+16A4aEe3XdZBRNmtOu/g81gvwA7fkJHKllJuaI
23
23
  dXzdHqq+zbGZVSQ7pRYHYomD0IiDe1DbIouFnPWmagaBnGHwXkDT2bKKP+s2v21m
24
24
  ozilJg4aar2okb/RA6VS87o+d7g6LpDDMMQjH4G9OPnJENLdhu8KnPw/ivSVvQw7
25
- N2I4L/ZOIe2DIVuYH7aLHfjZDQv/mNgpAgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYD
26
- VR0PB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CJtnBnLCF9+kKEUKohAHOmGsE7OBZFnjMIpH5yUDUVJKByv0gIipFt0
31
+ 1T6zff6oVU0w8WBiNKR381+6sF3wIZVnVY0XeJg6hNL+YecE8ILxLhHTmtT/BO0S
32
+ 3xPze9uXDR+iD6HYl8KU5QEg/dXFPhfQb512vVkTJDZvMcwu6PxDUjHFChLjAji/
33
+ AZXjg1C5E9znTkeUR8ieU9F1MOKoiH57a5lYSTI8Ga8PpsNXTxNeXc16Ob26CqrJ
34
+ 83uuAYSy65yXDGXXPVBeKPVnYrqp91pqpS5Nh7wfuiCrE8lgU8PATh7K4BV1UhAT
35
+ 0MHbAT42wTYkfUj3
37
36
  -----END CERTIFICATE-----
38
- date: 2020-01-02 00:00:00.000000000 Z
37
+ date: 2020-01-08 00:00:00.000000000 Z
39
38
  dependencies:
40
39
  - !ruby/object:Gem::Dependency
41
40
  name: hoe-mercurial
@@ -57,14 +56,14 @@ dependencies:
57
56
  requirements:
58
57
  - - "~>"
59
58
  - !ruby/object:Gem::Version
60
- version: '0.10'
59
+ version: '0.9'
61
60
  type: :development
62
61
  prerelease: false
63
62
  version_requirements: !ruby/object:Gem::Requirement
64
63
  requirements:
65
64
  - - "~>"
66
65
  - !ruby/object:Gem::Version
67
- version: '0.10'
66
+ version: '0.9'
68
67
  - !ruby/object:Gem::Dependency
69
68
  name: hoe-highline
70
69
  requirement: !ruby/object:Gem::Requirement
@@ -99,14 +98,14 @@ dependencies:
99
98
  requirements:
100
99
  - - "~>"
101
100
  - !ruby/object:Gem::Version
102
- version: 0.7.0
101
+ version: '1.0'
103
102
  type: :development
104
103
  prerelease: false
105
104
  version_requirements: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - "~>"
108
107
  - !ruby/object:Gem::Version
109
- version: 0.7.0
108
+ version: '1.0'
110
109
  - !ruby/object:Gem::Dependency
111
110
  name: hoe-bundler
112
111
  requirement: !ruby/object:Gem::Requirement
@@ -317,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
316
  - !ruby/object:Gem::Version
318
317
  version: '0'
319
318
  requirements: []
320
- rubygems_version: 3.0.3
319
+ rubygems_version: 3.0.6
321
320
  signing_key:
322
321
  specification_version: 4
323
322
  summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
metadata.gz.sig CHANGED
Binary file