tiny_tds 2.1.3.pre-x86-mingw32 → 2.1.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +0 -0
  3. data/.gitattributes +0 -0
  4. data/.gitignore +0 -0
  5. data/.rubocop.yml +0 -0
  6. data/.travis.yml +0 -0
  7. data/CHANGELOG.md +2 -0
  8. data/CODE_OF_CONDUCT.md +0 -0
  9. data/Gemfile +0 -0
  10. data/ISSUE_TEMPLATE.md +0 -0
  11. data/MIT-LICENSE +0 -0
  12. data/README.md +0 -1
  13. data/Rakefile +0 -0
  14. data/VERSION +1 -1
  15. data/appveyor.yml +0 -0
  16. data/ext/tiny_tds/client.c +0 -0
  17. data/ext/tiny_tds/client.h +0 -0
  18. data/ext/tiny_tds/extconf.rb +0 -0
  19. data/ext/tiny_tds/extconsts.rb +1 -1
  20. data/ext/tiny_tds/result.c +0 -0
  21. data/ext/tiny_tds/result.h +0 -0
  22. data/ext/tiny_tds/tiny_tds_ext.c +0 -0
  23. data/ext/tiny_tds/tiny_tds_ext.h +0 -0
  24. data/lib/tiny_tds.rb +0 -0
  25. data/lib/tiny_tds/bin.rb +0 -0
  26. data/lib/tiny_tds/client.rb +0 -0
  27. data/lib/tiny_tds/error.rb +0 -0
  28. data/lib/tiny_tds/gem.rb +0 -0
  29. data/lib/tiny_tds/result.rb +0 -0
  30. data/lib/tiny_tds/version.rb +0 -0
  31. data/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff +0 -0
  32. data/patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff +0 -0
  33. data/patches/libiconv/1.14/1-avoid-gets-error.patch +0 -0
  34. data/tasks/native_gem.rake +0 -0
  35. data/tasks/package.rake +0 -0
  36. data/tasks/ports.rake +0 -0
  37. data/tasks/ports/freetds.rb +0 -0
  38. data/tasks/ports/libiconv.rb +0 -0
  39. data/tasks/ports/openssl.rb +0 -0
  40. data/tasks/ports/recipe.rb +0 -0
  41. data/tasks/test.rake +0 -0
  42. data/test/appveyor/dbsetup.ps1 +0 -0
  43. data/test/appveyor/dbsetup.sql +0 -0
  44. data/test/benchmark/query.rb +0 -0
  45. data/test/benchmark/query_odbc.rb +0 -0
  46. data/test/benchmark/query_tinytds.rb +0 -0
  47. data/test/client_test.rb +46 -38
  48. data/test/gem_test.rb +15 -15
  49. data/test/result_test.rb +41 -41
  50. data/test/schema/sqlserver_2000.sql +0 -0
  51. data/test/schema/sqlserver_2005.sql +0 -0
  52. data/test/schema/sqlserver_2008.sql +0 -0
  53. data/test/schema/sqlserver_2014.sql +0 -0
  54. data/test/schema/sqlserver_2016.sql +0 -0
  55. data/test/schema/sqlserver_azure.sql +0 -0
  56. data/test/schema/sybase_ase.sql +0 -0
  57. data/test/schema_test.rb +12 -12
  58. data/test/test_helper.rb +1 -1
  59. data/test/thread_test.rb +1 -1
  60. data/tiny_tds.gemspec +0 -0
  61. metadata +12 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6212981b090292b376ee3fe3bcde3c258cb1034046ece0b1ff44aaee8fa7a13
4
- data.tar.gz: f65477de30753d708d834cea5bac468ba1579730f289fec1573fd4e3aff2d632
3
+ metadata.gz: 5620678d48c9274b4eb244477fb457a6e6f1930bfa831bcec1d75a920c5b00af
4
+ data.tar.gz: 1006bfadd8b098a8ab17671d2cb3736b297f666ce6c473fb3933bf05b1d9d04f
5
5
  SHA512:
