tiny_tds 2.1.2 → 3.2.0
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 +5 -5
- data/.github/workflows/ci.yml +590 -0
- data/.gitignore +2 -0
- data/CHANGELOG.md +51 -1
- data/Gemfile +1 -8
- data/ISSUE_TEMPLATE.md +1 -1
- data/README.md +89 -89
- data/Rakefile +44 -30
- data/VERSION +1 -1
- data/docker-compose.yml +34 -0
- data/ext/tiny_tds/client.c +100 -59
- data/ext/tiny_tds/client.h +5 -3
- data/ext/tiny_tds/extconf.rb +173 -52
- data/ext/tiny_tds/extconsts.rb +4 -11
- data/ext/tiny_tds/result.c +52 -45
- data/ext/tiny_tds/tiny_tds_ext.c +4 -1
- data/lib/tiny_tds/bin.rb +12 -26
- data/lib/tiny_tds/client.rb +38 -42
- data/lib/tiny_tds/error.rb +0 -2
- data/lib/tiny_tds/gem.rb +5 -14
- data/lib/tiny_tds/result.rb +0 -2
- data/lib/tiny_tds/version.rb +1 -1
- data/lib/tiny_tds.rb +28 -47
- data/setup_cimgruby_dev.sh +25 -0
- data/start_dev.sh +21 -0
- data/tasks/native_gem.rake +12 -10
- data/tasks/package.rake +1 -3
- data/tasks/ports.rake +14 -77
- data/tasks/test.rake +3 -5
- data/test/bin/install-freetds.sh +2 -4
- data/test/bin/install-mssql.ps1 +42 -0
- data/test/bin/install-mssqltools.sh +9 -0
- data/test/bin/restore-from-native-gem.ps1 +10 -0
- data/test/bin/setup_tinytds_db.sh +7 -0
- data/test/bin/setup_volume_permissions.sh +10 -0
- data/test/client_test.rb +152 -116
- data/test/gem_test.rb +39 -118
- data/test/result_test.rb +285 -350
- data/test/schema_test.rb +369 -395
- data/test/sql/db-create.sql +18 -0
- data/test/sql/db-login.sql +38 -0
- data/test/test_helper.rb +112 -85
- data/test/thread_test.rb +22 -31
- data/tiny_tds.gemspec +28 -26
- metadata +85 -59
- data/.travis.yml +0 -24
- data/BACKERS.md +0 -32
- data/appveyor.yml +0 -51
- data/tasks/ports/freetds.rb +0 -37
- data/tasks/ports/libiconv.rb +0 -43
- data/tasks/ports/openssl.rb +0 -78
- data/tasks/ports/recipe.rb +0 -52
- data/test/appveyor/dbsetup.ps1 +0 -27
- data/test/appveyor/dbsetup.sql +0 -9
- data/test/benchmark/query.rb +0 -77
- data/test/benchmark/query_odbc.rb +0 -106
- data/test/benchmark/query_tinytds.rb +0 -126
- data/test/bin/setup.sh +0 -19
- data/test/schema/sqlserver_2000.sql +0 -140
- data/test/schema/sqlserver_2005.sql +0 -140
- data/test/schema/sqlserver_2014.sql +0 -140
- data/test/schema/sqlserver_2016.sql +0 -140
- data/test/schema/sybase_ase.sql +0 -138
- /data/test/schema/{sqlserver_2008.sql → sqlserver_2017.sql} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: da6ec62dafae6c5922693c73e68c96b400d11a01e822dd14cca6dfe895ad73c5
|
4
|
+
data.tar.gz: d0cf523d4883812c73380dc9362205cf4129c003f7fe59fa0ec4ddabb6113563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31a885748fc4baf54c8db55685a21c33bce4c3d5814392b8eda842f793ed5ae1ab32214d0c9ae4a0d56569d3ade6d65ccf3f0dbb537763ae107360de4cb73578
|
7
|
+
data.tar.gz: 786633e1af17f4821ee856d25c9621cef95367a7cf00acb3ff2dfff4dd563a6d3095ba82a86ccfeb3a1031d7f987548067b5f6138c6510d523284ce4526c45c9
|
@@ -0,0 +1,590 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
pull_request:
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
cross-compile:
|
10
|
+
strategy:
|
11
|
+
fail-fast: false
|
12
|
+
matrix:
|
13
|
+
platform:
|
14
|
+
- "x64-mingw32"
|
15
|
+
- "x64-mingw-ucrt"
|
16
|
+
- "x86_64-linux-gnu"
|
17
|
+
- "x86_64-linux-musl"
|
18
|
+
- "aarch64-linux-gnu"
|
19
|
+
- "aarch64-linux-musl"
|
20
|
+
|
21
|
+
name: cross-compile
|
22
|
+
runs-on: ubuntu-22.04
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v4
|
25
|
+
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: "2.7"
|
30
|
+
|
31
|
+
- name: "Install dependencies"
|
32
|
+
run: bundle install
|
33
|
+
|
34
|
+
- name: Write used versions into file
|
35
|
+
shell: bash
|
36
|
+
run: bundle exec rake ports:version_file[${{ matrix.platform }}]
|
37
|
+
|
38
|
+
- name: Cache ports
|
39
|
+
uses: actions/cache@v4
|
40
|
+
with:
|
41
|
+
path: ports
|
42
|
+
key: cross-compiled-v1-${{ matrix.platform }}-${{ hashFiles('**/.ports_versions') }}
|
43
|
+
restore-keys: |
|
44
|
+
cross-compiled-v1-${{ matrix.platform }}-${{ hashFiles('**/.ports_versions') }}
|
45
|
+
cross-compiled-v1-${{ matrix.platform }}-
|
46
|
+
|
47
|
+
- name: Build gem
|
48
|
+
shell: bash
|
49
|
+
run: bundle exec rake gem:native:${{ matrix.platform }}
|
50
|
+
|
51
|
+
- uses: actions/upload-artifact@v4
|
52
|
+
with:
|
53
|
+
name: gem-${{ matrix.platform }}
|
54
|
+
path: pkg/*.gem
|
55
|
+
|
56
|
+
install-windows-mingw:
|
57
|
+
needs:
|
58
|
+
- cross-compile
|
59
|
+
strategy:
|
60
|
+
fail-fast: false
|
61
|
+
matrix:
|
62
|
+
ruby-version:
|
63
|
+
- "2.7"
|
64
|
+
- "3.0"
|
65
|
+
|
66
|
+
name: install-windows-mingw
|
67
|
+
runs-on: windows-latest
|
68
|
+
steps:
|
69
|
+
- uses: actions/checkout@v4
|
70
|
+
|
71
|
+
- uses: ruby/setup-ruby@v1
|
72
|
+
with:
|
73
|
+
ruby-version: ${{ matrix.ruby-version }}
|
74
|
+
bundler-cache: true
|
75
|
+
|
76
|
+
- name: Download precompiled gem
|
77
|
+
uses: actions/download-artifact@v4
|
78
|
+
with:
|
79
|
+
name: gem-x64-mingw32
|
80
|
+
|
81
|
+
- name: Install native gem
|
82
|
+
shell: pwsh
|
83
|
+
run: |
|
84
|
+
$rubyArchitecture = (ruby -e "puts RbConfig::CONFIG['arch']").Trim()
|
85
|
+
$gemVersion = (Get-Content VERSION).Trim()
|
86
|
+
$gemToInstall = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
|
87
|
+
|
88
|
+
Write-Host "Looking to install $gemToInstall"
|
89
|
+
gem install "$gemToInstall"
|
90
|
+
|
91
|
+
- name: Test if TinyTDS loads
|
92
|
+
shell: pwsh
|
93
|
+
run: |
|
94
|
+
ruby -e "require 'tiny_tds'; puts TinyTds::Gem.root_path"
|
95
|
+
exit $LASTEXITCODE
|
96
|
+
|
97
|
+
- name: Test if tsql wrapper works
|
98
|
+
shell: pwsh
|
99
|
+
run: |
|
100
|
+
tsql-ttds -C
|
101
|
+
exit $LASTEXITCODE
|
102
|
+
|
103
|
+
- name: Test if defncopy wrapper works
|
104
|
+
shell: pwsh
|
105
|
+
run: |
|
106
|
+
defncopy-ttds -v
|
107
|
+
exit $LASTEXITCODE
|
108
|
+
|
109
|
+
test-windows-mingw:
|
110
|
+
needs:
|
111
|
+
- cross-compile
|
112
|
+
strategy:
|
113
|
+
fail-fast: false
|
114
|
+
matrix:
|
115
|
+
force-encryption:
|
116
|
+
- false
|
117
|
+
- true
|
118
|
+
mssql-version:
|
119
|
+
- 2017
|
120
|
+
- 2019
|
121
|
+
- 2022
|
122
|
+
ruby-version:
|
123
|
+
- "2.7"
|
124
|
+
- "3.0"
|
125
|
+
|
126
|
+
name: test-windows-mingw
|
127
|
+
runs-on: windows-latest
|
128
|
+
steps:
|
129
|
+
- uses: actions/checkout@v4
|
130
|
+
|
131
|
+
- uses: ruby/setup-ruby@v1
|
132
|
+
with:
|
133
|
+
ruby-version: ${{ matrix.ruby-version }}
|
134
|
+
bundler-cache: true
|
135
|
+
|
136
|
+
- name: Download precompiled gem
|
137
|
+
uses: actions/download-artifact@v4
|
138
|
+
with:
|
139
|
+
name: gem-x64-mingw32
|
140
|
+
|
141
|
+
- name: Install native gem and restore cross-compiled code from it
|
142
|
+
shell: pwsh
|
143
|
+
run: "& ./test/bin/restore-from-native-gem.ps1"
|
144
|
+
env:
|
145
|
+
RUBY_ARCHITECTURE: "x64-mingw32"
|
146
|
+
|
147
|
+
- name: Setup MSSQL
|
148
|
+
uses: rails-sqlserver/setup-mssql@v1
|
149
|
+
with:
|
150
|
+
components: sqlcmd,sqlengine
|
151
|
+
version: ${{ matrix.mssql-version }}
|
152
|
+
sa-password: c0MplicatedP@ssword
|
153
|
+
force-encryption: ${{ matrix.force-encryption }}
|
154
|
+
|
155
|
+
- name: Setup MSSQL database
|
156
|
+
shell: pwsh
|
157
|
+
run: |
|
158
|
+
& sqlcmd -S localhost -U sa -P "c0MplicatedP@ssword" -i ./test/sql/db-create.sql
|
159
|
+
& sqlcmd -S localhost -U sa -P "c0MplicatedP@ssword" -i ./test/sql/db-login.sql
|
160
|
+
|
161
|
+
- name: Install toxiproxy-server
|
162
|
+
shell: pwsh
|
163
|
+
run: |
|
164
|
+
choco install toxiproxy-server --version=2.5.0 -y
|
165
|
+
Start-Process toxiproxy-server
|
166
|
+
|
167
|
+
- name: Test gem
|
168
|
+
shell: pwsh
|
169
|
+
run: bundle exec rake test
|
170
|
+
env:
|
171
|
+
TOXIPROXY_HOST: "localhost"
|
172
|
+
|
173
|
+
- name: Test Summary
|
174
|
+
uses: test-summary/action@v2
|
175
|
+
with:
|
176
|
+
paths: "test/reports/TEST-*.xml"
|
177
|
+
if: always()
|
178
|
+
|
179
|
+
install-windows-ucrt:
|
180
|
+
needs:
|
181
|
+
- cross-compile
|
182
|
+
strategy:
|
183
|
+
fail-fast: false
|
184
|
+
matrix:
|
185
|
+
ruby-version:
|
186
|
+
- "3.1"
|
187
|
+
- "3.2"
|
188
|
+
- "3.3"
|
189
|
+
- "3.4"
|
190
|
+
|
191
|
+
name: install-windows-ucrt
|
192
|
+
runs-on: windows-latest
|
193
|
+
steps:
|
194
|
+
- uses: actions/checkout@v4
|
195
|
+
|
196
|
+
- uses: ruby/setup-ruby@v1
|
197
|
+
with:
|
198
|
+
ruby-version: ${{ matrix.ruby-version }}
|
199
|
+
bundler-cache: true
|
200
|
+
|
201
|
+
- name: Download precompiled gem
|
202
|
+
uses: actions/download-artifact@v4
|
203
|
+
with:
|
204
|
+
name: gem-x64-mingw-ucrt
|
205
|
+
|
206
|
+
- name: Install native gem
|
207
|
+
shell: pwsh
|
208
|
+
run: |
|
209
|
+
$rubyArchitecture = (ruby -e "puts RbConfig::CONFIG['arch']").Trim()
|
210
|
+
$gemVersion = (Get-Content VERSION).Trim()
|
211
|
+
$gemToInstall = "./tiny_tds-$gemVersion-$rubyArchitecture.gem"
|
212
|
+
|
213
|
+
Write-Host "Looking to install $gemToInstall"
|
214
|
+
gem install "$gemToInstall"
|
215
|
+
|
216
|
+
- name: Test if TinyTDS loads
|
217
|
+
shell: pwsh
|
218
|
+
run: |
|
219
|
+
ruby -e "require 'tiny_tds'; puts TinyTds::Gem.root_path"
|
220
|
+
exit $LASTEXITCODE
|
221
|
+
|
222
|
+
- name: Test if tsql wrapper works
|
223
|
+
shell: pwsh
|
224
|
+
run: |
|
225
|
+
tsql-ttds -C
|
226
|
+
exit $LASTEXITCODE
|
227
|
+
|
228
|
+
- name: Test if defncopy wrapper works
|
229
|
+
shell: pwsh
|
230
|
+
run: |
|
231
|
+
defncopy-ttds -v
|
232
|
+
exit $LASTEXITCODE
|
233
|
+
|
234
|
+
test-windows-ucrt:
|
235
|
+
needs:
|
236
|
+
- cross-compile
|
237
|
+
strategy:
|
238
|
+
fail-fast: false
|
239
|
+
matrix:
|
240
|
+
force-encryption:
|
241
|
+
- false
|
242
|
+
- true
|
243
|
+
mssql-version:
|
244
|
+
- 2017
|
245
|
+
- 2019
|
246
|
+
- 2022
|
247
|
+
ruby-version:
|
248
|
+
- "3.1"
|
249
|
+
- "3.2"
|
250
|
+
- "3.3"
|
251
|
+
- "3.4"
|
252
|
+
|
253
|
+
name: test-windows-ucrt
|
254
|
+
runs-on: windows-latest
|
255
|
+
steps:
|
256
|
+
- uses: actions/checkout@v4
|
257
|
+
|
258
|
+
- uses: ruby/setup-ruby@v1
|
259
|
+
with:
|
260
|
+
ruby-version: ${{ matrix.ruby-version }}
|
261
|
+
bundler-cache: true
|
262
|
+
|
263
|
+
- name: Download precompiled gem
|
264
|
+
uses: actions/download-artifact@v4
|
265
|
+
with:
|
266
|
+
name: gem-x64-mingw-ucrt
|
267
|
+
|
268
|
+
- name: Install native gem and restore cross-compiled code from it
|
269
|
+
shell: pwsh
|
270
|
+
run: "& ./test/bin/restore-from-native-gem.ps1"
|
271
|
+
env:
|
272
|
+
RUBY_ARCHITECTURE: "x64-mingw-ucrt"
|
273
|
+
|
274
|
+
- name: Setup MSSQL
|
275
|
+
uses: rails-sqlserver/setup-mssql@v1
|
276
|
+
with:
|
277
|
+
components: sqlcmd,sqlengine
|
278
|
+
version: ${{ matrix.mssql-version }}
|
279
|
+
sa-password: c0MplicatedP@ssword
|
280
|
+
force-encryption: ${{ matrix.force-encryption }}
|
281
|
+
|
282
|
+
- name: Setup MSSQL database
|
283
|
+
shell: pwsh
|
284
|
+
run: |
|
285
|
+
& sqlcmd -S localhost -U sa -P "c0MplicatedP@ssword" -i ./test/sql/db-create.sql
|
286
|
+
& sqlcmd -S localhost -U sa -P "c0MplicatedP@ssword" -i ./test/sql/db-login.sql
|
287
|
+
|
288
|
+
- name: Install toxiproxy-server
|
289
|
+
shell: pwsh
|
290
|
+
run: |
|
291
|
+
choco install toxiproxy-server --version=2.5.0 -y
|
292
|
+
Start-Process toxiproxy-server
|
293
|
+
|
294
|
+
- name: Test gem
|
295
|
+
shell: pwsh
|
296
|
+
run: bundle exec rake test
|
297
|
+
env:
|
298
|
+
TOXIPROXY_HOST: "localhost"
|
299
|
+
|
300
|
+
- name: Test Summary
|
301
|
+
uses: test-summary/action@v2
|
302
|
+
with:
|
303
|
+
paths: "test/reports/TEST-*.xml"
|
304
|
+
if: always()
|
305
|
+
|
306
|
+
install-windows-native:
|
307
|
+
strategy:
|
308
|
+
fail-fast: false
|
309
|
+
matrix:
|
310
|
+
ruby-version:
|
311
|
+
- "2.7"
|
312
|
+
- "3.0"
|
313
|
+
- "3.1"
|
314
|
+
- "3.2"
|
315
|
+
- "3.3"
|
316
|
+
- "3.4"
|
317
|
+
|
318
|
+
name: install-windows-native
|
319
|
+
runs-on: windows-latest
|
320
|
+
steps:
|
321
|
+
- uses: actions/checkout@v4
|
322
|
+
|
323
|
+
- uses: ruby/setup-ruby@v1
|
324
|
+
with:
|
325
|
+
ruby-version: ${{ matrix.ruby-version }}
|
326
|
+
bundler-cache: true
|
327
|
+
|
328
|
+
- name: Build gem
|
329
|
+
shell: pwsh
|
330
|
+
run: gem build tiny_tds.gemspec
|
331
|
+
|
332
|
+
- name: Install gem
|
333
|
+
shell: pwsh
|
334
|
+
run: |
|
335
|
+
$gemVersion = (Get-Content VERSION).Trim()
|
336
|
+
gem install "tiny_tds-$gemVersion.gem"
|
337
|
+
|
338
|
+
- name: Test if TinyTDS loads
|
339
|
+
shell: pwsh
|
340
|
+
run: |
|
341
|
+
ruby -e "require 'tiny_tds'; puts TinyTds::Gem.root_path"
|
342
|
+
exit $LASTEXITCODE
|
343
|
+
|
344
|
+
- name: Test if tsql wrapper works
|
345
|
+
shell: pwsh
|
346
|
+
run: |
|
347
|
+
tsql-ttds -C
|
348
|
+
exit $LASTEXITCODE
|
349
|
+
|
350
|
+
- name: Test if defncopy wrapper works
|
351
|
+
shell: pwsh
|
352
|
+
run: |
|
353
|
+
defncopy-ttds -v
|
354
|
+
exit $LASTEXITCODE
|
355
|
+
|
356
|
+
install-linux:
|
357
|
+
needs:
|
358
|
+
- cross-compile
|
359
|
+
strategy:
|
360
|
+
fail-fast: false
|
361
|
+
matrix:
|
362
|
+
platform:
|
363
|
+
- "x86_64-linux-gnu"
|
364
|
+
- "x86_64-linux-musl"
|
365
|
+
- "aarch64-linux-gnu"
|
366
|
+
- "aarch64-linux-musl"
|
367
|
+
|
368
|
+
ruby-version:
|
369
|
+
- "2.7"
|
370
|
+
- "3.0"
|
371
|
+
- "3.1"
|
372
|
+
- "3.2"
|
373
|
+
- "3.3"
|
374
|
+
- "3.4"
|
375
|
+
|
376
|
+
include:
|
377
|
+
- platform: x86_64-linux-musl
|
378
|
+
docker_tag: "-alpine"
|
379
|
+
bootstrap: "apk add -U build-base &&" # required to compile bigdecimal on Ruby 2.7
|
380
|
+
|
381
|
+
- platform: aarch64-linux-gnu
|
382
|
+
docker_platform: "--platform=linux/arm64"
|
383
|
+
|
384
|
+
- platform: aarch64-linux-musl
|
385
|
+
docker_platform: "--platform=linux/arm64"
|
386
|
+
docker_tag: "-alpine"
|
387
|
+
bootstrap: "apk add -U build-base &&"
|
388
|
+
|
389
|
+
name: install-linux
|
390
|
+
runs-on: ubuntu-22.04
|
391
|
+
steps:
|
392
|
+
- uses: actions/checkout@v4
|
393
|
+
|
394
|
+
- name: Download precompiled gem
|
395
|
+
uses: actions/download-artifact@v4
|
396
|
+
with:
|
397
|
+
name: gem-${{ matrix.platform }}
|
398
|
+
path: precompiled/gems
|
399
|
+
|
400
|
+
- name: Setup QEMU for docker
|
401
|
+
uses: docker/setup-qemu-action@v3
|
402
|
+
if: ${{ matrix.docker_platform }} != ''
|
403
|
+
|
404
|
+
- run: |
|
405
|
+
docker run --rm -v $PWD/precompiled:/precompiled -w /precompiled \
|
406
|
+
${{ matrix.docker_platform }} ruby:${{ matrix.ruby-version }}${{ matrix.docker_tag }} \
|
407
|
+
sh -c "
|
408
|
+
gem update --system 3.3.22 &&
|
409
|
+
${{ matrix.bootstrap }}
|
410
|
+
gem install --no-document ./gems/tiny_tds-$(cat VERSION)-${{ matrix.platform }}.gem &&
|
411
|
+
ruby -e \"require 'tiny_tds'; puts TinyTds::Gem.root_path\" &&
|
412
|
+
tsql-ttds -C &&
|
413
|
+
defncopy-ttds -v
|
414
|
+
"
|
415
|
+
|
416
|
+
test-linux:
|
417
|
+
needs:
|
418
|
+
- cross-compile
|
419
|
+
name: test-linux
|
420
|
+
strategy:
|
421
|
+
fail-fast: false
|
422
|
+
matrix:
|
423
|
+
force-encryption:
|
424
|
+
- false
|
425
|
+
- true
|
426
|
+
|
427
|
+
mssql-version:
|
428
|
+
- 2017
|
429
|
+
- 2019
|
430
|
+
- 2022
|
431
|
+
|
432
|
+
ruby-version:
|
433
|
+
- "2.7"
|
434
|
+
- "3.0"
|
435
|
+
- "3.1"
|
436
|
+
- "3.2"
|
437
|
+
- "3.3"
|
438
|
+
- "3.4"
|
439
|
+
|
440
|
+
runs-on: ubuntu-22.04
|
441
|
+
steps:
|
442
|
+
- uses: actions/checkout@v4
|
443
|
+
|
444
|
+
- uses: ruby/setup-ruby@v1
|
445
|
+
with:
|
446
|
+
ruby-version: ${{ matrix.ruby-version }}
|
447
|
+
bundler-cache: true
|
448
|
+
|
449
|
+
- name: Download precompiled gem
|
450
|
+
uses: actions/download-artifact@v4
|
451
|
+
with:
|
452
|
+
name: gem-x86_64-linux-gnu
|
453
|
+
|
454
|
+
- name: Install native gem and restore cross-compiled code from it
|
455
|
+
shell: pwsh
|
456
|
+
run: "& ./test/bin/restore-from-native-gem.ps1"
|
457
|
+
env:
|
458
|
+
RUBY_ARCHITECTURE: "x86_64-linux-gnu"
|
459
|
+
|
460
|
+
- name: Setup MSSQL
|
461
|
+
uses: rails-sqlserver/setup-mssql@v1
|
462
|
+
with:
|
463
|
+
components: sqlcmd,sqlengine
|
464
|
+
version: ${{ matrix.mssql-version }}
|
465
|
+
sa-password: "c0MplicatedP@ssword"
|
466
|
+
force-encryption: ${{ matrix.force-encryption }}
|
467
|
+
|
468
|
+
- name: Setup MSSQL database
|
469
|
+
run: |
|
470
|
+
sqlcmd -S localhost -U sa -P "c0MplicatedP@ssword" -i ./test/sql/db-create.sql
|
471
|
+
sqlcmd -S localhost -U sa -P "c0MplicatedP@ssword" -i ./test/sql/db-login.sql
|
472
|
+
|
473
|
+
- name: Install toxiproxy-server
|
474
|
+
run: |
|
475
|
+
wget -O toxiproxy-2.5.0.deb https://github.com/Shopify/toxiproxy/releases/download/v2.5.0/toxiproxy_2.5.0_linux_amd64.deb
|
476
|
+
sudo dpkg -i toxiproxy-2.5.0.deb
|
477
|
+
sudo toxiproxy-server &
|
478
|
+
|
479
|
+
- name: Run tests
|
480
|
+
run: bundle exec rake test
|
481
|
+
env:
|
482
|
+
TOXIPROXY_HOST: "localhost"
|
483
|
+
|
484
|
+
- name: Test Summary
|
485
|
+
uses: test-summary/action@v2
|
486
|
+
with:
|
487
|
+
paths: "test/reports/TEST-*.xml"
|
488
|
+
if: always()
|
489
|
+
|
490
|
+
install-linux-native:
|
491
|
+
strategy:
|
492
|
+
fail-fast: false
|
493
|
+
matrix:
|
494
|
+
ruby-version:
|
495
|
+
- "2.7"
|
496
|
+
- "3.0"
|
497
|
+
- "3.1"
|
498
|
+
- "3.2"
|
499
|
+
- "3.3"
|
500
|
+
- "3.4"
|
501
|
+
|
502
|
+
name: install-linux-native
|
503
|
+
runs-on: ubuntu-22.04
|
504
|
+
steps:
|
505
|
+
- uses: actions/checkout@v4
|
506
|
+
|
507
|
+
- uses: ruby/setup-ruby@v1
|
508
|
+
with:
|
509
|
+
ruby-version: ${{ matrix.ruby-version }}
|
510
|
+
bundler-cache: true
|
511
|
+
|
512
|
+
- name: Install FreeTDS
|
513
|
+
shell: bash
|
514
|
+
run: ./test/bin/install-freetds.sh
|
515
|
+
|
516
|
+
- name: Build gem
|
517
|
+
shell: bash
|
518
|
+
run: gem build tiny_tds.gemspec
|
519
|
+
|
520
|
+
- name: Install gem
|
521
|
+
shell: bash
|
522
|
+
run: gem install "tiny_tds-$(cat VERSION).gem"
|
523
|
+
|
524
|
+
- name: Test if TinyTDS loads
|
525
|
+
shell: bash
|
526
|
+
run: ruby -e "require 'tiny_tds'; puts TinyTds::Gem.root_path"
|
527
|
+
|
528
|
+
- name: Test if tsql wrapper works
|
529
|
+
shell: bash
|
530
|
+
run: tsql-ttds -C
|
531
|
+
|
532
|
+
- name: Test if defncopy wrapper works
|
533
|
+
shell: bash
|
534
|
+
run: defncopy-ttds -v
|
535
|
+
|
536
|
+
install_macos:
|
537
|
+
strategy:
|
538
|
+
fail-fast: false
|
539
|
+
matrix:
|
540
|
+
ruby-version:
|
541
|
+
- "2.7"
|
542
|
+
- "3.0"
|
543
|
+
- "3.1"
|
544
|
+
- "3.2"
|
545
|
+
- "3.3"
|
546
|
+
- "3.4"
|
547
|
+
|
548
|
+
name: install-macos-m1
|
549
|
+
runs-on: macos-14
|
550
|
+
steps:
|
551
|
+
- uses: actions/checkout@v4
|
552
|
+
|
553
|
+
- name: Install FreeTDS
|
554
|
+
run: brew install freetds
|
555
|
+
shell: bash
|
556
|
+
|
557
|
+
- uses: ruby/setup-ruby@v1
|
558
|
+
with:
|
559
|
+
ruby-version: ${{ matrix.ruby-version }}
|
560
|
+
bundler-cache: true
|
561
|
+
|
562
|
+
- name: Build gem
|
563
|
+
shell: bash
|
564
|
+
run: gem build tiny_tds.gemspec
|
565
|
+
|
566
|
+
- name: Install gem and test if TinyTDS loads
|
567
|
+
shell: bash
|
568
|
+
run: |
|
569
|
+
gemVersion=$(<VERSION tr -d '[:space:]')
|
570
|
+
gem install "tiny_tds-$gemVersion.gem"
|
571
|
+
|
572
|
+
- name: Test if TinyTDS loads
|
573
|
+
shell: bash
|
574
|
+
run: |
|
575
|
+
ruby -e "require 'tiny_tds'; puts TinyTds::Gem.root_path"
|
576
|
+
|
577
|
+
standardrb:
|
578
|
+
name: standardrb
|
579
|
+
runs-on: ubuntu-22.04
|
580
|
+
steps:
|
581
|
+
- uses: actions/checkout@v4
|
582
|
+
|
583
|
+
- uses: ruby/setup-ruby@v1
|
584
|
+
with:
|
585
|
+
ruby-version: "2.7"
|
586
|
+
bundler-cache: true
|
587
|
+
|
588
|
+
- name: Check standardrb
|
589
|
+
shell: bash
|
590
|
+
run: bundle exec standardrb
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,52 @@
|
|
1
|
+
## 3.2.0
|
2
|
+
|
3
|
+
* Reduce number of files shipped with precompiled Windows gem
|
4
|
+
* Provide precompiled gem for Linux (GNU + MUSL / 64-bit x86 + ARM)
|
5
|
+
* Fix wrappers for `tsql` and `defncopy` utility.
|
6
|
+
* Use libiconv v1.18 and freetds v1.4.26 for Windows and Linux builds
|
7
|
+
|
8
|
+
## 3.1.0
|
9
|
+
|
10
|
+
* Add Ruby 3.4 to the cross compile list
|
11
|
+
|
12
|
+
## 3.0.0
|
13
|
+
|
14
|
+
* Drop support for Ruby < 2.7
|
15
|
+
* Drop support for SQL Server < 2017
|
16
|
+
* Drop support for FreeTDS < 1.0
|
17
|
+
* No longer provide a 32-bit Windows build
|
18
|
+
* Raise error if FreeTDS is unable to send command buffer to the server
|
19
|
+
* Use freetds v1.4.23, libiconv v1.17 and OpenSSL v3.4.0 for Windows builds
|
20
|
+
* Add `bigdecimal` to dependencies
|
21
|
+
|
22
|
+
## 2.1.7
|
23
|
+
|
24
|
+
* Add Ruby 3.3 to the cross compile list
|
25
|
+
|
26
|
+
## 2.1.6
|
27
|
+
|
28
|
+
* Add Ruby 3.0, 3.1, and 3.2 to the cross compile list
|
29
|
+
* Fix segfault when asking if client was dead after closing it. Fixes #519.
|
30
|
+
* Mark `alloc` function as undefined on `TinyTds::Result`. Fixes #515.
|
31
|
+
* Fix Gem installation on Windows by adding default freetds msys path. Fixes #522
|
32
|
+
* Search for `freetds` in `/opt/homebrew` when installing on Apple Silicon. Fixes #484, #492 and #508.
|
33
|
+
|
34
|
+
## 2.1.5
|
35
|
+
|
36
|
+
* Fix compilation errors for Amazon Linux 1. Fixes #495.
|
37
|
+
* Fix segfault for login timeouts
|
38
|
+
|
39
|
+
## 2.1.4
|
40
|
+
|
41
|
+
* Improve handling of network related timeouts
|
42
|
+
* Fix error reporting when preceded by info message
|
43
|
+
|
44
|
+
## 2.1.3
|
45
|
+
|
46
|
+
* Removed old/unused appveyor config
|
47
|
+
* Remove old Rubies from CI & cross compile list
|
48
|
+
* Add Ruby 2.6 and 2.7 to the cross compile list
|
49
|
+
|
1
50
|
## 2.1.2
|
2
51
|
|
3
52
|
* Use Kernel.BigDecimal vs BigDecimal.new. Fixes #409.
|
@@ -207,6 +256,8 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
207
256
|
state of the client and the need to use Result#cancel to stop processing active results. It is also
|
208
257
|
safe to call Result#cancel over and over again.
|
209
258
|
* Look for the syb headers only.
|
259
|
+
* Fix minitest global matchers warnings.
|
260
|
+
* Fix test warnings.
|
210
261
|
|
211
262
|
|
212
263
|
## 0.3.2
|
@@ -252,4 +303,3 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
|
|
252
303
|
|
253
304
|
|
254
305
|
## 0.1.0 Initial release!
|
255
|
-
|
data/Gemfile
CHANGED
data/ISSUE_TEMPLATE.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
* On Windows? If so, do you need devkit for your ruby install?
|
4
4
|
* Using Ubuntu? If so, you may have forgotten to install FreeTDS first.
|
5
|
-
* Are you using FreeTDS 0.
|
5
|
+
* Are you using FreeTDS 1.0.0 or later? Check `$ tsql -C` to find out.
|
6
6
|
* If not, please update then uninstall the TinyTDS gem and re-install it.
|
7
7
|
* Have you made sure to [enable SQL Server authentication](http://bit.ly/1Kw3set)?
|
8
8
|
* Doing work with threads and the raw client? Use the ConnectionPool gem?
|