Skip to content

Commit 01c5963

Browse files
committed
Debug
1 parent 1188b80 commit 01c5963

File tree

4 files changed

+11
-36
lines changed

4 files changed

+11
-36
lines changed

‎appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test_script:
3232
# - timeout /t 4 /nobreak > NUL
3333
# - bundle exec rake test ACTIVERECORD_UNITTEST_AZURE=1 ACTIVERECORD_UNITTEST_HOST=%CI_AZURE_HOST% ACTIVERECORD_UNITTEST_PASS=%CI_AZURE_PASS% ACTIVERECORD_UNITTEST_TDSVERSION="7.3"
3434
- bundle exec ruby %APPVEYOR_BUILD_FOLDER%\test\debug.rb
35-
- bundle exec rake --trace test ACTIVERECORD_UNITTEST_HOST=%CI_AZURE_HOST% ACTIVERECORD_UNITTEST_PASS=%CI_AZURE_PASS% ACTIVERECORD_UNITTEST_AZURE=1 ONLY_SQLSERVER=1 TDSVER=7.3
35+
# - bundle exec rake --trace test ACTIVERECORD_UNITTEST_HOST=%CI_AZURE_HOST% ACTIVERECORD_UNITTEST_PASS=%CI_AZURE_PASS% ACTIVERECORD_UNITTEST_AZURE=1 ONLY_SQLSERVER=1 TDSVER=7.3
3636
environment:
3737
CI_AZURE_HOST:
3838
secure: VChrioaIWkf9iuuaSs4cryiA4honrADgZqNC0++begg=

‎lib/active_record/connection_adapters/sqlserver_adapter.rb

+9-21
Original file line numberDiff line numberDiff line change
@@ -308,32 +308,20 @@ def connect
308308
end
309309

310310
def dblib_connect(config)
311-
options = {
312-
# dataserver: config[:dataserver],
311+
TinyTds::Client.new(
312+
dataserver: config[:dataserver],
313313
host: config[:host],
314-
# port: config[:port],
314+
port: config[:port],
315315
username: config[:username],
316316
password: config[:password],
317317
database: config[:database],
318-
# tds_version: config[:tds_version],
319-
# appname: config_appname(config),
320-
# login_timeout: config_login_timeout(config),
321-
# timeout: config_timeout(config),
322-
# encoding: config_encoding(config),
318+
tds_version: config[:tds_version],
319+
appname: config_appname(config),
320+
login_timeout: config_login_timeout(config),
321+
timeout: config_timeout(config),
322+
encoding: config_encoding(config),
323323
azure: config[:azure]
324-
}
325-
puts "\n\n\ndblib_connect:"
326-
puts options.except(:password).inspect
327-
c = ::TinyTds::Client.new(
328-
host: ENV['CI_AZURE_HOST'],
329-
username: 'rails',
330-
password: ENV['CI_AZURE_PASS'],
331-
database: 'activerecord_unittest',
332-
azure: true
333-
)
334-
puts c.execute("SELECT 1 AS [one]").each
335-
c.close
336-
TinyTds::Client.new(options).tap do |client|
324+
).tap do |client|
337325
if config[:azure]
338326
client.execute('SET ANSI_NULLS ON').do
339327
client.execute('SET CURSOR_CLOSE_ON_COMMIT OFF').do

‎test/cases/helper_sqlserver.rb

-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
require 'bundler' ; Bundler.require :default, :development, :test
2-
3-
puts "\n\n\nBOOT:"
4-
require 'tiny_tds'
5-
c = ::TinyTds::Client.new(
6-
host: ENV['CI_AZURE_HOST'],
7-
username: 'rails',
8-
password: ENV['CI_AZURE_PASS'],
9-
database: 'activerecord_unittest',
10-
azure: true
11-
)
12-
puts c.execute("SELECT 1 AS [one]").each
13-
c.close
14-
152
require 'support/paths_sqlserver'
163
require 'support/minitest_sqlserver'
174
require 'cases/helper'

‎test/debug.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'bundler' ; Bundler.require :default, :development, :test
1+
# require 'bundler' ; Bundler.require :default, :development, :test
22
require 'tiny_tds'
33

44
c = TinyTds::Client.new(

0 commit comments

Comments
 (0)