sequel_pg 1.12.2 → 1.12.3
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
- data/CHANGELOG +6 -0
- data/ext/sequel_pg/extconf.rb +1 -0
- data/ext/sequel_pg/sequel_pg.c +12 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aba501d64a105015ec751eed0129f7e9526dd613c3621db1ec4713921561536
|
4
|
+
data.tar.gz: 71165fae43b6eff200f11d37bd7f28eb5a2a88616e0e5ce510da556d964b4bb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74619fbbd3fb1ebff4ebbdb570146cc7c2b1c5d233e5355c2f70b9d96b004a88810a4d1965bb2bf3cea4424d3300e7438218ddbeca1c964de493c8f82eb06c8a
|
7
|
+
data.tar.gz: 199a540202e4332dfe30f71ee55cc0a1d1e4d258293c7195f1d6c5c60b1f5c286f7ec3fe4d621540cfe5e2429a6b8d7e79f5fb7f7f220798d0ce7da08279d45a
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
=== 1.12.3 (2020-01-02)
|
2
|
+
|
3
|
+
* Warn and do not load sequel_pg if pg >1.2 is used (jeremyevans)
|
4
|
+
|
5
|
+
* Avoid verbose warnings on Ruby 2.7 due to tainting (jeremyevans)
|
6
|
+
|
1
7
|
=== 1.12.2 (2019-06-06)
|
2
8
|
|
3
9
|
* Avoid use of pkg_config as it breaks compilation in some environments (jeremyevans) (#33)
|
data/ext/sequel_pg/extconf.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
$CFLAGS << " -O0 -g" if ENV['DEBUG']
|
3
|
+
$CFLAGS << " -Drb_tainted_str_new=rb_str_new -DNO_TAINT" if RUBY_VERSION >= '2.7'
|
3
4
|
$CFLAGS << " -Wall " unless RUBY_PLATFORM =~ /solaris/
|
4
5
|
dir_config('pg', ENV["POSTGRES_INCLUDE"] || (IO.popen("pg_config --includedir").readline.chomp rescue nil),
|
5
6
|
ENV["POSTGRES_LIB"] || (IO.popen("pg_config --libdir").readline.chomp rescue nil))
|
data/ext/sequel_pg/sequel_pg.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#define SEQUEL_PG_VERSION_INTEGER
|
1
|
+
#define SEQUEL_PG_VERSION_INTEGER 11203
|
2
2
|
|
3
3
|
#include <string.h>
|
4
4
|
#include <stdio.h>
|
@@ -409,7 +409,7 @@ static VALUE spg_timestamp_error(const char *s, VALUE self, const char *error_ms
|
|
409
409
|
self = rb_funcall(self, spg_id_db, 0);
|
410
410
|
if(RTEST(rb_funcall(self, spg_id_convert_infinite_timestamps, 0))) {
|
411
411
|
if((strcmp(s, "infinity") == 0) || (strcmp(s, "-infinity") == 0)) {
|
412
|
-
return rb_funcall(self, spg_id_infinite_timestamp_value, 1,
|
412
|
+
return rb_funcall(self, spg_id_infinite_timestamp_value, 1, rb_tainted_str_new(s, strlen(s)));
|
413
413
|
}
|
414
414
|
}
|
415
415
|
rb_raise(rb_eArgError, "%s", error_msg);
|
@@ -857,7 +857,11 @@ static VALUE spg_create_Blob(VALUE v) {
|
|
857
857
|
if (bi->blob_string == NULL) {
|
858
858
|
rb_raise(rb_eNoMemError, "PQunescapeBytea failure: probably not enough memory");
|
859
859
|
}
|
860
|
-
|
860
|
+
v = rb_str_new_with_class(spg_Blob_instance, bi->blob_string, bi->length);
|
861
|
+
#ifndef NO_TAINT
|
862
|
+
rb_obj_taint(v);
|
863
|
+
#endif
|
864
|
+
return v;
|
861
865
|
}
|
862
866
|
|
863
867
|
static VALUE spg_fetch_rows_set_cols(VALUE self, VALUE ignore) {
|
@@ -1754,6 +1758,11 @@ void Init_sequel_pg(void) {
|
|
1754
1758
|
return;
|
1755
1759
|
}
|
1756
1760
|
}
|
1761
|
+
|
1762
|
+
if (RTEST(rb_eval_string("defined?(PG::VERSION) && PG::VERSION.to_f >= 1.2"))) {
|
1763
|
+
rb_warn("sequel_pg not loaded as it is not compatible with the ruby-pg version in use; uninstall sequel_pg or downgrade pg to 1.1.4");
|
1764
|
+
return;
|
1765
|
+
}
|
1757
1766
|
|
1758
1767
|
rb_const_set(spg_Postgres, rb_intern("SEQUEL_PG_VERSION_INTEGER"), INT2FIX(SEQUEL_PG_VERSION_INTEGER));
|
1759
1768
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.
|
98
|
+
rubygems_version: 3.1.2
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Faster SELECTs when using Sequel with pg
|