sequel_pg 1.12.0 → 1.12.1

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: 96c16261374320f8dfec253707af53c799ea5a9f34110a0cfe1dc3c909651aab
4
- data.tar.gz: dafd8b441554f5befa9e77cb6ee0c7e743054f0fbf481a6ba2885fec5ea7e01c
3
+ metadata.gz: 528cbe96782613e32c825226124c36d6f7b787689bcd0862464cd8e2e85427bf
4
+ data.tar.gz: 2d5d75d6268b6343111e0063472da702a03b819d314f00c0e9dc3d9cc8ba65dc
5
5
  SHA512:
6
- metadata.gz: e8fc58d763a43e1ef56f51eaea4d835ffc1c6acdb28d1e40914c90a5537d4f25e9aaf1fb927559964c17a7c1889d359a7ebfd058e6c15484eaf965cd0ff93e2d
7
- data.tar.gz: 8de13c929838df473df991880fcb87180471c6476dcfe6429f16679d3d4af4b815c7fdb33f61a2b2d08451127424ca7a0d52286b260d84d885add6dd3c6e834d
6
+ metadata.gz: 4299be5ad9579b0b7eea466b432d78b6c2b6dfe90a2198a9bdc2994a17aed462955553b6f4fb7a4bcb8d43b0f70c34552cf6e0db452dc4fe364bf586cece97f7
7
+ data.tar.gz: 4e27c83e62b1524f1265a9dc3c91c6d77de4a24a2a371048f9ccff4a41472fca46dbf5868bcd9da4cf95dfcf7fcbf61153134d563e2ad86707d2e55a5c9e0db9
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ === 1.12.1 (2019-05-31)
2
+
3
+ * Avoid using Proc.new without block, fixing deprecation warning on ruby 2.7+ (jeremyevans)
4
+
5
+ * Use rb_gc_register_mark_object instead of rb_global_variable (jeremyevans)
6
+
7
+ * Use pkg_config instead of pg_config for configuration (jeremyevans) (#31)
8
+
1
9
  === 1.12.0 (2019-03-01)
2
10
 
3
11
  * Allow Dataset#paged_each to be called without a block when using streaming (jeremyevans)
@@ -1,8 +1,11 @@
1
1
  require 'mkmf'
2
2
  $CFLAGS << " -O0 -g" if ENV['DEBUG']
3
3
  $CFLAGS << " -Wall " unless RUBY_PLATFORM =~ /solaris/
4
+
5
+ if ENV["POSTGRES_INCLUDE"] || ENV["POSTGRES_LIB"] || !pkg_config('libpq')
4
6
  dir_config('pg', ENV["POSTGRES_INCLUDE"] || (IO.popen("pg_config --includedir").readline.chomp rescue nil),
5
7
  ENV["POSTGRES_LIB"] || (IO.popen("pg_config --libdir").readline.chomp rescue nil))
8
+ end
6
9
 
7
10
  if (have_library('pq') || have_library('libpq') || have_library('ms/libpq')) && have_header('libpq-fe.h')
8
11
  have_func 'PQsetSingleRowMode'
@@ -1,4 +1,4 @@
1
- #define SEQUEL_PG_VERSION_INTEGER 11200
1
+ #define SEQUEL_PG_VERSION_INTEGER 11201
2
2
 
3
3
  #include <string.h>
4
4
  #include <stdio.h>
@@ -1745,7 +1745,7 @@ void Init_sequel_pg(void) {
1745
1745
  VALUE c, spg_Postgres;
1746
1746
 
1747
1747
  spg_Sequel = rb_const_get(rb_cObject, rb_intern("Sequel"));
1748
- rb_global_variable(&spg_Sequel);
1748
+ rb_gc_register_mark_object(spg_Sequel);
1749
1749
  spg_Postgres = rb_const_get(spg_Sequel, rb_intern("Postgres"));
1750
1750
 
1751
1751
  if(rb_obj_respond_to(spg_Postgres, rb_intern("sequel_pg_version_supported?"), 0)) {
@@ -1837,35 +1837,35 @@ void Init_sequel_pg(void) {
1837
1837
  spg_sym_cidr = ID2SYM(rb_intern("cidr"));
1838
1838
 
1839
1839
  spg_Blob = rb_const_get(rb_const_get(spg_Sequel, rb_intern("SQL")), rb_intern("Blob"));
1840
- rb_global_variable(&spg_Blob);
1840
+ rb_gc_register_mark_object(spg_Blob);
1841
1841
  spg_Blob_instance = rb_obj_freeze(rb_funcall(spg_Blob, spg_id_new, 0));
1842
- rb_global_variable(&spg_Blob_instance);
1842
+ rb_gc_register_mark_object(spg_Blob_instance);
1843
1843
  spg_SQLTime = rb_const_get(spg_Sequel, rb_intern("SQLTime"));
1844
- rb_global_variable(&spg_SQLTime);
1844
+ rb_gc_register_mark_object(spg_SQLTime);
1845
1845
  spg_Date = rb_const_get(rb_cObject, rb_intern("Date"));
1846
- rb_global_variable(&spg_Date);
1846
+ rb_gc_register_mark_object(spg_Date);
1847
1847
  spg_DateTime = rb_const_get(rb_cObject, rb_intern("DateTime"));
1848
- rb_global_variable(&spg_DateTime);
1848
+ rb_gc_register_mark_object(spg_DateTime);
1849
1849
  spg_PGError = rb_const_get(rb_const_get(rb_cObject, rb_intern("PG")), rb_intern("Error"));
1850
- rb_global_variable(&spg_PGError);
1850
+ rb_gc_register_mark_object(spg_PGError);
1851
1851
 
1852
1852
  spg_nan = rb_eval_string("0.0/0.0");
1853
- rb_global_variable(&spg_nan);
1853
+ rb_gc_register_mark_object(spg_nan);
1854
1854
  spg_pos_inf = rb_eval_string("1.0/0.0");
1855
- rb_global_variable(&spg_pos_inf);
1855
+ rb_gc_register_mark_object(spg_pos_inf);
1856
1856
  spg_neg_inf = rb_eval_string("-1.0/0.0");
1857
- rb_global_variable(&spg_neg_inf);
1857
+ rb_gc_register_mark_object(spg_neg_inf);
1858
1858
  spg_usec_per_day = ULL2NUM(86400000000ULL);
1859
- rb_global_variable(&spg_usec_per_day);
1859
+ rb_gc_register_mark_object(spg_usec_per_day);
1860
1860
 
1861
1861
  rb_require("ipaddr");
1862
1862
  spg_IPAddr = rb_const_get(rb_cObject, rb_intern("IPAddr"));
1863
- rb_global_variable(&spg_IPAddr);
1863
+ rb_gc_register_mark_object(spg_IPAddr);
1864
1864
  spg_use_ipaddr_alloc = RTEST(rb_eval_string("IPAddr.new.instance_variables.sort == [:@addr, :@family, :@mask_addr]"));
1865
1865
  spg_vmasks4 = rb_eval_string("a = [0]*33; a[0] = 0; a[32] = 0xffffffff; 31.downto(1){|i| a[i] = a[i+1] - (1 << (31 - i))}; a.freeze");
1866
- rb_global_variable(&spg_vmasks4);
1866
+ rb_gc_register_mark_object(spg_vmasks4);
1867
1867
  spg_vmasks6 = rb_eval_string("a = [0]*129; a[0] = 0; a[128] = 0xffffffffffffffffffffffffffffffff; 127.downto(1){|i| a[i] = a[i+1] - (1 << (127 - i))}; a.freeze");
1868
- rb_global_variable(&spg_vmasks6);
1868
+ rb_gc_register_mark_object(spg_vmasks6);
1869
1869
 
1870
1870
  c = rb_const_get(spg_Postgres, rb_intern("Dataset"));
1871
1871
  rb_undef_method(c, "yield_hash_rows");
@@ -1891,5 +1891,5 @@ void Init_sequel_pg(void) {
1891
1891
 
1892
1892
  rb_require("sequel/extensions/pg_array");
1893
1893
  spg_PGArray = rb_const_get(spg_Postgres, rb_intern("PGArray"));
1894
- rb_global_variable(&spg_PGArray);
1894
+ rb_gc_register_mark_object(spg_PGArray);
1895
1895
  }
@@ -74,9 +74,9 @@ class Sequel::Postgres::Dataset
74
74
  if defined?(Sequel::Model::ClassMethods)
75
75
  # If model loads are being optimized and this is a model load, use the optimized
76
76
  # version.
77
- def each
77
+ def each(&block)
78
78
  if optimize_model_load?
79
- clone(:_sequel_pg_type=>:model, :_sequel_pg_value=>row_proc).fetch_rows(sql, &Proc.new)
79
+ clone(:_sequel_pg_type=>:model, :_sequel_pg_value=>row_proc).fetch_rows(sql, &block)
80
80
  else
81
81
  super
82
82
  end
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.0
4
+ version: 1.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2019-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -67,7 +67,12 @@ files:
67
67
  homepage: http://github.com/jeremyevans/sequel_pg
68
68
  licenses:
69
69
  - MIT
70
- metadata: {}
70
+ metadata:
71
+ bug_tracker_uri: https://github.com/jeremyevans/sequel_pg/issues
72
+ changelog_uri: https://github.com/jeremyevans/sequel_pg/blob/master/CHANGELOG
73
+ documentation_uri: https://github.com/jeremyevans/sequel_pg/blob/master/README.rdoc
74
+ mailing_list_uri: https://groups.google.com/forum/#!forum/sequel-talk
75
+ source_code_uri: https://github.com/jeremyevans/sequel_pg
71
76
  post_install_message:
72
77
  rdoc_options:
73
78
  - "--quiet"
@@ -90,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
95
  - !ruby/object:Gem::Version
91
96
  version: '0'
92
97
  requirements: []
93
- rubygems_version: 3.0.1
98
+ rubygems_version: 3.0.3
94
99
  signing_key:
95
100
  specification_version: 4
96
101
  summary: Faster SELECTs when using Sequel with pg