tiny_tds 1.1.0-x86-mingw32 → 1.2.0.beta1-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
2
  SHA1:
3
- metadata.gz: 0bf04ef6340a6dc30aad6384c704c5e95101b682
4
- data.tar.gz: ef17e8402b249c47889a506e13a91354ca284247
3
+ metadata.gz: 91698f999953c9b4f9973283a5de58d52d74a7df
4
+ data.tar.gz: 339bceccb950d73b0dced64e747da9585a5d2eea
5
5
  SHA512:
6
- metadata.gz: 4aefc01958e02f0397549385b999f342e59950ab0461175fa571177e733ba56911487c2166affe5c56f29a9c5def4d1da3309c6b413d1eb58a25c5923878735e
7
- data.tar.gz: 51339d4ac6f35626eaa62783054a3965a36dfeb82cbe8ee9503a31c2309daf8273b51c01c717203d09102c7274a95b418a27b9dfd55bca0d05239c7ba504d50b
6
+ metadata.gz: cbfa97f8d87dce79e8dc95f5daa27570ec6581b56de05f4101f6be182ac99d5808c9865058f0a39daabad7f0ea1dbba6e7f9576c29535c2100da32508f860896
7
+ data.tar.gz: 44eb832f858d324e70c58d03ca4ea0c678fca32e140d493c842e28fed14bb6c4f253f50ee6632b1c0a79c7dae868c4920ab402c00201ef0ebb35dfedd39d7cee
data/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ *.diff eol=lf
data/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  * [![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
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
7
  * [![Gem Version](https://img.shields.io/gem/v/tiny_tds.svg)](https://rubygems.org/gems/tiny_tds) - Gem Version
8
+ * [![Dependency Status](https://dependencyci.com/github/rails-sqlserver/tiny_tds/badge)](https://dependencyci.com/github/rails-sqlserver/tiny_tds) - Dependency Status
8
9
  * [![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
9
10
 
10
11
  The TinyTDS gem is meant to serve the extremely common use-case of connecting, querying and iterating over results to Microsoft SQL Server or Sybase databases from Ruby using the FreeTDS's DB-Library API.
@@ -331,19 +332,38 @@ TinyTDS is fully tested with the Azure platform. You must set the `azure: true`
331
332
 
332
333
  **IMPORTANT**: Do not use `username@server.database.windows.net` for the username connection option! You must use the shorter `username@server` instead!
333
334
 
334
- We recommend the following settings when using TinyTDS with Azure. These are the same settings used in the ActiveRecord SQL Server adapter.
335
+ Also, please read the [Azure SQL Database General Guidelines and Limitations](https://msdn.microsoft.com/en-us/library/ee336245.aspx) MSDN article to understand the differences. Specifically, the connection constraints section!
336
+
337
+ ## Connection Settings
338
+
339
+ A DBLIB connection does not have the same default SET options for a standard SMS SQL Server connection. Hence, we recommend the following options post establishing your connection.
340
+
341
+ #### SQL Server
335
342
 
336
343
  ```sql
337
- SET ANSI_NULLS ON
344
+ SET ANSI_DEFAULTS ON
345
+
346
+ SET QUOTED_IDENTIFIER ON
338
347
  SET CURSOR_CLOSE_ON_COMMIT OFF
339
- SET ANSI_NULL_DFLT_ON ON
340
348
  SET IMPLICIT_TRANSACTIONS OFF
349
+ SET TEXTSIZE 2147483647
350
+ SET CONCAT_NULL_YIELDS_NULL ON
351
+ ```
352
+
353
+ #### Azure
354
+
355
+ ```sql
356
+ SET ANSI_NULLS ON
357
+ SET ANSI_NULL_DFLT_ON ON
341
358
  SET ANSI_PADDING ON
342
- SET QUOTED_IDENTIFIER ON
343
359
  SET ANSI_WARNINGS ON
344
- ```
345
360
 
346
- Also, please read the [Azure SQL Database General Guidelines and Limitations](https://msdn.microsoft.com/en-us/library/ee336245.aspx) MSDN article to understand the differences. Specifically, the connection constraints section!
361
+ SET QUOTED_IDENTIFIER ON
362
+ SET CURSOR_CLOSE_ON_COMMIT OFF
363
+ SET IMPLICIT_TRANSACTIONS OFF
364
+ SET TEXTSIZE 2147483647
365
+ SET CONCAT_NULL_YIELDS_NULL ON
366
+ ```
347
367
 
348
368
 
349
369
  ## Thread Safety
data/Rakefile CHANGED
@@ -68,8 +68,8 @@ Rake::ExtensionTask.new('tiny_tds', gemspec) do |ext|
68
68
  gemplat = spec.platform.to_s
69
69
  host = platform_host_map[gemplat]
70
70
  dlls = [
71
- "libeay32-#{OPENSSL_VERSION}-#{host}.dll",
72
- "ssleay32-#{OPENSSL_VERSION}-#{host}.dll",
71
+ "libcrypto32-#{OPENSSL_VERSION}-#{host}.dll",
72
+ "libssl32-#{OPENSSL_VERSION}-#{host}.dll",
73
73
  'libiconv-2.dll',
74
74
  'libsybdb-5.dll'
75
75
  ]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0.beta1
@@ -151,6 +151,19 @@ def define_libssl_recipe(host)
151
151
  end
152
152
  end
153
153
 
154
+ def execute(action, command, options={})
155
+ prev_path = ENV['PATH']
156
+ if host=~/mingw/
157
+ git_perl = 'C:/Program Files/Git/usr/bin'
158
+ if File.directory?(git_perl)
159
+ ENV['PATH'] = git_perl + ';' + ENV['PATH']
160
+ ENV['PERL'] = 'perl'
161
+ end
162
+ end
163
+ super
164
+ ENV['PATH'] = prev_path
165
+ end
166
+
154
167
  def configure
155
168
  config = if host=~/mingw/
156
169
  host=~/x86_64/ ? 'mingw64' : 'mingw'
@@ -181,20 +194,20 @@ def define_libssl_recipe(host)
181
194
 
182
195
  def compile
183
196
  super
184
- # OpenSSL DLLs are called "libeay32.dll" and "ssleay32.dll" per default,
197
+ # OpenSSL DLLs are called "libcrypto32.dll" and "libssl32.dll" per default,
185
198
  # regardless to the version. This is best suited to meet the Windows DLL hell.
186
199
  # To avoid any conflicts we do a static build and build DLLs afterwards,
187
200
  # with our own naming scheme.
188
- execute "mkdef-libeay32", "(perl util/mkdef.pl 32 libeay >libeay32.def)"
189
- execute "mkdef-ssleay32", "(perl util/mkdef.pl 32 ssleay >ssleay32.def)"
190
- dllwrap("libeay32-#{version}-#{host}", "libcrypto.dll.a", "libeay32.def", "libcrypto.a -lws2_32 -lgdi32 -lcrypt32")
191
- dllwrap("ssleay32-#{version}-#{host}", "libssl.dll.a", "ssleay32.def", "libssl.a libcrypto.dll.a")
201
+ execute "mkdef-crypto32", "(perl util/mkdef.pl crypto 32 >libcrypto32.def)"
202
+ execute "mkdef-ssl32", "(perl util/mkdef.pl ssl 32 >libssl32.def)"
203
+ dllwrap("libcrypto32-#{version}-#{host}", "libcrypto.dll.a", "libcrypto32.def", "libcrypto.a -lws2_32 -lgdi32 -lcrypt32")
204
+ dllwrap("libssl32-#{version}-#{host}", "libssl.dll.a", "libssl32.def", "libssl.a libcrypto.dll.a")
192
205
  end
193
206
 
194
207
  def install
195
208
  super
196
- FileUtils.cp "#{work_path}/libeay32-#{version}-#{host}.dll", "#{path}/bin/"
197
- FileUtils.cp "#{work_path}/ssleay32-#{version}-#{host}.dll", "#{path}/bin/"
209
+ FileUtils.cp "#{work_path}/libcrypto32-#{version}-#{host}.dll", "#{path}/bin/"
210
+ FileUtils.cp "#{work_path}/libssl32-#{version}-#{host}.dll", "#{path}/bin/"
198
211
  FileUtils.cp "#{work_path}/libcrypto.dll.a", "#{path}/lib/"
199
212
  FileUtils.cp "#{work_path}/libssl.dll.a", "#{path}/lib/"
200
213
  end
@@ -2,10 +2,10 @@
2
2
  ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.14"
3
3
  ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
4
4
 
5
- OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.0.2j'
5
+ OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.0e'
6
6
  OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
7
7
 
8
- FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.00.21"
8
+ FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.00.27"
9
9
  FREETDS_VERSION_INFO = Hash.new { |h,k|
10
10
  h[k] = {files: "ftp://ftp.freetds.org/pub/freetds/stable/freetds-#{k}.tar.bz2"}
11
11
  }
@@ -1,16 +1,16 @@
1
1
  diff --git a/src/tds/tls.c b/src/tds/tls.c
2
- index 0d11a33..b8ab2ba 100644
2
+ index 09e7fa0..1da18f6 100644
3
3
  --- a/src/tds/tls.c
4
4
  +++ b/src/tds/tls.c
5
- @@ -72,6 +72,29 @@
6
- #define SSL_PTR bio->ptr
5
+ @@ -101,6 +101,29 @@
6
+ #define SSL_PTR BIO_get_data(bio)
7
7
  #endif
8
8
 
9
9
  +/*
10
10
  + * Add a workaround for older Mingw versions without inet_pton().
11
11
  + * This means RubyInstallers DevKit-4.7.2 in particular.
12
12
  + */
13
- +#if defined(__MINGW64_VERSION_MAJOR) && !defined(InetPtonA)
13
+ +#if defined(__MINGW32__) && !defined(InetPtonA)
14
14
  + #include <windows.h>
15
15
  +
16
16
  + static HMODULE ws2_32 = NULL;
@@ -10,7 +10,7 @@ fi
10
10
  wget https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
11
11
  tar -xzf openssl-$OPENSSL_VERSION.tar.gz
12
12
  cd openssl-$OPENSSL_VERSION
13
- ./config --prefix=/opt/local
13
+ ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
14
14
  make
15
15
  make install
16
16
  cd ..
data/test/bin/setup.sh CHANGED
@@ -3,15 +3,17 @@
3
3
  set -x
4
4
  set -e
5
5
 
6
- docker pull metaskills/mssql-server-linux-tinytds
6
+ tag=1.3
7
7
 
8
- container=$(docker ps -a -q --filter ancestor=metaskills/mssql-server-linux-tinytds)
8
+ docker pull metaskills/mssql-server-linux-tinytds:$tag
9
+
10
+ container=$(docker ps -a -q --filter ancestor=metaskills/mssql-server-linux-tinytds:$tag)
9
11
  if [[ -z $container ]]; then
10
- docker run -p 1433:1433 -d metaskills/mssql-server-linux-tinytds && sleep 10
12
+ docker run -p 1433:1433 -d metaskills/mssql-server-linux-tinytds:$tag && sleep 10
11
13
  exit
12
14
  fi
13
15
 
14
- container=$(docker ps -q --filter ancestor=metaskills/mssql-server-linux-tinytds)
16
+ container=$(docker ps -q --filter ancestor=metaskills/mssql-server-linux-tinytds:$tag)
15
17
  if [[ -z $container ]]; then
16
18
  docker start $container && sleep 10
17
19
  fi
data/test/result_test.rb CHANGED
@@ -578,7 +578,7 @@ class ResultTest < TinyTds::TestCase
578
578
 
579
579
  it 'returns nil for NULL' do
580
580
  value = @client.execute('SELECT NULL AS [null]').each.first['null']
581
- assert_equal nil, value
581
+ assert_nil value
582
582
  end
583
583
 
584
584
  end
data/test/schema_test.rb CHANGED
@@ -27,7 +27,7 @@ class SchemaTest < TinyTds::TestCase
27
27
  it 'casts bit' do
28
28
  assert_equal true, find_value(31, :bit)
29
29
  assert_equal false, find_value(32, :bit)
30
- assert_equal nil, find_value(21, :bit)
30
+ assert_nil find_value(21, :bit)
31
31
  end
32
32
 
33
33
  it 'casts char' do
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: 1.1.0
4
+ version: 1.2.0.beta1
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: 2016-12-20 00:00:00.000000000 Z
13
+ date: 2017-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -108,6 +108,7 @@ extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
110
  - ".codeclimate.yml"
111
+ - ".gitattributes"
111
112
  - ".gitignore"
112
113
  - ".rubocop.yml"
113
114
  - ".travis.yml"
@@ -145,11 +146,11 @@ files:
145
146
  - lib/tiny_tds/error.rb
146
147
  - lib/tiny_tds/result.rb
147
148
  - lib/tiny_tds/version.rb
148
- - ports/i686-w64-mingw32/bin/libeay32-1.0.2j-i686-w64-mingw32.dll
149
+ - ports/i686-w64-mingw32/bin/libcrypto32-1.1.0e-i686-w64-mingw32.dll
149
150
  - ports/i686-w64-mingw32/bin/libiconv-2.dll
151
+ - ports/i686-w64-mingw32/bin/libssl32-1.1.0e-i686-w64-mingw32.dll
150
152
  - ports/i686-w64-mingw32/bin/libsybdb-5.dll
151
- - ports/i686-w64-mingw32/bin/ssleay32-1.0.2j-i686-w64-mingw32.dll
152
- - ports/patches/freetds/1.00.21/0001-mingw_missing_inet_pton.diff
153
+ - ports/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
153
154
  - test/appveyor/dbsetup.ps1
154
155
  - test/appveyor/dbsetup.sql
155
156
  - test/benchmark/query.rb
@@ -188,12 +189,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
189
  version: 2.0.0
189
190
  required_rubygems_version: !ruby/object:Gem::Requirement
190
191
  requirements:
191
- - - ">="
192
+ - - ">"
192
193
  - !ruby/object:Gem::Version
193
- version: '0'
194
+ version: 1.3.1
194
195
  requirements: []
195
196
  rubyforge_project:
196
- rubygems_version: 2.5.2
197
+ rubygems_version: 2.6.8
197
198
  signing_key:
198
199
  specification_version: 4
199
200
  summary: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.