pg 1.4.6 → 1.6.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/{History.md → CHANGELOG.md} +185 -3
- data/Gemfile +12 -3
- data/README-Windows.rdoc +1 -1
- data/README.ja.md +75 -41
- data/README.md +86 -31
- data/Rakefile +95 -14
- data/certs/kanis@comcard.de.pem +20 -0
- data/certs/larskanis-2024.pem +24 -0
- data/ext/errorcodes.def +4 -5
- data/ext/errorcodes.txt +2 -5
- data/ext/extconf.rb +165 -14
- data/ext/gvl_wrappers.c +13 -2
- data/ext/gvl_wrappers.h +33 -0
- data/ext/pg.c +28 -35
- data/ext/pg.h +18 -14
- data/ext/pg_binary_decoder.c +231 -0
- data/ext/pg_binary_encoder.c +427 -0
- data/ext/pg_cancel_connection.c +360 -0
- data/ext/pg_coder.c +70 -12
- data/ext/pg_connection.c +473 -208
- data/ext/pg_copy_coder.c +316 -23
- data/ext/pg_record_coder.c +12 -11
- data/ext/pg_result.c +102 -30
- data/ext/pg_text_decoder.c +31 -10
- data/ext/pg_text_encoder.c +58 -26
- data/ext/pg_tuple.c +36 -33
- data/ext/pg_type_map.c +4 -3
- data/ext/pg_type_map_all_strings.c +3 -3
- data/ext/pg_type_map_by_class.c +6 -4
- data/ext/pg_type_map_by_column.c +9 -4
- data/ext/pg_type_map_by_mri_type.c +1 -1
- data/ext/pg_type_map_by_oid.c +10 -5
- data/ext/pg_type_map_in_ruby.c +6 -3
- data/lib/pg/basic_type_map_based_on_result.rb +21 -1
- data/lib/pg/basic_type_map_for_queries.rb +23 -10
- data/lib/pg/basic_type_map_for_results.rb +26 -3
- data/lib/pg/basic_type_registry.rb +46 -36
- data/lib/pg/binary_decoder/date.rb +9 -0
- data/lib/pg/binary_decoder/timestamp.rb +26 -0
- data/lib/pg/binary_encoder/timestamp.rb +20 -0
- data/lib/pg/cancel_connection.rb +53 -0
- data/lib/pg/coder.rb +18 -14
- data/lib/pg/connection.rb +387 -172
- data/lib/pg/exceptions.rb +6 -0
- data/lib/pg/text_decoder/date.rb +21 -0
- data/lib/pg/text_decoder/inet.rb +9 -0
- data/lib/pg/text_decoder/json.rb +17 -0
- data/lib/pg/text_decoder/numeric.rb +9 -0
- data/lib/pg/text_decoder/timestamp.rb +30 -0
- data/lib/pg/text_encoder/date.rb +13 -0
- data/lib/pg/text_encoder/inet.rb +31 -0
- data/lib/pg/text_encoder/json.rb +17 -0
- data/lib/pg/text_encoder/numeric.rb +9 -0
- data/lib/pg/text_encoder/timestamp.rb +24 -0
- data/lib/pg/version.rb +1 -1
- data/lib/pg.rb +78 -17
- data/misc/yugabyte/Dockerfile +9 -0
- data/misc/yugabyte/docker-compose.yml +28 -0
- data/misc/yugabyte/pg-test.rb +45 -0
- data/pg.gemspec +9 -5
- data/ports/patches/krb5/1.21.3/0001-Allow-static-linking-krb5-library.patch +30 -0
- data/ports/patches/openssl/3.5.1/0001-aarch64-mingw.patch +21 -0
- data/ports/patches/postgresql/17.5/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch +42 -0
- data/ports/patches/postgresql/17.5/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch +52 -0
- data/rakelib/pg_gem_helper.rb +64 -0
- data.tar.gz.sig +0 -0
- metadata +61 -49
- metadata.gz.sig +0 -0
- data/.appveyor.yml +0 -42
- data/.gems +0 -6
- data/.gemtest +0 -0
- data/.github/workflows/binary-gems.yml +0 -117
- data/.github/workflows/source-gem.yml +0 -137
- data/.gitignore +0 -19
- data/.hgsigs +0 -34
- data/.hgtags +0 -41
- data/.irbrc +0 -23
- data/.pryrc +0 -23
- data/.tm_properties +0 -21
- data/.travis.yml +0 -49
- data/Manifest.txt +0 -72
- data/Rakefile.cross +0 -298
- data/lib/pg/binary_decoder.rb +0 -23
- data/lib/pg/constants.rb +0 -12
- data/lib/pg/text_decoder.rb +0 -46
- data/lib/pg/text_encoder.rb +0 -59
- data/translation/.po4a-version +0 -7
- data/translation/po/all.pot +0 -875
- data/translation/po/ja.po +0 -868
- data/translation/po4a.cfg +0 -9
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
require 'bundler/gem_helper'
|
3
|
+
|
4
|
+
class PgGemHelper < Bundler::GemHelper
|
5
|
+
attr_accessor :cross_platforms
|
6
|
+
|
7
|
+
def install
|
8
|
+
super
|
9
|
+
|
10
|
+
task "release:guard_clean" => ["release:update_history"]
|
11
|
+
|
12
|
+
task "release:update_history" do
|
13
|
+
update_history
|
14
|
+
end
|
15
|
+
|
16
|
+
task "release:rubygem_push" => ["gem:native"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def hfile
|
20
|
+
"CHANGELOG.md"
|
21
|
+
end
|
22
|
+
|
23
|
+
def headline
|
24
|
+
'^([^\n]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
|
25
|
+
end
|
26
|
+
|
27
|
+
def reldate
|
28
|
+
Time.now.strftime("%Y-%m-%d")
|
29
|
+
end
|
30
|
+
|
31
|
+
def update_history
|
32
|
+
hin = File.read(hfile)
|
33
|
+
hout = hin.sub(/#{headline}/) do
|
34
|
+
raise "#{hfile} isn't up-to-date for version #{version} (!= #{$2})" unless $2==version.to_s
|
35
|
+
$1 + $2 + $3 + reldate + $5
|
36
|
+
end
|
37
|
+
if hout != hin
|
38
|
+
Bundler.ui.confirm "Updating #{hfile} for release."
|
39
|
+
File.write(hfile, hout)
|
40
|
+
Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def tag_version
|
45
|
+
Bundler.ui.confirm "Tag release with annotation:"
|
46
|
+
m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
|
47
|
+
Bundler.ui.info(m[:annotation].gsub(/^/, " "))
|
48
|
+
IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
|
49
|
+
fd.write m[:annotation]
|
50
|
+
end
|
51
|
+
yield if block_given?
|
52
|
+
rescue
|
53
|
+
Bundler.ui.error "Untagging #{version_tag} due to error."
|
54
|
+
Rake::FileUtilsExt.sh "git", "tag", "-d", version_tag
|
55
|
+
raise
|
56
|
+
end
|
57
|
+
|
58
|
+
def rubygem_push(path)
|
59
|
+
cross_platforms.each do |ruby_platform|
|
60
|
+
super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
|
61
|
+
end
|
62
|
+
super(path)
|
63
|
+
end
|
64
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,19 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
8
8
|
- Lars Kanis
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain:
|
12
11
|
- |
|
13
12
|
-----BEGIN CERTIFICATE-----
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
MIIEBDCCAmygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
|
14
|
+
L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDEyMjkxOTU2NTZaFw0yNTEy
|
15
|
+
MjkxOTU2NTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
|
17
16
|
PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
|
18
17
|
mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
|
19
18
|
eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
|
@@ -24,20 +23,20 @@ cert_chain:
|
|
24
23
|
chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
|
25
24
|
9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
|
26
25
|
A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
26
|
+
7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEAoZZWzNV2XXaoSmvyamSSN+Wt/Ia+DNrU
|
27
|
+
2pc3kMEqykH6l1WiVPszr6HavQ//2I2UcSRSS5AGDdiSXcfyFmHtMBdtJHhTPcn7
|
28
|
+
4DLliB0szpvwG+ltGD8PI8eWkLaTQeFzs+0QCTavgKV+Zw56Q0J5zZvHHUMrLkUD
|
29
|
+
qhwKjdTdkrRTn9Sqi0BrIRRZGTUDdrt8qoWm35aES5arKZzytgrRD/kXfFW2LCg0
|
30
|
+
FzgTKibR4/3g8ph94kQLg/D2SMlVPkQ3ECi036mZxDC2n8V6u3rDkG5923wmrRZB
|
31
|
+
J6cqz475Q8HYORQCB68OPzkWMfC7mBo3vpSsIqRoNs1FE4FJu4FGwZG8fBSrDC4H
|
32
|
+
bZe+GtyS3e2SMjgT65zp35gLO9I7MquzYN9P6V2u1iBpTycchk5z9R1ghxzZSBT8
|
33
|
+
DrkJ9tVlPQtJB0LqT0tvBap4upnwT1xYq721b5dwH6AF4Pi6iz/dc5vnq1/MH8bV
|
34
|
+
8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
|
36
35
|
-----END CERTIFICATE-----
|
37
|
-
date:
|
36
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
38
37
|
dependencies: []
|
39
38
|
description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
|
40
|
-
|
39
|
+
10 and later.
|
41
40
|
email:
|
42
41
|
- ged@FaerieMUD.org
|
43
42
|
- lars@greiz-reinsdorf.de
|
@@ -45,8 +44,8 @@ executables: []
|
|
45
44
|
extensions:
|
46
45
|
- ext/extconf.rb
|
47
46
|
extra_rdoc_files:
|
47
|
+
- CHANGELOG.md
|
48
48
|
- Contributors.rdoc
|
49
|
-
- History.md
|
50
49
|
- README-OS_X.rdoc
|
51
50
|
- README-Windows.rdoc
|
52
51
|
- README.ja.md
|
@@ -57,6 +56,7 @@ extra_rdoc_files:
|
|
57
56
|
- ext/pg.h
|
58
57
|
- ext/pg_binary_decoder.c
|
59
58
|
- ext/pg_binary_encoder.c
|
59
|
+
- ext/pg_cancel_connection.c
|
60
60
|
- ext/pg_coder.c
|
61
61
|
- ext/pg_connection.c
|
62
62
|
- ext/pg_copy_coder.c
|
@@ -80,46 +80,44 @@ extra_rdoc_files:
|
|
80
80
|
- lib/pg/basic_type_map_for_queries.rb
|
81
81
|
- lib/pg/basic_type_map_for_results.rb
|
82
82
|
- lib/pg/basic_type_registry.rb
|
83
|
-
- lib/pg/binary_decoder.rb
|
83
|
+
- lib/pg/binary_decoder/date.rb
|
84
|
+
- lib/pg/binary_decoder/timestamp.rb
|
85
|
+
- lib/pg/binary_encoder/timestamp.rb
|
86
|
+
- lib/pg/cancel_connection.rb
|
84
87
|
- lib/pg/coder.rb
|
85
88
|
- lib/pg/connection.rb
|
86
|
-
- lib/pg/constants.rb
|
87
89
|
- lib/pg/exceptions.rb
|
88
90
|
- lib/pg/result.rb
|
89
|
-
- lib/pg/text_decoder.rb
|
90
|
-
- lib/pg/
|
91
|
+
- lib/pg/text_decoder/date.rb
|
92
|
+
- lib/pg/text_decoder/inet.rb
|
93
|
+
- lib/pg/text_decoder/json.rb
|
94
|
+
- lib/pg/text_decoder/numeric.rb
|
95
|
+
- lib/pg/text_decoder/timestamp.rb
|
96
|
+
- lib/pg/text_encoder/date.rb
|
97
|
+
- lib/pg/text_encoder/inet.rb
|
98
|
+
- lib/pg/text_encoder/json.rb
|
99
|
+
- lib/pg/text_encoder/numeric.rb
|
100
|
+
- lib/pg/text_encoder/timestamp.rb
|
91
101
|
- lib/pg/tuple.rb
|
92
102
|
- lib/pg/type_map_by_column.rb
|
93
103
|
- lib/pg/version.rb
|
94
104
|
files:
|
95
|
-
- ".appveyor.yml"
|
96
|
-
- ".gems"
|
97
|
-
- ".gemtest"
|
98
|
-
- ".github/workflows/binary-gems.yml"
|
99
|
-
- ".github/workflows/source-gem.yml"
|
100
|
-
- ".gitignore"
|
101
|
-
- ".hgsigs"
|
102
|
-
- ".hgtags"
|
103
|
-
- ".irbrc"
|
104
|
-
- ".pryrc"
|
105
|
-
- ".tm_properties"
|
106
|
-
- ".travis.yml"
|
107
105
|
- BSDL
|
106
|
+
- CHANGELOG.md
|
108
107
|
- Contributors.rdoc
|
109
108
|
- Gemfile
|
110
|
-
- History.md
|
111
109
|
- LICENSE
|
112
|
-
- Manifest.txt
|
113
110
|
- POSTGRES
|
114
111
|
- README-OS_X.rdoc
|
115
112
|
- README-Windows.rdoc
|
116
113
|
- README.ja.md
|
117
114
|
- README.md
|
118
115
|
- Rakefile
|
119
|
-
- Rakefile.cross
|
120
116
|
- certs/ged.pem
|
117
|
+
- certs/kanis@comcard.de.pem
|
121
118
|
- certs/larskanis-2022.pem
|
122
119
|
- certs/larskanis-2023.pem
|
120
|
+
- certs/larskanis-2024.pem
|
123
121
|
- ext/errorcodes.def
|
124
122
|
- ext/errorcodes.rb
|
125
123
|
- ext/errorcodes.txt
|
@@ -130,6 +128,7 @@ files:
|
|
130
128
|
- ext/pg.h
|
131
129
|
- ext/pg_binary_decoder.c
|
132
130
|
- ext/pg_binary_encoder.c
|
131
|
+
- ext/pg_cancel_connection.c
|
133
132
|
- ext/pg_coder.c
|
134
133
|
- ext/pg_connection.c
|
135
134
|
- ext/pg_copy_coder.c
|
@@ -156,14 +155,24 @@ files:
|
|
156
155
|
- lib/pg/basic_type_map_for_queries.rb
|
157
156
|
- lib/pg/basic_type_map_for_results.rb
|
158
157
|
- lib/pg/basic_type_registry.rb
|
159
|
-
- lib/pg/binary_decoder.rb
|
158
|
+
- lib/pg/binary_decoder/date.rb
|
159
|
+
- lib/pg/binary_decoder/timestamp.rb
|
160
|
+
- lib/pg/binary_encoder/timestamp.rb
|
161
|
+
- lib/pg/cancel_connection.rb
|
160
162
|
- lib/pg/coder.rb
|
161
163
|
- lib/pg/connection.rb
|
162
|
-
- lib/pg/constants.rb
|
163
164
|
- lib/pg/exceptions.rb
|
164
165
|
- lib/pg/result.rb
|
165
|
-
- lib/pg/text_decoder.rb
|
166
|
-
- lib/pg/
|
166
|
+
- lib/pg/text_decoder/date.rb
|
167
|
+
- lib/pg/text_decoder/inet.rb
|
168
|
+
- lib/pg/text_decoder/json.rb
|
169
|
+
- lib/pg/text_decoder/numeric.rb
|
170
|
+
- lib/pg/text_decoder/timestamp.rb
|
171
|
+
- lib/pg/text_encoder/date.rb
|
172
|
+
- lib/pg/text_encoder/inet.rb
|
173
|
+
- lib/pg/text_encoder/json.rb
|
174
|
+
- lib/pg/text_encoder/numeric.rb
|
175
|
+
- lib/pg/text_encoder/timestamp.rb
|
167
176
|
- lib/pg/tuple.rb
|
168
177
|
- lib/pg/type_map_by_column.rb
|
169
178
|
- lib/pg/version.rb
|
@@ -178,7 +187,15 @@ files:
|
|
178
187
|
- misc/ruby-pg/README.txt
|
179
188
|
- misc/ruby-pg/Rakefile
|
180
189
|
- misc/ruby-pg/lib/ruby/pg.rb
|
190
|
+
- misc/yugabyte/Dockerfile
|
191
|
+
- misc/yugabyte/docker-compose.yml
|
192
|
+
- misc/yugabyte/pg-test.rb
|
181
193
|
- pg.gemspec
|
194
|
+
- ports/patches/krb5/1.21.3/0001-Allow-static-linking-krb5-library.patch
|
195
|
+
- ports/patches/openssl/3.5.1/0001-aarch64-mingw.patch
|
196
|
+
- ports/patches/postgresql/17.5/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch
|
197
|
+
- ports/patches/postgresql/17.5/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch
|
198
|
+
- rakelib/pg_gem_helper.rb
|
182
199
|
- rakelib/task_extension.rb
|
183
200
|
- sample/array_insert.rb
|
184
201
|
- sample/async_api.rb
|
@@ -199,19 +216,15 @@ files:
|
|
199
216
|
- sample/test_binary_values.rb
|
200
217
|
- sample/wal_shipper.rb
|
201
218
|
- sample/warehouse_partitions.rb
|
202
|
-
- translation/.po4a-version
|
203
|
-
- translation/po/all.pot
|
204
|
-
- translation/po/ja.po
|
205
|
-
- translation/po4a.cfg
|
206
219
|
homepage: https://github.com/ged/ruby-pg
|
207
220
|
licenses:
|
208
221
|
- BSD-2-Clause
|
209
222
|
metadata:
|
210
223
|
homepage_uri: https://github.com/ged/ruby-pg
|
211
224
|
source_code_uri: https://github.com/ged/ruby-pg
|
212
|
-
changelog_uri: https://github.com/ged/ruby-pg/blob/master/
|
225
|
+
changelog_uri: https://github.com/ged/ruby-pg/blob/master/CHANGELOG.md
|
213
226
|
documentation_uri: http://deveiate.org/code/pg
|
214
|
-
|
227
|
+
msys2_mingw_dependencies: postgresql
|
215
228
|
rdoc_options:
|
216
229
|
- "--main"
|
217
230
|
- README.md
|
@@ -223,15 +236,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
223
236
|
requirements:
|
224
237
|
- - ">="
|
225
238
|
- !ruby/object:Gem::Version
|
226
|
-
version: '2.
|
239
|
+
version: '2.7'
|
227
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
241
|
requirements:
|
229
242
|
- - ">="
|
230
243
|
- !ruby/object:Gem::Version
|
231
244
|
version: '0'
|
232
245
|
requirements: []
|
233
|
-
rubygems_version: 3.
|
234
|
-
signing_key:
|
246
|
+
rubygems_version: 3.7.1
|
235
247
|
specification_version: 4
|
236
248
|
summary: Pg is the Ruby interface to the PostgreSQL RDBMS
|
237
249
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/.appveyor.yml
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
image: Visual Studio 2019
|
2
|
-
|
3
|
-
init:
|
4
|
-
- set PATH=C:/Ruby%ruby_version%/bin;c:/Program Files/Git/cmd;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files/Mercurial
|
5
|
-
- set RUBYOPT=--verbose
|
6
|
-
install:
|
7
|
-
- ps: |
|
8
|
-
if ($env:RUBYDOWNLOAD -ne $null) {
|
9
|
-
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-$env:RUBYDOWNLOAD.exe", "$pwd/ruby-setup.exe")
|
10
|
-
cmd /c ruby-setup.exe /currentuser /verysilent /dir=C:/Ruby$env:ruby_version
|
11
|
-
}
|
12
|
-
- cmd: |
|
13
|
-
ridk enable
|
14
|
-
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-pkgconf ${MINGW_PACKAGE_PREFIX}-libyaml ${MINGW_PACKAGE_PREFIX}-gcc"
|
15
|
-
- ruby --version
|
16
|
-
- gem --version
|
17
|
-
- gem install bundler --conservative
|
18
|
-
- bundle install
|
19
|
-
- ps: |
|
20
|
-
if ($env:PGVERSION -ne $null)
|
21
|
-
{
|
22
|
-
$(new-object net.webclient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-' + $env:PGVERSION + '.exe', 'C:/postgresql-setup.exe')
|
23
|
-
cmd /c "C:/postgresql-setup.exe" --mode unattended --extract-only 1
|
24
|
-
|
25
|
-
$env:PATH = 'C:/Program Files/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
|
26
|
-
$env:PATH = 'C:/Program Files (x86)/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
|
27
|
-
} else {
|
28
|
-
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed `${MINGW_PACKAGE_PREFIX}-postgresql"
|
29
|
-
}
|
30
|
-
- echo %PATH%
|
31
|
-
- pg_config
|
32
|
-
build_script:
|
33
|
-
- bundle exec rake -rdevkit compile --trace
|
34
|
-
test_script:
|
35
|
-
- bundle exec rake test PG_DEBUG=0
|
36
|
-
on_failure:
|
37
|
-
- find -name mkmf.log | xargs cat
|
38
|
-
environment:
|
39
|
-
matrix:
|
40
|
-
- ruby_version: "head"
|
41
|
-
RUBYDOWNLOAD: x86
|
42
|
-
- ruby_version: "30-x64"
|
data/.gems
DELETED
data/.gemtest
DELETED
File without changes
|
@@ -1,117 +0,0 @@
|
|
1
|
-
name: Binary gems
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
pull_request:
|
6
|
-
workflow_dispatch:
|
7
|
-
schedule:
|
8
|
-
- cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
|
9
|
-
|
10
|
-
jobs:
|
11
|
-
job_build_x64:
|
12
|
-
name: build
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
strategy:
|
15
|
-
fail-fast: false
|
16
|
-
matrix:
|
17
|
-
include:
|
18
|
-
- platform: "x64-mingw-ucrt"
|
19
|
-
- platform: "x64-mingw32"
|
20
|
-
- platform: "x86-mingw32"
|
21
|
-
steps:
|
22
|
-
- uses: actions/checkout@v3
|
23
|
-
- name: Set up Ruby
|
24
|
-
uses: ruby/setup-ruby@v1
|
25
|
-
with:
|
26
|
-
ruby-version: "3.2"
|
27
|
-
- run: bundle install
|
28
|
-
|
29
|
-
- name: Create a dummy cert to satisfy the build
|
30
|
-
run: |
|
31
|
-
mkdir -p ~/.gem/
|
32
|
-
ruby -ropenssl -e "puts OpenSSL::PKey::RSA.new(2048).to_pem" > ~/.gem/gem-private_key.pem
|
33
|
-
gem cert --build travis-ci@dummy.org --private-key ~/.gem/gem-private_key.pem
|
34
|
-
cp gem-public_cert.pem ~/.gem/gem-public_cert.pem
|
35
|
-
|
36
|
-
- name: Build binary gem
|
37
|
-
run: bundle exec rake gem:windows:${{ matrix.platform }}
|
38
|
-
|
39
|
-
- name: Upload binary gem
|
40
|
-
uses: actions/upload-artifact@v3
|
41
|
-
with:
|
42
|
-
name: binary-gem
|
43
|
-
path: pkg/*.gem
|
44
|
-
|
45
|
-
job_test_binary:
|
46
|
-
name: Test on Windows
|
47
|
-
needs: job_build_x64
|
48
|
-
strategy:
|
49
|
-
fail-fast: false
|
50
|
-
matrix:
|
51
|
-
include:
|
52
|
-
- os: windows-latest
|
53
|
-
ruby: "3.2"
|
54
|
-
platform: "x64-mingw-ucrt"
|
55
|
-
PGVERSION: 15.1-1-windows-x64
|
56
|
-
- os: windows-latest
|
57
|
-
ruby: "3.1.3-1"
|
58
|
-
platform: "x86-mingw32"
|
59
|
-
PGVERSION: 10.20-1-windows
|
60
|
-
- os: windows-latest
|
61
|
-
ruby: "2.5"
|
62
|
-
platform: "x64-mingw32"
|
63
|
-
PGVERSION: 10.20-1-windows
|
64
|
-
|
65
|
-
runs-on: ${{ matrix.os }}
|
66
|
-
env:
|
67
|
-
PGVERSION: ${{ matrix.PGVERSION }}
|
68
|
-
steps:
|
69
|
-
- uses: actions/checkout@v3
|
70
|
-
- name: Set up Ruby
|
71
|
-
if: matrix.platform != 'x86-mingw32'
|
72
|
-
uses: ruby/setup-ruby@v1
|
73
|
-
with:
|
74
|
-
ruby-version: ${{ matrix.ruby }}
|
75
|
-
|
76
|
-
- name: Set up 32 bit x86 Ruby
|
77
|
-
if: matrix.platform == 'x86-mingw32'
|
78
|
-
run: |
|
79
|
-
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-${{ matrix.ruby }}/rubyinstaller-${{ matrix.ruby }}-x86.exe", "$pwd/ruby-setup.exe")
|
80
|
-
cmd /c ruby-setup.exe /currentuser /verysilent /dir=C:/Ruby-${{ matrix.ruby }}
|
81
|
-
echo "c:/ruby-${{ matrix.ruby }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
82
|
-
|
83
|
-
c:/ruby-${{ matrix.ruby }}/bin/ridk enable
|
84
|
-
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed make `${MINGW_PACKAGE_PREFIX}-pkgconf `${MINGW_PACKAGE_PREFIX}-libyaml `${MINGW_PACKAGE_PREFIX}-gcc `${MINGW_PACKAGE_PREFIX}-make"
|
85
|
-
echo "C:/msys64/$env:MSYSTEM_PREFIX/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
86
|
-
|
87
|
-
- name: Download gem from build job
|
88
|
-
uses: actions/download-artifact@v3
|
89
|
-
with:
|
90
|
-
name: binary-gem
|
91
|
-
|
92
|
-
- name: Download PostgreSQL
|
93
|
-
run: |
|
94
|
-
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
95
|
-
function Unzip {
|
96
|
-
param([string]$zipfile, [string]$outpath)
|
97
|
-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
98
|
-
}
|
99
|
-
|
100
|
-
$(new-object net.webclient).DownloadFile("http://get.enterprisedb.com/postgresql/postgresql-$env:PGVERSION-binaries.zip", "postgresql-binaries.zip")
|
101
|
-
Unzip "postgresql-binaries.zip" "."
|
102
|
-
echo "$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
103
|
-
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
104
|
-
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
105
|
-
|
106
|
-
- run: echo $env:PATH
|
107
|
-
- run: gem update --system 3.3.26
|
108
|
-
- run: bundle install
|
109
|
-
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
|
110
|
-
- name: Run specs
|
111
|
-
run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
|
112
|
-
|
113
|
-
- name: Print logs if job failed
|
114
|
-
if: ${{ failure() && matrix.os == 'windows-latest' }}
|
115
|
-
run: |
|
116
|
-
ridk enable
|
117
|
-
find "$(ruby -e"puts RbConfig::CONFIG[%q[libdir]]")" -name mkmf.log -print0 | xargs -0 cat
|
@@ -1,137 +0,0 @@
|
|
1
|
-
name: Source gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
pull_request:
|
6
|
-
workflow_dispatch:
|
7
|
-
schedule:
|
8
|
-
- cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
|
9
|
-
|
10
|
-
jobs:
|
11
|
-
job_build_gem:
|
12
|
-
name: build
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
steps:
|
15
|
-
- uses: actions/checkout@v3
|
16
|
-
- name: Set up Ruby
|
17
|
-
uses: ruby/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: "3.2"
|
20
|
-
|
21
|
-
- name: Build source gem
|
22
|
-
run: gem build pg.gemspec
|
23
|
-
|
24
|
-
- name: Upload source gem
|
25
|
-
uses: actions/upload-artifact@v3
|
26
|
-
with:
|
27
|
-
name: source-gem
|
28
|
-
path: "*.gem"
|
29
|
-
|
30
|
-
job_test_gem:
|
31
|
-
name: Test built gem
|
32
|
-
needs: job_build_gem
|
33
|
-
strategy:
|
34
|
-
fail-fast: false
|
35
|
-
matrix:
|
36
|
-
include:
|
37
|
-
- os: windows
|
38
|
-
ruby: "head"
|
39
|
-
PGVERSION: 15.1-1-windows-x64
|
40
|
-
PGVER: "15"
|
41
|
-
- os: windows
|
42
|
-
ruby: "2.5"
|
43
|
-
PGVERSION: 9.4.26-1-windows-x64
|
44
|
-
PGVER: "9.4"
|
45
|
-
- os: ubuntu
|
46
|
-
ruby: "head"
|
47
|
-
PGVER: "15"
|
48
|
-
- os: ubuntu
|
49
|
-
ruby: "3.2"
|
50
|
-
PGVER: "12"
|
51
|
-
- os: ubuntu
|
52
|
-
os_ver: "20.04"
|
53
|
-
ruby: "2.5"
|
54
|
-
PGVER: "9.3"
|
55
|
-
- os: ubuntu
|
56
|
-
ruby: "truffleruby"
|
57
|
-
PGVER: "13"
|
58
|
-
- os: ubuntu
|
59
|
-
ruby: "truffleruby-head"
|
60
|
-
PGVER: "15"
|
61
|
-
- os: macos
|
62
|
-
ruby: "head"
|
63
|
-
PGVERSION: 15.1-1-osx
|
64
|
-
PGVER: "15"
|
65
|
-
|
66
|
-
runs-on: ${{ matrix.os }}-${{ matrix.os_ver || 'latest' }}
|
67
|
-
env:
|
68
|
-
PGVERSION: ${{ matrix.PGVERSION }}
|
69
|
-
PGVER: ${{ matrix.PGVER }}
|
70
|
-
MAKE: make -j2 V=1
|
71
|
-
|
72
|
-
steps:
|
73
|
-
- uses: actions/checkout@v3
|
74
|
-
- name: Set up Ruby
|
75
|
-
uses: ruby/setup-ruby@v1
|
76
|
-
with:
|
77
|
-
ruby-version: ${{ matrix.ruby }}
|
78
|
-
|
79
|
-
- name: Download gem from build job
|
80
|
-
uses: actions/download-artifact@v3
|
81
|
-
with:
|
82
|
-
name: source-gem
|
83
|
-
|
84
|
-
- name: Install required packages Windows
|
85
|
-
if: matrix.os == 'windows'
|
86
|
-
shell: cmd
|
87
|
-
run: ridk exec sh -c "pacman --sync --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc"
|
88
|
-
|
89
|
-
- name: Download PostgreSQL Windows
|
90
|
-
if: matrix.os == 'windows'
|
91
|
-
run: |
|
92
|
-
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
93
|
-
function Unzip {
|
94
|
-
param([string]$zipfile, [string]$outpath)
|
95
|
-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
96
|
-
}
|
97
|
-
|
98
|
-
$(new-object net.webclient).DownloadFile("http://get.enterprisedb.com/postgresql/postgresql-$env:PGVERSION-binaries.zip", "postgresql-binaries.zip")
|
99
|
-
Unzip "postgresql-binaries.zip" "."
|
100
|
-
echo "$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
101
|
-
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
102
|
-
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
103
|
-
|
104
|
-
- name: Download PostgreSQL Ubuntu
|
105
|
-
if: matrix.os == 'ubuntu'
|
106
|
-
run: |
|
107
|
-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main $PGVER" | sudo tee -a /etc/apt/sources.list.d/pgdg.list
|
108
|
-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
109
|
-
sudo apt-get -y update
|
110
|
-
sudo apt-get -y --allow-downgrades install postgresql-$PGVER libpq5=$PGVER* libpq-dev=$PGVER*
|
111
|
-
echo /usr/lib/postgresql/$PGVER/bin >> $GITHUB_PATH
|
112
|
-
|
113
|
-
- name: Download PostgreSQL Macos
|
114
|
-
if: matrix.os == 'macos'
|
115
|
-
run: |
|
116
|
-
wget https://get.enterprisedb.com/postgresql/postgresql-$PGVERSION-binaries.zip && \
|
117
|
-
sudo mkdir -p /Library/PostgreSQL && \
|
118
|
-
sudo unzip postgresql-$PGVERSION-binaries.zip -d /Library/PostgreSQL/$PGVER && \
|
119
|
-
echo /Library/PostgreSQL/$PGVER/bin >> $GITHUB_PATH
|
120
|
-
|
121
|
-
- run: gem update --system 3.3.26
|
122
|
-
- run: bundle install
|
123
|
-
|
124
|
-
- run: gem install --local *.gem --verbose
|
125
|
-
|
126
|
-
- name: Run specs
|
127
|
-
env:
|
128
|
-
PG_DEBUG: 0
|
129
|
-
run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc
|
130
|
-
|
131
|
-
- name: Print logs if job failed
|
132
|
-
if: ${{ failure() && matrix.os == 'windows' }}
|
133
|
-
run: ridk exec cat tmp_test_specs/*.log
|
134
|
-
|
135
|
-
- name: Print logs if job failed
|
136
|
-
if: ${{ failure() && matrix.os != 'windows' }}
|
137
|
-
run: cat tmp_test_specs/*.log
|
data/.gitignore
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
*.lock
|
2
|
-
*.orig
|
3
|
-
*_BACKUP_*
|
4
|
-
*_BASE_*
|
5
|
-
*_LOCAL_*
|
6
|
-
*_REMOTE_*
|
7
|
-
/.test_symlink
|
8
|
-
/build/
|
9
|
-
/doc/
|
10
|
-
/lib/*.bundle
|
11
|
-
/lib/*.so
|
12
|
-
/lib/2.?/
|
13
|
-
/lib/3.?/
|
14
|
-
/pkg/
|
15
|
-
/tmp/
|
16
|
-
/tmp_test_*/
|
17
|
-
/vendor/
|
18
|
-
/lib/libpq.dll
|
19
|
-
/lib/pg/postgresql_lib_path.rb
|