tiny_tds 2.1.1 → 2.1.2

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
  SHA1:
3
- metadata.gz: 240a1e41a65c669272527c2eb7476ba0bfdd1a21
4
- data.tar.gz: 0c1a875402d2b37b9adf7f7495ae27b57e7b4e88
3
+ metadata.gz: 2122d9b48df66ded292ff0e42ba758237376d686
4
+ data.tar.gz: 2cd078c914b8287bb99db513810e1498707b40ad
5
5
  SHA512:
6
- metadata.gz: e408a64c82001f7c895098295c761937e7ec77660a0e51b18fd30d74c1238bb3c399a9ce7ca644bd663f95fb163562a46678c8b120f01b9a39af02f59b06030a
7
- data.tar.gz: deccfd764dca1b7dbab5164a01393c32c25c8cd299de98194f11b08ac0c01c86170df1dc14f24a9ac294f6c33dfb6356add5cee4ab0067aa13f890b997c7fd02
6
+ metadata.gz: 5a70deed6ccd0fd09086c2a16cadb9fa8dc136f3cd6f951a3fbe7a0fc31f5282cc70c08bfe770f6f29970e39cdaa84519dceddc0c624449e9fe45e046d4075c9
7
+ data.tar.gz: ef92d35e3e3f7a98818fcf42fc029a4480dfd449dc9da54aa48d180a26435f33d2528fabac0d9cd81d0aaec715ca5180ef470066b75a8e02f11dd0468a5e9f0c
@@ -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: ruby
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
@@ -125,7 +125,6 @@ files:
125
125
  - appveyor.yml
126
126
  - bin/defncopy-ttds
127
127
  - bin/tsql-ttds
128
- - circle.yml
129
128
  - exe/.keep
130
129
  - ext/tiny_tds/client.c
131
130
  - ext/tiny_tds/client.h
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