pg 1.4.4 → 1.5.9
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/Gemfile +6 -0
- data/{History.rdoc → History.md} +303 -151
- data/README.ja.md +300 -0
- data/README.md +286 -0
- data/Rakefile +16 -4
- data/Rakefile.cross +15 -14
- data/certs/kanis@comcard.de.pem +20 -0
- data/certs/larskanis-2023.pem +24 -0
- data/certs/larskanis-2024.pem +24 -0
- data/ext/errorcodes.def +8 -5
- data/ext/errorcodes.txt +3 -5
- data/ext/extconf.rb +7 -0
- data/ext/pg.c +15 -30
- data/ext/pg.h +10 -6
- data/ext/pg_binary_decoder.c +81 -0
- data/ext/pg_binary_encoder.c +224 -0
- data/ext/pg_coder.c +16 -7
- data/ext/pg_connection.c +220 -82
- data/ext/pg_copy_coder.c +315 -22
- data/ext/pg_record_coder.c +11 -10
- data/ext/pg_result.c +93 -19
- data/ext/pg_text_decoder.c +31 -10
- data/ext/pg_text_encoder.c +38 -19
- data/ext/pg_tuple.c +34 -31
- data/ext/pg_type_map.c +3 -2
- data/ext/pg_type_map_all_strings.c +2 -2
- data/ext/pg_type_map_by_class.c +5 -3
- data/ext/pg_type_map_by_column.c +7 -3
- data/ext/pg_type_map_by_oid.c +7 -4
- data/ext/pg_type_map_in_ruby.c +5 -2
- data/lib/pg/basic_type_map_based_on_result.rb +21 -1
- data/lib/pg/basic_type_map_for_queries.rb +19 -10
- data/lib/pg/basic_type_map_for_results.rb +26 -3
- data/lib/pg/basic_type_registry.rb +44 -34
- 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/coder.rb +15 -13
- data/lib/pg/connection.rb +158 -64
- data/lib/pg/exceptions.rb +13 -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 +65 -15
- data/pg.gemspec +7 -3
- data/rakelib/task_extension.rb +1 -1
- data.tar.gz.sig +2 -4
- metadata +104 -46
- metadata.gz.sig +0 -0
- data/.appveyor.yml +0 -36
- data/.gems +0 -6
- data/.gemtest +0 -0
- data/.github/workflows/binary-gems.yml +0 -86
- data/.github/workflows/source-gem.yml +0 -131
- data/.gitignore +0 -13
- 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/README.ja.rdoc +0 -13
- data/README.rdoc +0 -233
- 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/lib/pg.rb
CHANGED
@@ -50,12 +50,6 @@ module PG
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
class NotAllCopyDataRetrieved < PG::Error
|
55
|
-
end
|
56
|
-
class NotInBlockingMode < PG::Error
|
57
|
-
end
|
58
|
-
|
59
53
|
# Get the PG library version.
|
60
54
|
#
|
61
55
|
# +include_buildnum+ is no longer used and any value passed will be ignored.
|
@@ -69,21 +63,77 @@ module PG
|
|
69
63
|
Connection.new( *args, &block )
|
70
64
|
end
|
71
65
|
|
66
|
+
if defined?(Ractor.make_shareable)
|
67
|
+
def self.make_shareable(obj)
|
68
|
+
Ractor.make_shareable(obj)
|
69
|
+
end
|
70
|
+
else
|
71
|
+
def self.make_shareable(obj)
|
72
|
+
obj.freeze
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
module BinaryDecoder
|
77
|
+
%i[ TimestampUtc TimestampUtcToLocal TimestampLocal ].each do |klass|
|
78
|
+
autoload klass, 'pg/binary_decoder/timestamp'
|
79
|
+
end
|
80
|
+
autoload :Date, 'pg/binary_decoder/date'
|
81
|
+
end
|
82
|
+
module BinaryEncoder
|
83
|
+
%i[ TimestampUtc TimestampLocal ].each do |klass|
|
84
|
+
autoload klass, 'pg/binary_encoder/timestamp'
|
85
|
+
end
|
86
|
+
end
|
87
|
+
module TextDecoder
|
88
|
+
%i[ TimestampUtc TimestampUtcToLocal TimestampLocal TimestampWithoutTimeZone TimestampWithTimeZone ].each do |klass|
|
89
|
+
autoload klass, 'pg/text_decoder/timestamp'
|
90
|
+
end
|
91
|
+
autoload :Date, 'pg/text_decoder/date'
|
92
|
+
autoload :Inet, 'pg/text_decoder/inet'
|
93
|
+
autoload :JSON, 'pg/text_decoder/json'
|
94
|
+
autoload :Numeric, 'pg/text_decoder/numeric'
|
95
|
+
end
|
96
|
+
module TextEncoder
|
97
|
+
%i[ TimestampUtc TimestampWithoutTimeZone TimestampWithTimeZone ].each do |klass|
|
98
|
+
autoload klass, 'pg/text_encoder/timestamp'
|
99
|
+
end
|
100
|
+
autoload :Date, 'pg/text_encoder/date'
|
101
|
+
autoload :Inet, 'pg/text_encoder/inet'
|
102
|
+
autoload :JSON, 'pg/text_encoder/json'
|
103
|
+
autoload :Numeric, 'pg/text_encoder/numeric'
|
104
|
+
end
|
72
105
|
|
106
|
+
autoload :BasicTypeMapBasedOnResult, 'pg/basic_type_map_based_on_result'
|
107
|
+
autoload :BasicTypeMapForQueries, 'pg/basic_type_map_for_queries'
|
108
|
+
autoload :BasicTypeMapForResults, 'pg/basic_type_map_for_results'
|
109
|
+
autoload :BasicTypeRegistry, 'pg/basic_type_registry'
|
73
110
|
require 'pg/exceptions'
|
74
|
-
require 'pg/constants'
|
75
111
|
require 'pg/coder'
|
76
|
-
require 'pg/binary_decoder'
|
77
|
-
require 'pg/text_encoder'
|
78
|
-
require 'pg/text_decoder'
|
79
|
-
require 'pg/basic_type_registry'
|
80
|
-
require 'pg/basic_type_map_based_on_result'
|
81
|
-
require 'pg/basic_type_map_for_queries'
|
82
|
-
require 'pg/basic_type_map_for_results'
|
83
112
|
require 'pg/type_map_by_column'
|
84
113
|
require 'pg/connection'
|
85
114
|
require 'pg/result'
|
86
115
|
require 'pg/tuple'
|
87
|
-
|
116
|
+
autoload :VERSION, 'pg/version'
|
117
|
+
|
118
|
+
|
119
|
+
# Avoid "uninitialized constant Truffle::WarningOperations" on Truffleruby up to 22.3.1
|
120
|
+
if RUBY_ENGINE=="truffleruby" && !defined?(Truffle::WarningOperations)
|
121
|
+
module TruffleFixWarn
|
122
|
+
def warn(str, category=nil)
|
123
|
+
super(str)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
Warning.extend(TruffleFixWarn)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Ruby-3.4+ prints a warning, if bigdecimal is required but not in the Gemfile.
|
130
|
+
# But it's a false positive, since we enable bigdecimal depending features only if it's available.
|
131
|
+
# And most people don't need these features.
|
132
|
+
def self.require_bigdecimal_without_warning
|
133
|
+
oldverb, $VERBOSE = $VERBOSE, nil
|
134
|
+
require "bigdecimal"
|
135
|
+
ensure
|
136
|
+
$VERBOSE = oldverb
|
137
|
+
end
|
88
138
|
|
89
139
|
end # module PG
|
data/pg.gemspec
CHANGED
@@ -17,16 +17,20 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.metadata["homepage_uri"] = spec.homepage
|
19
19
|
spec.metadata["source_code_uri"] = "https://github.com/ged/ruby-pg"
|
20
|
-
spec.metadata["changelog_uri"] = "https://github.com/ged/ruby-pg/blob/master/History.
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/ged/ruby-pg/blob/master/History.md"
|
21
21
|
spec.metadata["documentation_uri"] = "http://deveiate.org/code/pg"
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
-
`git ls-files -z`.split("\x0").reject
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{\A(?:test|spec|features|translation|\.)})
|
28
|
+
end
|
27
29
|
end
|
28
30
|
spec.extensions = ["ext/extconf.rb"]
|
29
31
|
spec.require_paths = ["lib"]
|
30
32
|
spec.cert_chain = ["certs/ged.pem"]
|
31
|
-
spec.rdoc_options = ["--main", "README.
|
33
|
+
spec.rdoc_options = ["--main", "README.md",
|
34
|
+
"--title", "PG: The Ruby PostgreSQL Driver"]
|
35
|
+
spec.extra_rdoc_files = `git ls-files -z *.rdoc *.md lib/*.rb lib/*/*.rb lib/*/*/*.rb ext/*.c ext/*.h`.split("\x0")
|
32
36
|
end
|
data/rakelib/task_extension.rb
CHANGED
data.tar.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
}<�+�SR��~��w��6���k�
|
4
|
-
�B�O����;����Xtt��ge�~��`�6��pެjq�!��m��K���{�"8��j�M��,�44ֈ��S�����^|� �H�֞�S֨V�O��
|
1
|
+
��B����Pu�H����/T_J)�Wvb-vDj�í�,x�xJ?�0RR
|
2
|
+
��Xr�W %��e��Y���o���+"���
|
metadata
CHANGED
@@ -1,36 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.9
|
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
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
13
|
+
MIIEBDCCAmygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
|
14
|
+
L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDAyMjgxOTMxNDdaFw0yNTAy
|
15
|
+
MjcxOTMxNDdaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
|
16
|
+
PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
|
17
|
+
mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
|
18
|
+
eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
|
19
|
+
8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
|
20
|
+
SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
|
21
|
+
JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
|
22
|
+
eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
|
23
|
+
chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
|
24
|
+
9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
|
25
|
+
A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
|
26
|
+
7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEArBmHSfnUyNWf3R1Fx0mMHloWGdcKn2D2
|
27
|
+
BsqTApXU2nADiyppIqRq4b9e7hw342uzadSLkoQcEFOxThLRhAcijoWfQVBcsbV/
|
28
|
+
ZsCY1qlUTIJuSWxaSyS4efUX+N4eMNyPM9oW/sphlWFo0DgI34Y9WB6HDzH+O71y
|
29
|
+
R7PARke3f4kYnRJf5yRQLPDrH9UYt9KlBQm6l7XMtr5EMnQt0EfcmZEi9H4t/vS2
|
30
|
+
haxvpFMdAKo4H46GBYNO96r6b74t++vgQSBTg/AFVwvRZwNSrPPcBfb4xxeEAhRR
|
31
|
+
x+LU7feIH7lZ//3buiyD03gLAEtHXai0Y+/VfuWIpwYJAl2BO/tU7FS/dtbJq9oc
|
32
|
+
dI36Yyzy+BrCM0WT4oCsagePNb97FaNhl4F6sM5JEPT0ZPxRx0i3G4TNNIYziVos
|
33
|
+
5wFER6XhvvLDFAMh/jMg+s7Wd5SbSHgHNSUaUGVtdWkVPOer6oF0aLdZUR3CETkn
|
34
|
+
5nWXZma/BUd3YgYA/Xumc6QQqIS4p7mr
|
32
35
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
36
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
34
37
|
dependencies: []
|
35
38
|
description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
|
36
39
|
9.3 and later.
|
@@ -40,35 +43,81 @@ email:
|
|
40
43
|
executables: []
|
41
44
|
extensions:
|
42
45
|
- ext/extconf.rb
|
43
|
-
extra_rdoc_files:
|
46
|
+
extra_rdoc_files:
|
47
|
+
- Contributors.rdoc
|
48
|
+
- History.md
|
49
|
+
- README-OS_X.rdoc
|
50
|
+
- README-Windows.rdoc
|
51
|
+
- README.ja.md
|
52
|
+
- README.md
|
53
|
+
- ext/gvl_wrappers.c
|
54
|
+
- ext/gvl_wrappers.h
|
55
|
+
- ext/pg.c
|
56
|
+
- ext/pg.h
|
57
|
+
- ext/pg_binary_decoder.c
|
58
|
+
- ext/pg_binary_encoder.c
|
59
|
+
- ext/pg_coder.c
|
60
|
+
- ext/pg_connection.c
|
61
|
+
- ext/pg_copy_coder.c
|
62
|
+
- ext/pg_errors.c
|
63
|
+
- ext/pg_record_coder.c
|
64
|
+
- ext/pg_result.c
|
65
|
+
- ext/pg_text_decoder.c
|
66
|
+
- ext/pg_text_encoder.c
|
67
|
+
- ext/pg_tuple.c
|
68
|
+
- ext/pg_type_map.c
|
69
|
+
- ext/pg_type_map_all_strings.c
|
70
|
+
- ext/pg_type_map_by_class.c
|
71
|
+
- ext/pg_type_map_by_column.c
|
72
|
+
- ext/pg_type_map_by_mri_type.c
|
73
|
+
- ext/pg_type_map_by_oid.c
|
74
|
+
- ext/pg_type_map_in_ruby.c
|
75
|
+
- ext/pg_util.c
|
76
|
+
- ext/pg_util.h
|
77
|
+
- lib/pg.rb
|
78
|
+
- lib/pg/basic_type_map_based_on_result.rb
|
79
|
+
- lib/pg/basic_type_map_for_queries.rb
|
80
|
+
- lib/pg/basic_type_map_for_results.rb
|
81
|
+
- lib/pg/basic_type_registry.rb
|
82
|
+
- lib/pg/binary_decoder/date.rb
|
83
|
+
- lib/pg/binary_decoder/timestamp.rb
|
84
|
+
- lib/pg/binary_encoder/timestamp.rb
|
85
|
+
- lib/pg/coder.rb
|
86
|
+
- lib/pg/connection.rb
|
87
|
+
- lib/pg/exceptions.rb
|
88
|
+
- lib/pg/result.rb
|
89
|
+
- lib/pg/text_decoder/date.rb
|
90
|
+
- lib/pg/text_decoder/inet.rb
|
91
|
+
- lib/pg/text_decoder/json.rb
|
92
|
+
- lib/pg/text_decoder/numeric.rb
|
93
|
+
- lib/pg/text_decoder/timestamp.rb
|
94
|
+
- lib/pg/text_encoder/date.rb
|
95
|
+
- lib/pg/text_encoder/inet.rb
|
96
|
+
- lib/pg/text_encoder/json.rb
|
97
|
+
- lib/pg/text_encoder/numeric.rb
|
98
|
+
- lib/pg/text_encoder/timestamp.rb
|
99
|
+
- lib/pg/tuple.rb
|
100
|
+
- lib/pg/type_map_by_column.rb
|
101
|
+
- lib/pg/version.rb
|
44
102
|
files:
|
45
|
-
- ".appveyor.yml"
|
46
|
-
- ".gems"
|
47
|
-
- ".gemtest"
|
48
|
-
- ".github/workflows/binary-gems.yml"
|
49
|
-
- ".github/workflows/source-gem.yml"
|
50
|
-
- ".gitignore"
|
51
|
-
- ".hgsigs"
|
52
|
-
- ".hgtags"
|
53
|
-
- ".irbrc"
|
54
|
-
- ".pryrc"
|
55
|
-
- ".tm_properties"
|
56
|
-
- ".travis.yml"
|
57
103
|
- BSDL
|
58
104
|
- Contributors.rdoc
|
59
105
|
- Gemfile
|
60
|
-
- History.
|
106
|
+
- History.md
|
61
107
|
- LICENSE
|
62
108
|
- Manifest.txt
|
63
109
|
- POSTGRES
|
64
110
|
- README-OS_X.rdoc
|
65
111
|
- README-Windows.rdoc
|
66
|
-
- README.ja.
|
67
|
-
- README.
|
112
|
+
- README.ja.md
|
113
|
+
- README.md
|
68
114
|
- Rakefile
|
69
115
|
- Rakefile.cross
|
70
116
|
- certs/ged.pem
|
117
|
+
- certs/kanis@comcard.de.pem
|
71
118
|
- certs/larskanis-2022.pem
|
119
|
+
- certs/larskanis-2023.pem
|
120
|
+
- certs/larskanis-2024.pem
|
72
121
|
- ext/errorcodes.def
|
73
122
|
- ext/errorcodes.rb
|
74
123
|
- ext/errorcodes.txt
|
@@ -105,14 +154,23 @@ files:
|
|
105
154
|
- lib/pg/basic_type_map_for_queries.rb
|
106
155
|
- lib/pg/basic_type_map_for_results.rb
|
107
156
|
- lib/pg/basic_type_registry.rb
|
108
|
-
- lib/pg/binary_decoder.rb
|
157
|
+
- lib/pg/binary_decoder/date.rb
|
158
|
+
- lib/pg/binary_decoder/timestamp.rb
|
159
|
+
- lib/pg/binary_encoder/timestamp.rb
|
109
160
|
- lib/pg/coder.rb
|
110
161
|
- lib/pg/connection.rb
|
111
|
-
- lib/pg/constants.rb
|
112
162
|
- lib/pg/exceptions.rb
|
113
163
|
- lib/pg/result.rb
|
114
|
-
- lib/pg/text_decoder.rb
|
115
|
-
- lib/pg/
|
164
|
+
- lib/pg/text_decoder/date.rb
|
165
|
+
- lib/pg/text_decoder/inet.rb
|
166
|
+
- lib/pg/text_decoder/json.rb
|
167
|
+
- lib/pg/text_decoder/numeric.rb
|
168
|
+
- lib/pg/text_decoder/timestamp.rb
|
169
|
+
- lib/pg/text_encoder/date.rb
|
170
|
+
- lib/pg/text_encoder/inet.rb
|
171
|
+
- lib/pg/text_encoder/json.rb
|
172
|
+
- lib/pg/text_encoder/numeric.rb
|
173
|
+
- lib/pg/text_encoder/timestamp.rb
|
116
174
|
- lib/pg/tuple.rb
|
117
175
|
- lib/pg/type_map_by_column.rb
|
118
176
|
- lib/pg/version.rb
|
@@ -154,12 +212,13 @@ licenses:
|
|
154
212
|
metadata:
|
155
213
|
homepage_uri: https://github.com/ged/ruby-pg
|
156
214
|
source_code_uri: https://github.com/ged/ruby-pg
|
157
|
-
changelog_uri: https://github.com/ged/ruby-pg/blob/master/History.
|
215
|
+
changelog_uri: https://github.com/ged/ruby-pg/blob/master/History.md
|
158
216
|
documentation_uri: http://deveiate.org/code/pg
|
159
|
-
post_install_message:
|
160
217
|
rdoc_options:
|
161
218
|
- "--main"
|
162
|
-
- README.
|
219
|
+
- README.md
|
220
|
+
- "--title"
|
221
|
+
- 'PG: The Ruby PostgreSQL Driver'
|
163
222
|
require_paths:
|
164
223
|
- lib
|
165
224
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -173,8 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
232
|
- !ruby/object:Gem::Version
|
174
233
|
version: '0'
|
175
234
|
requirements: []
|
176
|
-
rubygems_version: 3.
|
177
|
-
signing_key:
|
235
|
+
rubygems_version: 3.6.0.dev
|
178
236
|
specification_version: 4
|
179
237
|
summary: Pg is the Ruby interface to the PostgreSQL RDBMS
|
180
238
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
data/.appveyor.yml
DELETED
@@ -1,36 +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 /verysilent /dir=C:/Ruby$env:ruby_version
|
11
|
-
}
|
12
|
-
- ruby --version
|
13
|
-
- gem --version
|
14
|
-
- gem install bundler --conservative
|
15
|
-
- bundle install
|
16
|
-
- ps: |
|
17
|
-
if ($env:PGVERSION -ne $null)
|
18
|
-
{
|
19
|
-
$(new-object net.webclient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-' + $env:PGVERSION + '.exe', 'C:/postgresql-setup.exe')
|
20
|
-
cmd /c "C:/postgresql-setup.exe" --mode unattended --extract-only 1
|
21
|
-
}
|
22
|
-
$env:PATH = 'C:/Program Files/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
|
23
|
-
$env:PATH = 'C:/Program Files (x86)/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
|
24
|
-
build_script:
|
25
|
-
- bundle exec rake -rdevkit compile --trace
|
26
|
-
test_script:
|
27
|
-
- bundle exec rake test PG_DEBUG=0
|
28
|
-
environment:
|
29
|
-
matrix:
|
30
|
-
- ruby_version: "head"
|
31
|
-
RUBYDOWNLOAD: x86
|
32
|
-
PGVERSION: 10.20-1-windows
|
33
|
-
PGVER: 10
|
34
|
-
- ruby_version: "25"
|
35
|
-
PGVERSION: 9.3.25-1-windows
|
36
|
-
PGVER: 9.3
|
data/.gems
DELETED
data/.gemtest
DELETED
File without changes
|
@@ -1,86 +0,0 @@
|
|
1
|
-
name: Binary gems
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
job_build_x64:
|
7
|
-
name: build
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
strategy:
|
10
|
-
fail-fast: false
|
11
|
-
matrix:
|
12
|
-
include:
|
13
|
-
- platform: "x64-mingw-ucrt"
|
14
|
-
- platform: "x64-mingw32"
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v2
|
17
|
-
- name: Set up Ruby
|
18
|
-
uses: ruby/setup-ruby@v1
|
19
|
-
with:
|
20
|
-
ruby-version: "3.1"
|
21
|
-
- run: bundle install
|
22
|
-
|
23
|
-
- name: Create a dummy cert to satisfy the build
|
24
|
-
run: |
|
25
|
-
mkdir -p ~/.gem/
|
26
|
-
ruby -ropenssl -e "puts OpenSSL::PKey::RSA.new(2048).to_pem" > ~/.gem/gem-private_key.pem
|
27
|
-
gem cert --build travis-ci@dummy.org --private-key ~/.gem/gem-private_key.pem
|
28
|
-
cp gem-public_cert.pem ~/.gem/gem-public_cert.pem
|
29
|
-
|
30
|
-
- name: Build binary gem
|
31
|
-
run: bundle exec rake gem:windows:${{ matrix.platform }}
|
32
|
-
|
33
|
-
- name: Upload binary gem
|
34
|
-
uses: actions/upload-artifact@v2
|
35
|
-
with:
|
36
|
-
name: binary-gem
|
37
|
-
path: pkg/*.gem
|
38
|
-
|
39
|
-
job_test_binary:
|
40
|
-
name: Test on Windows
|
41
|
-
needs: job_build_x64
|
42
|
-
strategy:
|
43
|
-
fail-fast: false
|
44
|
-
matrix:
|
45
|
-
include:
|
46
|
-
- ruby: "3.1"
|
47
|
-
platform: "x64-mingw-ucrt"
|
48
|
-
PGVERSION: 15.0-rc1-windows-x64
|
49
|
-
- ruby: "2.5"
|
50
|
-
platform: "x64-mingw32"
|
51
|
-
PGVERSION: 10.20-1-windows
|
52
|
-
|
53
|
-
runs-on: windows-latest
|
54
|
-
env:
|
55
|
-
PGVERSION: ${{ matrix.PGVERSION }}
|
56
|
-
steps:
|
57
|
-
- uses: actions/checkout@v2
|
58
|
-
- name: Set up Ruby
|
59
|
-
uses: ruby/setup-ruby@v1
|
60
|
-
with:
|
61
|
-
ruby-version: ${{ matrix.ruby }}
|
62
|
-
|
63
|
-
- name: Download gem from build job
|
64
|
-
uses: actions/download-artifact@v2
|
65
|
-
with:
|
66
|
-
name: binary-gem
|
67
|
-
|
68
|
-
- name: Download PostgreSQL
|
69
|
-
run: |
|
70
|
-
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
71
|
-
function Unzip {
|
72
|
-
param([string]$zipfile, [string]$outpath)
|
73
|
-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
74
|
-
}
|
75
|
-
|
76
|
-
$(new-object net.webclient).DownloadFile("http://get.enterprisedb.com/postgresql/postgresql-$env:PGVERSION-binaries.zip", "postgresql-binaries.zip")
|
77
|
-
Unzip "postgresql-binaries.zip" "."
|
78
|
-
echo "$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
79
|
-
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
80
|
-
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
81
|
-
|
82
|
-
- run: gem update --system
|
83
|
-
- run: bundle install
|
84
|
-
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
|
85
|
-
- name: Run specs
|
86
|
-
run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
|
@@ -1,131 +0,0 @@
|
|
1
|
-
name: Source gem
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
job_build_gem:
|
7
|
-
name: build
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
steps:
|
10
|
-
- uses: actions/checkout@v2
|
11
|
-
- name: Set up Ruby
|
12
|
-
uses: ruby/setup-ruby@v1
|
13
|
-
with:
|
14
|
-
ruby-version: "3.1"
|
15
|
-
|
16
|
-
- name: Build source gem
|
17
|
-
run: gem build pg.gemspec
|
18
|
-
|
19
|
-
- name: Upload source gem
|
20
|
-
uses: actions/upload-artifact@v2
|
21
|
-
with:
|
22
|
-
name: source-gem
|
23
|
-
path: "*.gem"
|
24
|
-
|
25
|
-
job_test_gem:
|
26
|
-
name: Test built gem
|
27
|
-
needs: job_build_gem
|
28
|
-
strategy:
|
29
|
-
fail-fast: false
|
30
|
-
matrix:
|
31
|
-
include:
|
32
|
-
- os: windows
|
33
|
-
ruby: "head"
|
34
|
-
PGVERSION: 15.0-rc1-windows-x64
|
35
|
-
PGVER: "14"
|
36
|
-
- os: windows
|
37
|
-
ruby: "2.5"
|
38
|
-
PGVERSION: 9.4.26-1-windows-x64
|
39
|
-
PGVER: "9.4"
|
40
|
-
- os: ubuntu
|
41
|
-
ruby: "head"
|
42
|
-
PGVER: "14"
|
43
|
-
- os: ubuntu
|
44
|
-
ruby: "3.1"
|
45
|
-
PGVER: "12"
|
46
|
-
- os: ubuntu
|
47
|
-
ruby: "2.5"
|
48
|
-
PGVER: "9.3"
|
49
|
-
- os: ubuntu
|
50
|
-
ruby: "truffleruby"
|
51
|
-
PGVER: "13"
|
52
|
-
- os: ubuntu
|
53
|
-
ruby: "truffleruby-head"
|
54
|
-
PGVER: "14"
|
55
|
-
- os: macos
|
56
|
-
ruby: "head"
|
57
|
-
PGVERSION: 13.8-1-osx
|
58
|
-
PGVER: "13"
|
59
|
-
|
60
|
-
runs-on: ${{ matrix.os }}-latest
|
61
|
-
env:
|
62
|
-
PGVERSION: ${{ matrix.PGVERSION }}
|
63
|
-
PGVER: ${{ matrix.PGVER }}
|
64
|
-
MAKE: make -j2 V=1
|
65
|
-
|
66
|
-
steps:
|
67
|
-
- uses: actions/checkout@v2
|
68
|
-
- name: Set up Ruby
|
69
|
-
uses: ruby/setup-ruby@v1
|
70
|
-
with:
|
71
|
-
ruby-version: ${{ matrix.ruby }}
|
72
|
-
|
73
|
-
- name: Download gem from build job
|
74
|
-
uses: actions/download-artifact@v2
|
75
|
-
with:
|
76
|
-
name: source-gem
|
77
|
-
|
78
|
-
- name: Install required packages Windows
|
79
|
-
if: matrix.os == 'windows'
|
80
|
-
shell: cmd
|
81
|
-
run: ridk exec sh -c "pacman --sync --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-gcc"
|
82
|
-
|
83
|
-
- name: Download PostgreSQL Windows
|
84
|
-
if: matrix.os == 'windows'
|
85
|
-
run: |
|
86
|
-
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
87
|
-
function Unzip {
|
88
|
-
param([string]$zipfile, [string]$outpath)
|
89
|
-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
90
|
-
}
|
91
|
-
|
92
|
-
$(new-object net.webclient).DownloadFile("http://get.enterprisedb.com/postgresql/postgresql-$env:PGVERSION-binaries.zip", "postgresql-binaries.zip")
|
93
|
-
Unzip "postgresql-binaries.zip" "."
|
94
|
-
echo "$pwd/pgsql/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
95
|
-
echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
96
|
-
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
97
|
-
|
98
|
-
- name: Download PostgreSQL Ubuntu
|
99
|
-
if: matrix.os == 'ubuntu'
|
100
|
-
run: |
|
101
|
-
echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main $PGVER" | sudo tee -a /etc/apt/sources.list.d/pgdg.list
|
102
|
-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
103
|
-
sudo apt -y update
|
104
|
-
sudo apt -y --allow-downgrades install postgresql-$PGVER libpq5=$PGVER* libpq-dev=$PGVER*
|
105
|
-
echo /usr/lib/postgresql/$PGVER/bin >> $GITHUB_PATH
|
106
|
-
|
107
|
-
- name: Download PostgreSQL Macos
|
108
|
-
if: matrix.os == 'macos'
|
109
|
-
run: |
|
110
|
-
wget https://get.enterprisedb.com/postgresql/postgresql-$PGVERSION-binaries.zip && \
|
111
|
-
sudo mkdir -p /Library/PostgreSQL && \
|
112
|
-
sudo unzip postgresql-$PGVERSION-binaries.zip -d /Library/PostgreSQL/$PGVER && \
|
113
|
-
echo /Library/PostgreSQL/$PGVER/bin >> $GITHUB_PATH
|
114
|
-
|
115
|
-
- run: gem update --system
|
116
|
-
- run: bundle install
|
117
|
-
|
118
|
-
- run: gem install --local *.gem --verbose
|
119
|
-
|
120
|
-
- name: Run specs
|
121
|
-
env:
|
122
|
-
PG_DEBUG: 0
|
123
|
-
run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc
|
124
|
-
|
125
|
-
- name: Print logs if job failed
|
126
|
-
if: ${{ failure() && matrix.os == 'windows' }}
|
127
|
-
run: ridk exec cat tmp_test_specs/*.log
|
128
|
-
|
129
|
-
- name: Print logs if job failed
|
130
|
-
if: ${{ failure() && matrix.os != 'windows' }}
|
131
|
-
run: cat tmp_test_specs/*.log
|