tiny_tds 2.1.1-x86-mingw32 → 2.1.2-x86-mingw32

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
- SHA1:
3
- metadata.gz: 22d04dbef08955be283a8074f03f508c88e2ea9f
4
- data.tar.gz: c70bae716a000300500eeb3553d9305aa50e9a69
2
+ SHA256:
3
+ metadata.gz: b3f3db42f5225c5fb96bc70681536f5113257620bcd15fe85d8132739ca40518
4
+ data.tar.gz: f8206a4ca4abc5402a4701c59d7838b210e6714b837115026ba079cb12a31c16
5
5
  SHA512:
6
- metadata.gz: 369ae5ce4b75708015da1eea6b28ce32c259c4bdce8d3f462bc9246372e0f8fe53e6ab53dabb21b0fecc523855400f283cbb23d53726932e89f683f1237db208
7
- data.tar.gz: 568f46e6353f31275a9f2687db633839b80b33b3fcba0a0452d6a0f1a45212a1f785a191b3b515ca365bfcb5627c802e69ee0d3f7ee6aac3d015d50daae47e9b
6
+ metadata.gz: 8ccbc94268ea7d24c7da46ab92f0dada3bf40fab69eab9e90f400a599baae84a835253385ad46347acab30d320cc6d7239f3685eebafc885d70c2a2fe731b88b
7
+ data.tar.gz: f53428e24b1338cd43aeae307c01da2613914dc623f3763c7f762e7821aab69baa78bd6ebb8f5f48a2eb2f35732b3f827ad389e855f18c66ece65e16a4f66ffd
@@ -1,3 +1,14 @@
1
+ ## 2.1.2
2
+
3
+ * Use Kernel.BigDecimal vs BigDecimal.new. Fixes #409.
4
+ * Change `DBSETUTF16` abscence warning message. Fixes #410.
5
+ * Add Windows binary for Ruby-2.5. Fixes #408.
6
+
7
+ ## 2.1.1
8
+
9
+ * Move message_handler from a shared value to userdata.
10
+
11
+
1
12
  ## 2.1.0
2
13
 
3
14
  * Support RubyInstaller2 for Windows. Fixes #365.
data/README.md CHANGED
@@ -1,9 +1,7 @@
1
1
  # TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
2
2
 
