tiny_tds 0.9.5.rc.3 → 1.0.0

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: 1197aeb47fa60387a419f361511fcbf4b1363742
4
- data.tar.gz: 0c9f56c82612f662acdc634bab521fd398c5a6ed
3
+ metadata.gz: 2cbe8165b4a3e5745b5291f45b978fa79c1ff1e0
4
+ data.tar.gz: ccff84b81b2c7d46234157f2f44c17b733859b7e
5
5
  SHA512:
6
- metadata.gz: 82cc1b0101277ca87d2247d2d868422361fd7080a32bf339315a275b51a4f319d717f10318eaf56b0c9c4e6e83e40909115270ed61af695e8ef6177672617b7f
7
- data.tar.gz: 93e717e90b7d8e15b138d449fac2ae0b675a0f02d1d0fc0a709e743dd5673c0d4b8e8214556bab297d97f2f938e2567a6ce1c505b1bb7b85ff952cae86102ba0
6
+ metadata.gz: c6308b4d012dc6fca385b4120595ef899356e0617263a15fd8b736f15297860bf61e19c99eaab00b2a5b1985937b2e4676f352554dd993d6d06ef807df5629c1
7
+ data.tar.gz: 7510af0ec2958f7516a3b6ef7534ab9d231aff1f20df930a5778dd6a4af642ab7b9d5ba55988c4935d4f99b1b6be155015b5d346ad3bcaa6557477aae9831fac
data/CHANGELOG CHANGED
@@ -1,4 +1,10 @@
1
- * 0.9.5 *
1
+ * 1.0.0 *
2
+
3
+ * Tested with FreeTDS 1.0.
4
+ * Add emoji support by default using FreeTDS v1.0 in docs.
5
+
6
+
7
+ * 0.9.5 * (release candidates only)
2
8
 
3
9
  * Binstub wrappers for `tsql`. Fixes #227 #251
4
10
  * Add support for 2008 data types. Must use TDSVER 7.3 or higher. Fixes #244 #251
data/README.md CHANGED
@@ -43,7 +43,7 @@ If you use Windows, we pre-compile TinyTDS with static versions of FreeTDS, libi
43
43
 
44
44
  ## FreeTDS Compatibility & Configuration
45
45
 
46
- TinyTDS is developed against FreeTDS 0.91, 0.95, and 0.99 current. Our default and recommended is 0.95. We also test with SQL Server 2008, 2014, and Azure. However, usage of TinyTDS with SQL Server 2000 or 2005 should be just fine. Below are a few QA style notes about installing FreeTDS.
46
+ TinyTDS is developed against FreeTDS 0.95, 0.99, and 1.0 current. Our default and recommended is 1.0. We also test with SQL Server 2008, 2014, and Azure. However, usage of TinyTDS with SQL Server 2000 or 2005 should be just fine. Below are a few QA style notes about installing FreeTDS.
47
47
 
48
48
  **NOTE:** Windows users of our pre-compiled native gems need not worry about installing FreeTDS and its dependencies.
49
49
 
@@ -89,7 +89,7 @@ Creating a new client takes a hash of options. For valid iconv encoding options,
89
89
  * :port - Defaults to 1433. Only used if :host is used.
90
90
  * :database - The default database to use.
91
91
  * :appname - Short string seen in SQL Servers process/activity window.
92
- * :tds_version - TDS version. Defaults to "7.3" for FreeTDS 0.95 usage. Please set to "7.1" for FreeTDS 0.91.
92
+ * :tds_version - TDS version. Defaults to "7.3".
93
93
  * :login_timeout - Seconds to wait for login. Default to 60 seconds.
94
94
  * :timeout - Seconds to wait for a response to a SQL command. Default 5 seconds.
95
95
  * :encoding - Any valid iconv value like CP1251 or ISO-8859-1. Default UTF-8.
@@ -326,6 +326,18 @@ SET ANSI_WARNINGS ON
326
326
  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!
327
327
 
328
328
 
329
+ ## Emoji Support 😍
330
+
331
+ This is possible using FreeTDS version 0.95 or higher. You must add the following config to your `freetds.conf` in either the global section or a specfic dataserver. If you are on Windows, the default location for your conf file will be in `C:\Sites`.
332
+
333
+ ```ini
334
+ [global]
335
+ use utf-16 = true
336
+ ```
337
+
338
+ Good news! If you are using FreeTDS v1.0 or later, then `use utf-16` is set true by default!
339
+
340
+
329
341
  ## Using MiniPortile
330
342
 
331
343
  MiniPortile is a minimalistic implementation of a port/recipe system. <https://github.com/luislavena/mini_portile>
@@ -333,7 +345,7 @@ MiniPortile is a minimalistic implementation of a port/recipe system. <https://g
333
345
  The TinyTDS project uses MiniPortile so that we can easily install a local version of FreeTDS and supporting libraries to link against when building a test version of TinyTDS. This same system is also used when installing TinyTDS with Rubygems and building native extensions. It is possible to build TinyTDS with a specific version of FreeTDS using the `TINYTDS_FREETDS_VERSION` environment variable. Here are some exampbles of possible values.
334
346
 
335
347
  ```
336
- $ rake TDSVER='7.1' TINYTDS_FREETDS_VERSION='0.91.112' -- --disable-system-freetds --disable-system-iconv
348
+ $ rake TDSVER='7.1' TINYTDS_FREETDS_VERSION='0.95' -- --disable-system-freetds --disable-system-iconv
337
349
  ```
338
350
 
339
351
  To find out more about the FreeTDS release system [visit this thread](http://lists.ibiblio.org/pipermail/freetds/2012q1/027756.html) on their mailing list. You can also browse thier FTP server [ftp://ftp.astron.com/pub/freetds/](ftp://ftp.astron.com/pub/freetds/) for version number strings.
@@ -356,6 +368,11 @@ The compiled gems will exist in `./pkg` directory.
356
368
 
357
369
  First make sure your local database has a `[tinytdstest]` database with a owner login named `[tinytds]` having no password. The following SQL run via the `sa` account should set that up for you.
358
370
 
371
+ ```bash
372
+ $ tsql -H <host> -p 1433 -U sa -P <pass>
373
+ $ sqsh -H <host> -p 1433 -U sa -P <pass>
374
+ ```
375
+
359
376
  ```sql
360
377
  CREATE DATABASE [tinytdstest];
361
378
  GO
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-1.0.2f-#{host}.dll",
72
- "ssleay32-1.0.2f-#{host}.dll",
71
+ "libeay32-1.0.2g-#{host}.dll",
72
+ "ssleay32-1.0.2g-#{host}.dll",
73
73
  "libiconv-2.dll",
74
74
  "libsybdb-5.dll",
75
75
  ]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5.rc.3
1
+ 1.0.0
@@ -23,8 +23,8 @@ test_script:
23
23
  - ps: Start-Service 'MSSQL$SQL2014'
24
24
  - timeout /t 4 /nobreak > NUL
25
25
  - sqlcmd -S ".\SQL2014" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
26
+ - bundle exec rake TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014 TDSVER=7.1
26
27
  - bundle exec rake TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014
27
- - bundle exec rake TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2014" TINYTDS_SCHEMA=sqlserver_2014 TDSVER=7.3
28
28
  - ps: Stop-Service 'MSSQL$SQL2014'
29
29
  - ps: Start-Service 'MSSQL$SQL2012SP1'
30
30
  - timeout /t 4 /nobreak > NUL
@@ -37,8 +37,6 @@ test_script:
37
37
  - bundle exec rake TINYTDS_UNIT_HOST_TEST=localhost TINYTDS_UNIT_DATASERVER="localhost\SQL2008R2SP2" TINYTDS_SCHEMA=sqlserver_2008
38
38
  - timeout /t 4 /nobreak > NUL
39
39
  - bundle exec rake TINYTDS_UNIT_HOST_TEST=%CI_AZURE_HOST% TINYTDS_UNIT_HOST=%CI_AZURE_HOST% TINYTDS_SCHEMA=sqlserver_azure
40
- - timeout /t 4 /nobreak > NUL
41
- - bundle exec rake TINYTDS_UNIT_HOST_TEST=%CI_AZURE_HOST% TINYTDS_UNIT_HOST=%CI_AZURE_HOST% TINYTDS_SCHEMA=sqlserver_azure TDSVER=7.3
42
40
  environment:
43
41
  CI_AZURE_HOST:
44
42
  secure: 8ydpYysZYKEBKvp6plKlYfepH98/zAuT27FFCaJ9Sss=
@@ -11,6 +11,8 @@ gem 'mini_portile2', '~> 2.0'
11
11
  require 'mini_portile2'
12
12
  require_relative './extconsts'
13
13
 
14
+ OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
15
+
14
16
  # Shamelessly copied from nokogiri
15
17
  #
16
18
 
@@ -2,13 +2,14 @@
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.2f'
6
- OPENSSL_SOURCE_URI = "http://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
5
+ OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.0.2g'
6
+ OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
7
7
 
8
- FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "0.95.80"
8
+ FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.0rc3"
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
  }
12
- FREETDS_VERSION_INFO['0.99'] = {files: 'ftp://ftp.freetds.org/pub/freetds/current/freetds-dev.0.99.536.tar.bz2'}
13
- FREETDS_VERSION_INFO['current'] = {files: 'https://github.com/FreeTDS/freetds/archive/master.zip'}
12
+ FREETDS_VERSION_INFO['1.0rc3'] = {files: 'ftp://ftp.freetds.org/pub/freetds/stable/release_candidates/freetds-1.0rc3.tar.bz2'}
13
+ FREETDS_VERSION_INFO['0.99'] = {files: 'ftp://ftp.freetds.org/pub/freetds/current/freetds-dev.0.99.678.tar.gz'}
14
+ FREETDS_VERSION_INFO['0.95'] = {files: 'ftp://ftp.freetds.org/pub/freetds/stable/freetds-0.95.92.tar.gz'}
14
15
  FREETDS_SOURCE_URI = FREETDS_VERSION_INFO[FREETDS_VERSION][:files]
@@ -74,7 +74,7 @@ module TinyTds
74
74
  end
75
75
 
76
76
  def tds_versions_setter(opts={})
77
- v = opts[:tds_version] || ENV['TDSVER'] || '7.1'
77
+ v = opts[:tds_version] || ENV['TDSVER'] || '7.3'
78
78
  TDS_VERSIONS_SETTERS[v.to_s]
79
79
  end
80
80
 
@@ -148,6 +148,7 @@ class ClientTest < TinyTds::TestCase
148
148
  end
149
149
 
150
150
  it 'raises TinyTds exception with wrong :username' do
151
+ skip if ENV['CI'] && sqlserver_azure? # Some issue with db_error_number.
151
152
  options = connection_options :username => 'willnotwork'
152
153
  action = lambda { new_connection(options) }
153
154
  assert_raise_tinytds_error(action) do |e|
@@ -122,7 +122,7 @@ class ResultTest < TinyTds::TestCase
122
122
 
123
123
  it 'must insert and find unicode data' do
124
124
  rollback_transaction(@client) do
125
- text = ''
125
+ text = '😍'
126
126
  @client.execute("DELETE FROM [datatypes] WHERE [nvarchar_50] IS NOT NULL").do
127
127
  @client.execute("INSERT INTO [datatypes] ([nvarchar_50]) VALUES (N'#{text}')").do
128
128
  row = @client.execute("SELECT [nvarchar_50] FROM [datatypes] WHERE [nvarchar_50] IS NOT NULL").each.first
@@ -138,6 +138,10 @@ module TinyTds
138
138
  RUBY_DESCRIPTION =~ /rubinius/i
139
139
  end
140
140
 
141
+ def ruby_windows?
142
+ RbConfig::CONFIG['host_os'] =~ /ming/
143
+ end
144
+
141
145
  def load_current_schema
142
146
  loader = new_connection
143
147
  schema_file = File.expand_path File.join(File.dirname(__FILE__), 'schema', "#{current_schema}.sql")
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: 0.9.5.rc.3
4
+ version: 1.0.0
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: 2016-02-14 00:00:00.000000000 Z
13
+ date: 2016-04-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -120,6 +120,8 @@ files:
120
120
  - bin/defncopy
121
121
  - bin/tsql
122
122
  - exe/.keep
123
+ - exe/defncopy.exe
124
+ - exe/tsql.exe
123
125
  - ext/tiny_tds/client.c
124
126
  - ext/tiny_tds/client.h
125
127
  - ext/tiny_tds/extconf.rb
@@ -134,10 +136,7 @@ files:
134
136
  - lib/tiny_tds/error.rb
135
137
  - lib/tiny_tds/result.rb
136
138
  - lib/tiny_tds/version.rb
137
- - ports/archives/freetds-0.95.80.tar.bz2
138
- - ports/patches/freetds/0.91.112/Makefile.in.diff
139
- - ports/patches/freetds/0.91.112/dblib-30-char-username.diff
140
- - ports/patches/freetds/0.95.80/0001-mingw_missing_inet_pton.diff
139
+ - ports/patches/freetds/1.0rc3/0001-mingw_missing_inet_pton.diff
141
140
  - test/appveyor/dbsetup.ps1
142
141
  - test/appveyor/dbsetup.sql
143
142
  - test/benchmark/query.rb
@@ -172,13 +171,31 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
171
  version: 2.0.0
173
172
  required_rubygems_version: !ruby/object:Gem::Requirement
174
173
  requirements:
175
- - - ">"
174
+ - - ">="
176
175
  - !ruby/object:Gem::Version
177
- version: 1.3.1
176
+ version: '0'
178
177
  requirements: []
179
178
  rubyforge_project:
180
179
  rubygems_version: 2.4.8
181
180
  signing_key:
182
181
  specification_version: 4
183
182
  summary: TinyTDS - A modern, simple and fast FreeTDS library for Ruby using DB-Library.
184
- test_files: []
183
+ test_files:
184
+ - test/appveyor/dbsetup.ps1
185
+ - test/appveyor/dbsetup.sql
186
+ - test/benchmark/query.rb
187
+ - test/benchmark/query_odbc.rb
188
+ - test/benchmark/query_tinytds.rb
189
+ - test/client_test.rb
190
+ - test/result_test.rb
191
+ - test/schema/1px.gif
192
+ - test/schema/sqlserver_2000.sql
193
+ - test/schema/sqlserver_2005.sql
194
+ - test/schema/sqlserver_2008.sql
195
+ - test/schema/sqlserver_2014.sql
196
+ - test/schema/sqlserver_azure.sql
197
+ - test/schema/sybase_ase.sql
198
+ - test/schema_test.rb
199
+ - test/test_helper.rb
200
+ - test/thread_test.rb
201
+ has_rdoc:
@@ -1,29 +0,0 @@
1
- --- a/Makefile.in 2011-08-17 18:57:36.000000000 -0700
2
- +++ b/Makefile.in 2014-05-02 10:27:01.275813000 -0700
3
- @@ -772,13 +772,6 @@
4
-
5
-
6
- install-data-local:
7
- - $(mkinstalldirs) $(ETC)
8
- - if test ! -f $(ETC)/freetds.conf; then \
9
- - $(INSTALL_DATA) $(srcdir)/freetds.conf $(ETC)/freetds.conf; \
10
- - fi
11
- - if test ! -f $(ETC)/locales.conf; then \
12
- - $(INSTALL_DATA) $(srcdir)/locales.conf $(ETC)/locales.conf; \
13
- - fi
14
-
15
- clean-local:
16
- find . \( -name \*.test_output -o -name \*.bb -o -name \*.bbg -o -name \*.da -o -name \*.gc\* \) -exec rm -f {} \;
17
- --- a/src/pool/Makefile.in 2011-08-17 18:57:36.000000000 -0700
18
- +++ b/src/pool/Makefile.in 2014-05-02 10:32:39.628347600 -0700
19
- @@ -574,10 +574,6 @@
20
-
21
-
22
- install-data-local:
23
- - $(mkinstalldirs) $(ETC)
24
- - if test ! -f $(ETC)/pool.conf; then \
25
- - $(INSTALL_DATA) $(srcdir)/pool.conf $(ETC)/pool.conf; \
26
- - fi
27
-
28
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
29
- # Otherwise a system limit (for SysV at least) may be exceeded.
@@ -1,11 +0,0 @@
1
- --- a/src/dblib/dblib.c
2
- +++ b/src/dblib/dblib.c
3
- @@ -765,7 +765,7 @@ dbsetlname(LOGINREC * login, const char *value, int which)
4
- return FAIL;
5
- }
6
-
7
- - if (TDS_MAX_LOGIN_STR_SZ < strlen(value)) {
8
- + if (login->tds_login->tds_version < 0x700 && TDS_MAX_LOGIN_STR_SZ < strlen(value)) {
9
- dbperror(NULL, SYBENTLL, 0);
10
- return FAIL;
11
- }