tiny_tds 3.2.0-x86_64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +20 -0
  3. data/.gitattributes +1 -0
  4. data/.github/workflows/ci.yml +590 -0
  5. data/.gitignore +22 -0
  6. data/.rubocop.yml +31 -0
  7. data/CHANGELOG.md +305 -0
  8. data/CODE_OF_CONDUCT.md +31 -0
  9. data/Gemfile +2 -0
  10. data/ISSUE_TEMPLATE.md +38 -0
  11. data/MIT-LICENSE +23 -0
  12. data/README.md +493 -0
  13. data/Rakefile +67 -0
  14. data/VERSION +1 -0
  15. data/bin/defncopy-ttds +3 -0
  16. data/bin/tsql-ttds +3 -0
  17. data/docker-compose.yml +34 -0
  18. data/exe/.keep +0 -0
  19. data/ext/tiny_tds/client.c +492 -0
  20. data/ext/tiny_tds/client.h +53 -0
  21. data/ext/tiny_tds/extconf.rb +190 -0
  22. data/ext/tiny_tds/extconsts.rb +8 -0
  23. data/ext/tiny_tds/result.c +626 -0
  24. data/ext/tiny_tds/result.h +32 -0
  25. data/ext/tiny_tds/tiny_tds_ext.c +15 -0
  26. data/ext/tiny_tds/tiny_tds_ext.h +17 -0
  27. data/lib/tiny_tds/2.7/tiny_tds.so +0 -0
  28. data/lib/tiny_tds/3.0/tiny_tds.so +0 -0
  29. data/lib/tiny_tds/3.1/tiny_tds.so +0 -0
  30. data/lib/tiny_tds/3.2/tiny_tds.so +0 -0
  31. data/lib/tiny_tds/3.3/tiny_tds.so +0 -0
  32. data/lib/tiny_tds/3.4/tiny_tds.so +0 -0
  33. data/lib/tiny_tds/bin.rb +90 -0
  34. data/lib/tiny_tds/client.rb +132 -0
  35. data/lib/tiny_tds/error.rb +12 -0
  36. data/lib/tiny_tds/gem.rb +23 -0
  37. data/lib/tiny_tds/result.rb +5 -0
  38. data/lib/tiny_tds/version.rb +3 -0
  39. data/lib/tiny_tds.rb +42 -0
  40. data/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff +34 -0
  41. data/patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff +28 -0
  42. data/patches/libiconv/1.14/1-avoid-gets-error.patch +17 -0
  43. data/ports/x86_64-linux-musl/bin/defncopy +0 -0
  44. data/ports/x86_64-linux-musl/bin/tsql +0 -0
  45. data/ports/x86_64-linux-musl/lib/libsybdb.so.5 +0 -0
  46. data/setup_cimgruby_dev.sh +25 -0
  47. data/start_dev.sh +21 -0
  48. data/tasks/native_gem.rake +16 -0
  49. data/tasks/package.rake +6 -0
  50. data/tasks/ports.rake +24 -0
  51. data/tasks/test.rake +7 -0
  52. data/test/bin/install-freetds.sh +18 -0
  53. data/test/bin/install-mssql.ps1 +42 -0
  54. data/test/bin/install-mssqltools.sh +9 -0
  55. data/test/bin/install-openssl.sh +18 -0
  56. data/test/bin/restore-from-native-gem.ps1 +10 -0
  57. data/test/bin/setup_tinytds_db.sh +7 -0
  58. data/test/bin/setup_volume_permissions.sh +10 -0
  59. data/test/client_test.rb +266 -0
  60. data/test/gem_test.rb +100 -0
  61. data/test/result_test.rb +708 -0
  62. data/test/schema/1px.gif +0 -0
  63. data/test/schema/sqlserver_2017.sql +140 -0
  64. data/test/schema/sqlserver_azure.sql +140 -0
  65. data/test/schema_test.rb +417 -0
  66. data/test/sql/db-create.sql +18 -0
  67. data/test/sql/db-login.sql +38 -0
  68. data/test/test_helper.rb +244 -0
  69. data/test/thread_test.rb +89 -0
  70. data/tiny_tds.gemspec +31 -0
  71. metadata +259 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6f297f493ca8dc8ba53674da403082c598fb3f72f9705159e43b9f615f5785d9
4
+ data.tar.gz: 9c1ed81e5a58b54e3faeaeb7595892214c5440b0b1909f1e8763afc426c44ea9
5
+ SHA512:
6
+ metadata.gz: 1fc1a21e2dfcc115c2c8cea407be7fd263d6a6d5f0ed3f6565b8177ba2db7475f5987aebccdc650326e37989de237cfcb49630b669d6ae2fae084f1866b56e6c
7
+ data.tar.gz: 4f385281b6e7c13aea05ce985a05bc5b1c890658f31045244af4f265ff82937d80d4a2132508556bd0d6e7705aa2c6dc8c70475da24a6250f123a00f6a535ccf
data/.codeclimate.yml ADDED
@@ -0,0 +1,20 @@
1
+ engines:
2
+ bundler-audit:
3
+ enabled: true
4
+ duplication:
5
+ enabled: true
6
+ config:
7
+ languages:
8
+ - ruby
9
+ fixme:
10
+ enabled: true
11
+ rubocop:
12
+ enabled: true
13
+ ratings:
14
+ paths:
15
+ - "**.rb"
16
+ exclude_paths:
17
+ - ext/
18
+ - ports/
19
+ - test/
20
+ - tmp/
data/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ *.diff eol=lf
@@ -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 ADDED
@@ -0,0 +1,22 @@
1
+ Makefile
2
+ *.dSYM
3
+ *.o
4
+ *.bundle
5
+ *.so
6
+ *.a
7
+ *.rbc
8
+ mkmf.log
9
+ pkg/
10
+ tmp
11
+ vendor
12
+ lib/tiny_tds/tiny_tds.rb
13
+ .rvmrc
14
+ .rbenv-version
15
+ Gemfile.lock
16
+ misc
17
+ *.gem
18
+ /exe/*
19
+ /ports/*
20
+ !/ports/patches/
21
+ test/reports
22
+ .ports_versions
data/.rubocop.yml ADDED
@@ -0,0 +1,31 @@
1
+
2
+ AllCops:
3
+ Include:
4
+ - '**/Rakefile'
5
+ Exclude:
6
+ - 'ext/**/*'
7
+ - 'ports/**/*'
8
+ - 'test/**/*'
9
+ - 'tmp/**/*'
10
+
11
+ # Redefined
12
+
13
+ Metrics/LineLength:
14
+ Max: 120
15
+
16
+ Metrics/ClassLength:
17
+ Max: 200
18
+
19
+ # Disabled
20
+
21
+ Style/Documentation:
22
+ Enabled: false
23
+
24
+ Style/EmptyLinesAroundClassBody:
25
+ Enabled: false
26
+
27
+ Style/EmptyLinesAroundModuleBody:
28
+ Enabled: false
29
+
30
+ Style/EmptyLinesAroundBlockBody:
31
+ Enabled: false