3
3
  * [![TravisCI](https://travis-ci.org/rails-sqlserver/tiny_tds.svg?branch=master)](https://travis-ci.org/rails-sqlserver/tiny_tds) - TravisCI
4
- * [![CircleCI](https://circleci.com/gh/rails-sqlserver/tiny_tds/tree/master.svg?style=svg)](https://circleci.com/gh/rails-sqlserver/tiny_tds/tree/master) - CircleCI
5
4
  * [![Build Status](https://ci.appveyor.com/api/projects/status/g2bhhbsdkx0mal55/branch/master?svg=true)](https://ci.appveyor.com/project/rails-sqlserver/tiny-tds/branch/master) - Appveyor
6
- * [![Code Climate](https://codeclimate.com/github/rails-sqlserver/tiny_tds/badges/gpa.svg)](https://codeclimate.com/github/rails-sqlserver/tiny_tds) - Code Climate
7
5
  * [![Gem Version](https://img.shields.io/gem/v/tiny_tds.svg)](https://rubygems.org/gems/tiny_tds) - Gem Version
8
6
  * [![Dependency Status](https://dependencyci.com/github/rails-sqlserver/tiny_tds/badge)](https://dependencyci.com/github/rails-sqlserver/tiny_tds) - Dependency Status
9
7
  * [![Gitter chat](https://img.shields.io/badge/%E2%8A%AA%20GITTER%20-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/rails-sqlserver/activerecord-sqlserver-adapter) - Community
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.1.2
@@ -362,7 +362,7 @@ static VALUE rb_tinytds_connect(VALUE self, VALUE opts) {
362
362
  if (use_utf16 == Qfalse) { DBSETLUTF16(cwrap->login, 0); }
363
363
  #else
364
364
  if (use_utf16 == Qtrue || use_utf16 == Qfalse) {
365
- rb_warn("TinyTds: :use_utf16 option not supported in this version of FreeTDS.\n");
365
+ rb_warning("TinyTds: Please consider upgrading to FreeTDS 0.99 or higher for better unicode support.\n");
366
366
  }
367
367
  #endif
368
368
 
@@ -6,10 +6,10 @@
6
6
 
7
7
  VALUE cTinyTdsResult;
8
8
  extern VALUE mTinyTds, cTinyTdsClient, cTinyTdsError;
9
- VALUE cBigDecimal, cDate;
9
+ VALUE cKernel, cDate;
10
10
  VALUE opt_decimal_zero, opt_float_zero, opt_one, opt_zero, opt_four, opt_19hdr, opt_onek, opt_tenk, opt_onemil, opt_onebil;
11
11
  static ID intern_new, intern_utc, intern_local, intern_localtime, intern_merge,
12
- intern_civil, intern_new_offset, intern_plus, intern_divide;
12
+ intern_civil, intern_new_offset, intern_plus, intern_divide, intern_bigd;
13
13
  static ID sym_symbolize_keys, sym_as, sym_array, sym_cache_rows, sym_first, sym_timezone, sym_local, sym_utc, sym_empty_sets;
14
14
 
15
15
 
@@ -228,7 +228,7 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
228
228
  int data_slength = (int)data_info->precision + (int)data_info->scale + 1;
229
229
  char converted_decimal[data_slength];
230
230
  dbconvert(rwrap->client, coltype, data, data_len, SYBVARCHAR, (BYTE *)converted_decimal, -1);
231
- val = rb_funcall(cBigDecimal, intern_new, 1, rb_str_new2((char *)converted_decimal));
231
+ val = rb_funcall(cKernel, intern_bigd, 1, rb_str_new2((char *)converted_decimal));
232
232
  break;
233
233
  }
234
234
  case SYBFLT8: {
@@ -246,7 +246,7 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
246
246
  char converted_money[25];
247
247
  long long money_value = ((long long)money->mnyhigh << 32) | money->mnylow;
248
248
  sprintf(converted_money, "%" LONG_LONG_FORMAT, money_value);
249
- val = rb_funcall(cBigDecimal, intern_new, 2, rb_str_new2(converted_money), opt_four);
249
+ val = rb_funcall(cKernel, intern_bigd, 2, rb_str_new2(converted_money), opt_four);
250
250
  val = rb_funcall(val, intern_divide, 1, opt_tenk);
251
251
  break;
252
252
  }
@@ -254,7 +254,7 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
254
254
  DBMONEY4 *money = (DBMONEY4 *)data;
255
255
  char converted_money[20];
256
256
  sprintf(converted_money, "%f", money->mny4 / 10000.0);
257
- val = rb_funcall(cBigDecimal, intern_new, 1, rb_str_new2(converted_money));
257
+ val = rb_funcall(cKernel, intern_bigd, 1, rb_str_new2(converted_money));
258
258
  break;
259
259
  }
260
260
  case SYBBINARY:
@@ -566,7 +566,7 @@ static VALUE rb_tinytds_result_insert(VALUE self) {
566
566
 
567
567
  void init_tinytds_result() {
568
568
  /* Data Classes */
569
- cBigDecimal = rb_const_get(rb_cObject, rb_intern("BigDecimal"));
569
+ cKernel = rb_const_get(rb_cObject, rb_intern("Kernel"));
570
570
  cDate = rb_const_get(rb_cObject, rb_intern("Date"));
571
571
  /* Define TinyTds::Result */
572
572
  cTinyTdsResult = rb_define_class_under(mTinyTds, "Result", rb_cObject);
@@ -588,6 +588,7 @@ void init_tinytds_result() {
588
588
  intern_new_offset = rb_intern("new_offset");
589
589
  intern_plus = rb_intern("+");
590
590
  intern_divide = rb_intern("/");
591
+ intern_bigd = rb_intern("BigDecimal");
591
592
  /* Symbol Helpers */
592
593
  sym_symbolize_keys = ID2SYM(rb_intern("symbolize_keys"));
593
594
  sym_as = ID2SYM(rb_intern("as"));
@@ -8,7 +8,7 @@ task 'gem:windows' => ['ports:cross'] do
8
8
  build = ['bundle']
9
9
 
10
10
  # and finally build the native gem
11
- build << 'rake cross native gem RUBY_CC_VERSION=2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 CFLAGS="-Wall"'
11
+ build << 'rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 CFLAGS="-Wall" MAKE="make -j`nproc`"'
12
12
 
13
13
  RakeCompilerDock.sh build.join(' && ')
14
14
  end
@@ -76,7 +76,7 @@ namespace :ports do
76
76
 
77
77
  # build the ports for all our cross compile hosts
78
78
  GEM_PLATFORM_HOSTS.each do |gem_platform, host|
79
- build << "rake ports:compile[#{host}]"
79
+ build << "rake ports:compile[#{host}] MAKE='make -j`nproc`'"
80
80
  end
81
81
 
82
82
  RakeCompilerDock.sh build.join(' && ')
@@ -76,10 +76,10 @@ class SchemaTest < TinyTds::TestCase
76
76
 
77
77
  it 'casts decimal' do
78
78
  assert_instance_of BigDecimal, find_value(91, :decimal_9_2)
79
- assert_equal BigDecimal.new('12345.01'), find_value(91, :decimal_9_2)
80
- assert_equal BigDecimal.new('1234567.89'), find_value(92, :decimal_9_2)
81
- assert_equal BigDecimal.new('0.0'), find_value(93, :decimal_16_4)
82
- assert_equal BigDecimal.new('123456789012.3456'), find_value(94, :decimal_16_4)
79
+ assert_equal BigDecimal('12345.01'), find_value(91, :decimal_9_2)
80
+ assert_equal BigDecimal('1234567.89'), find_value(92, :decimal_9_2)
81
+ assert_equal BigDecimal('0.0'), find_value(93, :decimal_16_4)
82
+ assert_equal BigDecimal('123456789012.3456'), find_value(94, :decimal_16_4)
83
83
  end
84
84
 
85
85
  it 'casts float' do
@@ -102,9 +102,9 @@ class SchemaTest < TinyTds::TestCase
102
102
 
103
103
  it 'casts money' do
104
104
  assert_instance_of BigDecimal, find_value(161, :money)
105
- assert_equal BigDecimal.new('4.20'), find_value(161, :money)
106
- assert_equal BigDecimal.new('922337203685477.5806'), find_value(163 ,:money)
107
- assert_equal BigDecimal.new('-922337203685477.5807'), find_value(162 ,:money)
105
+ assert_equal BigDecimal('4.20'), find_value(161, :money)
106
+ assert_equal BigDecimal('922337203685477.5806'), find_value(163 ,:money)
107
+ assert_equal BigDecimal('-922337203685477.5807'), find_value(162 ,:money)
108
108
  end
109
109
 
110
110
  it 'casts nchar' do
@@ -176,9 +176,9 @@ class SchemaTest < TinyTds::TestCase
176
176
 
177
177
  it 'casts smallmoney' do
178
178
  assert_instance_of BigDecimal, find_value(251, :smallmoney)
179
- assert_equal BigDecimal.new("4.20"), find_value(251, :smallmoney)
180
- assert_equal BigDecimal.new("-214748.3647"), find_value(252, :smallmoney)
181
- assert_equal BigDecimal.new("214748.3646"), find_value(253, :smallmoney)
179
+ assert_equal BigDecimal("4.20"), find_value(251, :smallmoney)
180
+ assert_equal BigDecimal("-214748.3647"), find_value(252, :smallmoney)
181
+ assert_equal BigDecimal("214748.3646"), find_value(253, :smallmoney)
182
182
  end
183
183
 
184
184
  it 'casts text' do
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency 'mini_portile2', '~> 2.0'
24
24
  s.add_development_dependency 'rake', '~> 10.4'
25
25
  s.add_development_dependency 'rake-compiler', '~> 1.0'
26
- s.add_development_dependency 'rake-compiler-dock', '~> 0.6.0'
26
+ s.add_development_dependency 'rake-compiler-dock', '~> 0.6.3'
27
27
  s.add_development_dependency 'minitest', '~> 5.6'
28
28
  s.add_development_dependency 'connection_pool', '~> 2.2'
29
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Ken Collins
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-01-14 00:00:00.000000000 Z
13
+ date: 2018-05-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 0.6.0
63
+ version: 0.6.3
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 0.6.0
70
+ version: 0.6.3
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: minitest
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +124,6 @@ files:
124
124
  - appveyor.yml
125
125
  - bin/defncopy-ttds
126
126
  - bin/tsql-ttds
127
- - circle.yml
128
127
  - exe/.keep
129
128
  - ext/tiny_tds/client.c
130
129
  - ext/tiny_tds/client.h
@@ -140,6 +139,7 @@ files:
140
139
  - lib/tiny_tds/2.2/tiny_tds.so
141
140
  - lib/tiny_tds/2.3/tiny_tds.so
142
141
  - lib/tiny_tds/2.4/tiny_tds.so
142
+ - lib/tiny_tds/2.5/tiny_tds.so
143
143
  - lib/tiny_tds/bin.rb
144
144
  - lib/tiny_tds/client.rb
145
145
  - lib/tiny_tds/error.rb
@@ -225,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
225
  version: '2.0'
226
226
  - - "<"
227
227
  - !ruby/object:Gem::Version
228
- version: '2.5'
228
+ version: '2.6'
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  requirements:
231
231
  - - ">="
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  version: '0'
234
234
  requirements: []
235
235
  rubyforge_project:
236
- rubygems_version: 2.6.14
236
+ rubygems_version: 2.7.3
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
data/circle.yml DELETED
@@ -1,31 +0,0 @@
1
- general:
2
- branches:
3
- ignore:
4
- - /dev.*/
5
-
6
- machine:
7
- environment:
8
- PATH: /opt/local/bin:${PATH}
9
- TESTOPTS: -v
10
- TINYTDS_UNIT_HOST: localhost
11
- services:
12
- - docker
13
-
14
- dependencies:
15
- override:
16
- - sudo ./test/bin/install-openssl.sh
17
- - sudo ./test/bin/install-freetds.sh
18
- - rvm-exec 2.1.9 bundle install
19
- - rvm-exec 2.2.5 bundle install
20
- - rvm-exec 2.3.1 bundle install
21
-
22
- database:
23
- post:
24
- - docker info
25
- - ./test/bin/setup.sh
26
-
27
- test:
28
- override:
29
- - rvm-exec 2.1.9 bundle exec rake
30
- - rvm-exec 2.2.5 bundle exec rake
31
- - rvm-exec 2.3.1 bundle exec rake