6
- metadata.gz: a8aac729f6b9e3cb589d7d5bbeda23a6247121949af43062e4f009489c665df3e156d1d9062e9d99b81c0461261bc5bdfaa765cbd7e7af47842ee64c6d12d5a4
7
- data.tar.gz: ae12d6f324928fe42ebf01e167dd07c380b54c4488c9aa02e3d5665019f256a61168d945d22335d3351b46a5854b0a5cffeb9525247c6699638c8de36fbe143d
6
+ metadata.gz: 1764d458cb894c58440ea32f74fab472dedc4a234c03fb20840455fd1083a4957bfd07d031b60c18ca19325337d5da8879f34827e0f59233bc4e3212d49beb0b
7
+ data.tar.gz: 6246b955c6119fd7a5fbbecef67c03c6e02ca5b2f7f27ab8992c8345109fbb340f6b3ae57e4c012a2671c9b12469a6111eb37f2a4720fcdf64f0a8cb23ccc1ee
File without changes
File without changes
data/.gitignore CHANGED
File without changes
File without changes
File without changes
@@ -215,6 +215,8 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
215
215
  state of the client and the need to use Result#cancel to stop processing active results. It is also
216
216
  safe to call Result#cancel over and over again.
217
217
  * Look for the syb headers only.
218
+ * Fix minitest global matchers warnings.
219
+ * Fix test warnings.
218
220
 
219
221
 
220
222
  ## 0.3.2
File without changes
data/Gemfile CHANGED
File without changes
File without changes
File without changes
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  * [![TravisCI](https://travis-ci.org/rails-sqlserver/tiny_tds.svg?branch=master)](https://travis-ci.org/rails-sqlserver/tiny_tds) - TravisCI
4
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
5
5
  * [![Gem Version](https://img.shields.io/gem/v/tiny_tds.svg)](https://rubygems.org/gems/tiny_tds) - Gem Version
6
- * [![Dependency Status](https://dependencyci.com/github/rails-sqlserver/tiny_tds/badge)](https://dependencyci.com/github/rails-sqlserver/tiny_tds) - Dependency Status
7
6
  * [![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
8
7
 
9
8
 
data/Rakefile CHANGED
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.3.pre
1
+ 2.1.3
File without changes
File without changes
File without changes
File without changes
@@ -3,7 +3,7 @@ ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15"
3
3
  ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
4
4
 
5
5
  OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1d'
6
- OPENSSL_SOURCE_URI = "https://www.openssl.org/source/old/1.1.1/openssl-#{OPENSSL_VERSION}.tar.gz"
6
+ OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
7
7
 
8
8
  FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.1.24"
9
9
  FREETDS_VERSION_INFO = Hash.new { |h,k|
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,9 +2,7 @@
2
2
  require 'test_helper'
3
3
 
4
4
  class ClientTest < TinyTds::TestCase
5
-
6
- describe 'With valid credentials' do
7
-
5
+ describe 'with valid credentials' do
8
6
  before do
9
7
  @client = new_connection
10
8
  end
@@ -67,7 +65,6 @@ class ClientTest < TinyTds::TestCase
67
65
  client.close if client
68
66
  end
69
67
  end unless sqlserver_azure?
70
-
71
68
  end
72
69
 
73
70
  describe 'With in-valid options' do
@@ -174,57 +171,68 @@ class ClientTest < TinyTds::TestCase
174
171
 
175
172
  end
176
173
 
177
- describe 'Private methods' do
178
-
174
+ describe '#parse_username' do
179
175
  let(:client) { @client = new_connection }
180
176
 
181
- it '#parse_username returns username if azure is not true' do
182
- username = 'user@abc123.database.windows.net'
183
- client.send(:parse_username, username: username).must_equal username
177
+ it 'returns username if azure is not true' do
178
+ _(
179
+ client.send(:parse_username, username: 'user@abc123.database.windows.net')
180
+ ).must_equal 'user@abc123.database.windows.net'
184
181
  end
185
182
 
186
- it '#parse_username returns short username if azure is true' do
187
- client.send(:parse_username,
188
- username: 'user@abc123.database.windows.net',
189
- host: 'abc123.database.windows.net',
190
- azure: true
183
+ it 'returns short username if azure is true' do
184
+ _(
185
+ client.send(
186
+ :parse_username,
187
+ username: 'user@abc123.database.windows.net',
188
+ host: 'abc123.database.windows.net',
189
+ azure: true
190
+ )
191
191
  ).must_equal 'user@abc123'
192
192
  end
193
193
 
194
- it '#parse_username returns full username if azure is false' do
195
- client.send(:parse_username,
196
- username: 'user@abc123.database.windows.net',
197
- host: 'abc123.database.windows.net',
198
- azure: false
194
+ it 'returns full username if azure is false' do
195
+ _(
196
+ client.send(
197
+ :parse_username,
198
+ username: 'user@abc123.database.windows.net',
199
+ host: 'abc123.database.windows.net',
200
+ azure: false
201
+ )
199
202
  ).must_equal 'user@abc123.database.windows.net'
200
203
  end
201
204
 
202
- it '#parse_username returns short username if passed and azure is true' do
203
- client.send(:parse_username,
204
- username: 'user@abc123',
205
- host: 'abc123.database.windows.net',
206
- azure: true
205
+ it 'returns short username if passed and azure is true' do
206
+ _(
207
+ client.send(
208
+ :parse_username,
209
+ username: 'user@abc123',
210
+ host: 'abc123.database.windows.net',
211
+ azure: true
212
+ )
207
213
  ).must_equal 'user@abc123'
208
214
  end
209
215
 
210
- it '#parse_username returns username with servername if passed and azure is true' do
211
- client.send(:parse_username,
212
- username: 'user',
213
- host: 'abc123.database.windows.net',
214
- azure: true
216
+ it 'returns username with servername if passed and azure is true' do
217
+ _(
218
+ client.send(
219
+ :parse_username,
220
+ username: 'user',
221
+ host: 'abc123.database.windows.net',
222
+ azure: true
223
+ )
215
224
  ).must_equal 'user@abc123'
216
225
  end
217
226
 
218
- it '#parse_username returns username with servername if passed and azure is false' do
219
- client.send(:parse_username,
220
- username: 'user',
221
- host: 'abc123.database.windows.net',
222
- azure: false
227
+ it 'returns username with servername if passed and azure is false' do
228
+ _(
229
+ client.send(
230
+ :parse_username,
231
+ username: 'user',
232
+ host: 'abc123.database.windows.net',
233
+ azure: false
234
+ )
223
235
  ).must_equal 'user'
224
236
  end
225
-
226
237
  end
227
-
228
-
229
238
  end
230
-
@@ -21,13 +21,13 @@ class GemTest < MiniTest::Spec
21
21
  let(:root_path) { TinyTds::Gem.root_path }
22
22
 
23
23
  it 'should be the root path' do
24
- root_path.must_equal gem_root
24
+ _(root_path).must_equal gem_root
25
25
  end
26
26
 
27
27
  it 'should be the root path no matter the cwd' do
28
28
  Dir.chdir '/'
29
29
 
30
- root_path.must_equal gem_root
30
+ _(root_path).must_equal gem_root
31
31
  end
32
32
  end
33
33
 
@@ -35,19 +35,19 @@ class GemTest < MiniTest::Spec
35
35
  let(:ports_root_path) { TinyTds::Gem.ports_root_path }
36
36
 
37
37
  it 'should be the ports path' do
38
- ports_root_path.must_equal File.join(gem_root,'ports')
38
+ _(ports_root_path).must_equal File.join(gem_root,'ports')
39
39
  end
40
40
 
41
41
  it 'should be the ports path no matter the cwd' do
42
42
  Dir.chdir '/'
43
43
 
44
- ports_root_path.must_equal File.join(gem_root,'ports')
44
+ _(ports_root_path).must_equal File.join(gem_root,'ports')
45
45
  end
46
46
  end
47
47
 
48
48
  describe '#ports_bin_paths' do
49
49
  let(:ports_bin_paths) { TinyTds::Gem.ports_bin_paths }
50
-
50
+
51
51
  describe 'when the ports directories exist' do
52
52
  let(:fake_bin_paths) do
53
53
  ports_host_root = File.join(gem_root, 'ports', 'fake-host-with-dirs')
@@ -74,12 +74,12 @@ class GemTest < MiniTest::Spec
74
74
  end
75
75
 
76
76
  it 'should return all the bin directories' do
77
- ports_bin_paths.sort.must_equal fake_bin_paths.sort
77
+ _(ports_bin_paths.sort).must_equal fake_bin_paths.sort
78
78
  end
79
79
 
80
80
  it 'should return all the bin directories regardless of cwd' do
81
81
  Dir.chdir '/'
82
- ports_bin_paths.sort.must_equal fake_bin_paths.sort
82
+ _(ports_bin_paths.sort).must_equal fake_bin_paths.sort
83
83
  end
84
84
  end
85
85
 
@@ -89,19 +89,19 @@ class GemTest < MiniTest::Spec
89
89
  end
90
90
 
91
91
  it 'should return no directories' do
92
- ports_bin_paths.must_be_empty
92
+ _(ports_bin_paths).must_be_empty
93
93
  end
94
94
 
95
95
  it 'should return no directories regardless of cwd' do
96
96
  Dir.chdir '/'
97
- ports_bin_paths.must_be_empty
97
+ _(ports_bin_paths).must_be_empty
98
98
  end
99
99
  end
100
100
  end
101
101
 
102
102
  describe '#ports_lib_paths' do
103
103
  let(:ports_lib_paths) { TinyTds::Gem.ports_lib_paths }
104
-
104
+
105
105
  describe 'when the ports directories exist' do
106
106
  let(:fake_lib_paths) do
107
107
  ports_host_root = File.join(gem_root, 'ports', 'fake-host-with-dirs')
@@ -128,12 +128,12 @@ class GemTest < MiniTest::Spec
128
128
  end
129
129
 
130
130
  it 'should return all the lib directories' do
131
- ports_lib_paths.sort.must_equal fake_lib_paths.sort
131
+ _(ports_lib_paths.sort).must_equal fake_lib_paths.sort
132
132
  end
133
133
 
134
134
  it 'should return all the lib directories regardless of cwd' do
135
135
  Dir.chdir '/'
136
- ports_lib_paths.sort.must_equal fake_lib_paths.sort
136
+ _(ports_lib_paths.sort).must_equal fake_lib_paths.sort
137
137
  end
138
138
  end
139
139
 
@@ -144,12 +144,12 @@ class GemTest < MiniTest::Spec
144
144
 
145
145
 
146
146
  it 'should return no directories' do
147
- ports_lib_paths.must_be_empty
147
+ _(ports_lib_paths).must_be_empty
148
148
  end
149
149
 
150
150
  it 'should return no directories regardless of cwd' do
151
151
  Dir.chdir '/'
152
- ports_lib_paths.must_be_empty
152
+ _(ports_lib_paths).must_be_empty
153
153
  end
154
154
  end
155
155
  end
@@ -169,7 +169,7 @@ class GemTest < MiniTest::Spec
169
169
  end
170
170
 
171
171
  it "should return a #{expected} ports host" do
172
- TinyTds::Gem.ports_host.must_equal expected
172
+ _(TinyTds::Gem.ports_host).must_equal expected
173
173
  end
174
174
  end
175
175
  end
@@ -80,7 +80,7 @@ class ResultTest < TinyTds::TestCase
80
80
  @client.execute("DELETE FROM [datatypes]").do
81
81
  @client.execute("INSERT INTO [datatypes] ([char_10], [varchar_50]) VALUES ('1', '2')").do
82
82
  result = @client.execute("SELECT TOP (1) [char_10] + 'test' + [varchar_50] AS [test] FROM [datatypes]").each.first['test']
83
- result.must_equal "1 test2"
83
+ _(result).must_equal "1 test2"
84
84
  end
85
85
  end
86
86
 
@@ -135,10 +135,10 @@ class ResultTest < TinyTds::TestCase
135
135
  text = 'test affected rows sql'
136
136
  @client.execute("DELETE FROM [datatypes]").do
137
137
  afrows = @client.execute("SELECT @@ROWCOUNT AS AffectedRows").each.first['AffectedRows']
138
- ['Fixnum', 'Integer'].must_include afrows.class.name
138
+ _(['Fixnum', 'Integer']).must_include afrows.class.name
139
139
  @client.execute("INSERT INTO [datatypes] ([varchar_50]) VALUES ('#{text}')").do
140
140
  pk1 = @client.execute(@client.identity_sql).each.first['Ident']
141
- ['Fixnum', 'Integer'].must_include pk1.class.name, 'we it be able to CAST to bigint'
141
+ _(['Fixnum', 'Integer']).must_include pk1.class.name, 'we it be able to CAST to bigint'
142
142
  @client.execute("UPDATE [datatypes] SET [varchar_50] = NULL WHERE [varchar_50] = '#{text}'").do
143
143
  afrows = @client.execute("SELECT @@ROWCOUNT AS AffectedRows").each.first['AffectedRows']
144
144
  assert_equal 1, afrows
@@ -215,34 +215,34 @@ class ResultTest < TinyTds::TestCase
215
215
  @client.execute("DELETE FROM [datatypes]").do
216
216
  @client.execute("ROLLBACK TRANSACTION").do
217
217
  count = @client.execute("SELECT COUNT(*) AS [count] FROM [datatypes]").each.first['count']
218
- 0.wont_equal count
218
+ _(count).wont_equal 0
219
219
  end
220
220
 
221
221
  it 'has a #fields accessor with logic default and valid outcome' do
222
222
  result = @client.execute(@query1)
223
- result.fields.must_equal ['one']
223
+ _(result.fields).must_equal ['one']
224
224
  result.each
225
- result.fields.must_equal ['one']
225
+ _(result.fields).must_equal ['one']
226
226
  end
227
227
 
228
228
  it 'always returns an array for fields for all sql' do
229
229
  result = @client.execute("USE [tinytdstest]")
230
- result.fields.must_equal []
230
+ _(result.fields).must_equal []
231
231
  result.do
232
- result.fields.must_equal []
232
+ _(result.fields).must_equal []
233
233
  end
234
234
 
235
235
  it 'returns fields even when no results are found' do
236
236
  no_results_query = "SELECT [id], [varchar_50] FROM [datatypes] WHERE [varchar_50] = 'NOTFOUND'"
237
237
  # Fields before each.
238
238
  result = @client.execute(no_results_query)
239
- result.fields.must_equal ['id','varchar_50']
239
+ _(result.fields).must_equal ['id','varchar_50']
240
240
  result.each
241
- result.fields.must_equal ['id','varchar_50']
241
+ _(result.fields).must_equal ['id','varchar_50']
242
242
  # Each then fields
243
243
  result = @client.execute(no_results_query)
244
244
  result.each
245
- result.fields.must_equal ['id','varchar_50']
245
+ _(result.fields).must_equal ['id','varchar_50']
246
246
  end
247
247
 
248
248
  it 'allows the result to be canceled before reading' do
@@ -254,27 +254,27 @@ class ResultTest < TinyTds::TestCase
254
254
  it 'works in tandem with the client when needing to find out if client has sql sent and result is canceled or not' do
255
255
  # Default state.
256
256
  @client = TinyTds::Client.new(connection_options)
257
- @client.sqlsent?.must_equal false
258
- @client.canceled?.must_equal false
257
+ _(@client.sqlsent?).must_equal false
258
+ _(@client.canceled?).must_equal false
259
259
  # With active result before and after cancel.
260
260
  result = @client.execute(@query1)
261
- @client.sqlsent?.must_equal true
262
- @client.canceled?.must_equal false
261
+ _(@client.sqlsent?).must_equal true
262
+ _(@client.canceled?).must_equal false
263
263
  result.cancel
264
- @client.sqlsent?.must_equal false
265
- @client.canceled?.must_equal true
264
+ _(@client.sqlsent?).must_equal false
265
+ _(@client.canceled?).must_equal true
266
266
  assert result.cancel, 'must be safe to call again'
267
267
  # With each and no block.
268
268
  @client.execute(@query1).each
269
- @client.sqlsent?.must_equal false
270
- @client.canceled?.must_equal false
269
+ _(@client.sqlsent?).must_equal false
270
+ _(@client.canceled?).must_equal false
271
271
  # With each and block.
272
272
  @client.execute(@query1).each do |row|
273
- @client.sqlsent?.must_equal true, 'when iterating over each row in a block'
274
- @client.canceled?.must_equal false
273
+ _(@client.sqlsent?).must_equal true, 'when iterating over each row in a block'
274
+ _(@client.canceled?).must_equal false
275
275
  end
276
- @client.sqlsent?.must_equal false
277
- @client.canceled?.must_equal false
276
+ _(@client.sqlsent?).must_equal false
277
+ _(@client.canceled?).must_equal false
278
278
  # With each and block canceled half way thru.
279
279
  count = @client.execute("SELECT COUNT([id]) AS [count] FROM [datatypes]").each[0]['count']
280
280
  assert count > 10, 'since we want to cancel early for test'
@@ -284,25 +284,25 @@ class ResultTest < TinyTds::TestCase
284
284
  break if index > 10
285
285
  index += 1
286
286
  end
287
- @client.sqlsent?.must_equal true
288
- @client.canceled?.must_equal false
287
+ _(@client.sqlsent?).must_equal true
288
+ _(@client.canceled?).must_equal false
289
289
  result.cancel
290
- @client.sqlsent?.must_equal false
291
- @client.canceled?.must_equal true
290
+ _(@client.sqlsent?).must_equal false
291
+ _(@client.canceled?).must_equal true
292
292
  # With do method.
293
293
  @client.execute(@query1).do
294
- @client.sqlsent?.must_equal false
295
- @client.canceled?.must_equal true
294
+ _(@client.sqlsent?).must_equal false
295
+ _(@client.canceled?).must_equal true
296
296
  # With insert method.
297
297
  rollback_transaction(@client) do
298
298
  @client.execute("INSERT INTO [datatypes] ([varchar_50]) VALUES ('test')").insert
299
- @client.sqlsent?.must_equal false
300
- @client.canceled?.must_equal true
299
+ _(@client.sqlsent?).must_equal false
300
+ _(@client.canceled?).must_equal true
301
301
  end
302
302
  # With first
303
303
  @client.execute("SELECT [id] FROM [datatypes]").each(:first => true)
304
- @client.sqlsent?.must_equal false
305
- @client.canceled?.must_equal true
304
+ _(@client.sqlsent?).must_equal false
305
+ _(@client.canceled?).must_equal true
306
306
  end
307
307
 
308
308
  it 'use same string object for hash keys' do
@@ -337,7 +337,7 @@ class ResultTest < TinyTds::TestCase
337
337
 
338
338
  it 'with LOGINPROPERTY function' do
339
339
  v = @client.execute("SELECT LOGINPROPERTY('sa', 'IsLocked') as v").first['v']
340
- v.must_equal 0
340
+ _(v).must_equal 0
341
341
  end
342
342
 
343
343
  describe 'with multiple result sets' do
@@ -684,7 +684,7 @@ class ResultTest < TinyTds::TestCase
684
684
  end
685
685
 
686
686
  it 'throws an error when you execute another query with other results pending' do
687
- result1 = @client.execute(@query1)
687
+ @client.execute(@query1)
688
688
  action = lambda { @client.execute(@query1) }
689
689
  assert_raise_tinytds_error(action) do |e|
690
690
  assert_match %r|with results pending|i, e.message
@@ -717,22 +717,22 @@ class ResultTest < TinyTds::TestCase
717
717
  it 'must not error at all from reading non-convertable charcters and just use ? marks' do
718
718
  close_client
719
719
  @client = new_connection :encoding => 'ASCII'
720
- @client.charset.must_equal 'ASCII'
721
- find_value(202, :nvarchar_50).must_equal 'test nvarchar_50 ??'
720
+ _(@client.charset).must_equal 'ASCII'
721
+ _(find_value(202, :nvarchar_50)).must_equal 'test nvarchar_50 ??'
722
722
  end
723
723
 
724
724
  it 'must error gracefully from writing non-convertable characters' do
725
725
  close_client
726
726
  @client = new_connection :encoding => 'ASCII'
727
- @client.charset.must_equal 'ASCII'
727
+ _(@client.charset).must_equal 'ASCII'
728
728
  rollback_transaction(@client) do
729
729
  text = 'Test ✓'
730
730
  @client.execute("DELETE FROM [datatypes] WHERE [nvarchar_50] IS NOT NULL").do
731
731
  action = lambda { @client.execute("INSERT INTO [datatypes] ([nvarchar_50]) VALUES ('#{text}')").do }
732
732
  assert_raise_tinytds_error(action) do |e|
733
- e.message.must_match %r{Unclosed quotation mark}i
734
- e.severity.must_equal 15
735
- e.db_error_number.must_equal 105
733
+ _(e.message).must_match %r{Unclosed quotation mark}i
734
+ _(e.severity).must_equal 15
735
+ _(e.db_error_number).must_equal 105
736
736
  end
737
737
  assert_followup_query
738
738
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -14,7 +14,7 @@ class SchemaTest < TinyTds::TestCase
14
14
  describe 'for shared types' do
15
15
 
16
16
  it 'casts bigint' do
17
- assert_equal -9223372036854775807, find_value(11, :bigint)
17
+ assert_equal (-9223372036854775807), find_value(11, :bigint)
18
18
  assert_equal 9223372036854775806, find_value(12, :bigint)
19
19
  end
20
20
 
@@ -96,7 +96,7 @@ class SchemaTest < TinyTds::TestCase
96
96
  end
97
97
 
98
98
  it 'casts int' do
99
- assert_equal -2147483647, find_value(151, :int)
99
+ assert_equal (-2147483647), find_value(151, :int)
100
100
  assert_equal 2147483646, find_value(152, :int)
101
101
  end
102
102
 
@@ -170,7 +170,7 @@ class SchemaTest < TinyTds::TestCase
170
170
  end
171
171
 
172
172
  it 'casts smallint' do
173
- assert_equal -32767, find_value(241, :smallint)
173
+ assert_equal (-32767), find_value(241, :smallint)
174
174
  assert_equal 32766, find_value(242, :smallint)
175
175
  end
176
176
 
@@ -396,15 +396,15 @@ class SchemaTest < TinyTds::TestCase
396
396
  if @client.tds_73?
397
397
  assertions = lambda {
398
398
  assert_instance_of Time, v
399
- assert_equal 1984, v.year, 'Year'
400
- assert_equal 1, v.month, 'Month'
401
- assert_equal 24, v.day, 'Day'
402
- assert_equal 4, v.hour, 'Hour'
403
- assert_equal 20, v.min, 'Minute'
404
- assert_equal 59, v.sec, 'Second'
405
- assert_equal 123456, v.usec, 'Microseconds'
406
- assert_equal 123456700, v.nsec, 'Nanoseconds'
407
- assert_equal -28800, v.utc_offset, 'Offset'
399
+ assert_equal 1984, v.year, 'Year'
400
+ assert_equal 1, v.month, 'Month'
401
+ assert_equal 24, v.day, 'Day'
402
+ assert_equal 4, v.hour, 'Hour'
403
+ assert_equal 20, v.min, 'Minute'
404
+ assert_equal 59, v.sec, 'Second'
405
+ assert_equal 123456, v.usec, 'Microseconds'
406
+ assert_equal 123456700, v.nsec, 'Nanoseconds'
407
+ assert_equal (-28800), v.utc_offset, 'Offset'
408
408
  }
409
409
  assertions.call
410
410
  v = find_value 84, :datetimeoffset_7, timezone: :local
@@ -93,7 +93,7 @@ module TinyTds
93
93
  end
94
94
 
95
95
  def assert_client_works(client)
96
- client.execute("SELECT 'client_works' as [client_works]").each.must_equal [{'client_works' => 'client_works'}]
96
+ _(client.execute("SELECT 'client_works' as [client_works]").each).must_equal [{'client_works' => 'client_works'}]
97
97
  end
98
98
 
99
99
  def assert_new_connections_work
@@ -49,7 +49,7 @@ class ThreadTest < TinyTds::TestCase
49
49
  begin
50
50
  result = client.execute "select dbname()"
51
51
  result.each { |r| puts r }
52
- rescue Exception => e
52
+ rescue Exception => _e
53
53
  # We are throwing an error on purpose here since 0.6.1 would
54
54
  # segfault on errors thrown in threads
55
55
  end
File without changes
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.3.pre
4
+ version: 2.1.3
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: 2020-04-08 00:00:00.000000000 Z
13
+ date: 2020-09-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -159,6 +159,14 @@ files:
159
159
  - ports/i686-w64-mingw32/freetds/1.1.24/lib/libct.la
160
160
  - ports/i686-w64-mingw32/freetds/1.1.24/lib/libsybdb.dll.a
161
161
  - ports/i686-w64-mingw32/freetds/1.1.24/lib/libsybdb.la
162
+ - ports/i686-w64-mingw32/libiconv/1.15/bin/iconv.exe
163
+ - ports/i686-w64-mingw32/libiconv/1.15/bin/libcharset-1.dll
164
+ - ports/i686-w64-mingw32/libiconv/1.15/bin/libiconv-2.dll
165
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/charset.alias
166
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libcharset.dll.a
167
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libcharset.la
168
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libiconv.dll.a
169
+ - ports/i686-w64-mingw32/libiconv/1.15/lib/libiconv.la
162
170
  - ports/i686-w64-mingw32/openssl/1.1.1d/bin/c_rehash
163
171
  - ports/i686-w64-mingw32/openssl/1.1.1d/bin/libcrypto-1_1.dll
164
172
  - ports/i686-w64-mingw32/openssl/1.1.1d/bin/libssl-1_1.dll
@@ -217,9 +225,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
225
  version: 2.8.dev
218
226
  required_rubygems_version: !ruby/object:Gem::Requirement
219
227
  requirements:
220
- - - ">"
228
+ - - ">="
221
229
  - !ruby/object:Gem::Version
222
- version: 1.3.1
230
+ version: '0'
223
231
  requirements: []
224
232
  rubygems_version: 3.1.2
225
233
  signing_key: