Skip to content

Commit 7f61bb5

Browse files
committed
starting on ruby 3.1 support
clearly, something changes in ruby 3.1 and tls. free tds receives an error "Adaptive Server connection failed", which turns out to be ssl related. updating dependencies version did fix issue. but further research found it is a known issue with other projects that depend on the freetds library. i tried updating openssl to the latest version, that didn't work. the only thing that has given progress so far is setting freetds tio build with gnutls instead of openssl, which seem to be solution accepted by most people. as a result, it may be needed to switch tinytds to gnutls
1 parent b7da4af commit 7f61bb5

File tree

6 files changed

+26
-27
lines changed

6 files changed

+26
-27
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.5
1+
2.2.0

ext/tiny_tds/extconsts.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15"
33
ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
44

5-
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1d'
5+
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1s'
66
OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
77

8-
FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.1.24"
8+
FREETDS_VERSION = ENV['TINYTDS_FREETDS_VERSION'] || "1.3.16"
99
FREETDS_VERSION_INFO = Hash.new { |h,k|
1010
h[k] = {files: "http://www.freetds.org/files/stable/freetds-#{k}.tar.bz2"}
1111
}

start_dev.sh

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
#!/usr/bin/env bash
22
# will spin up a local dockerized development environment
33

4-
set -x
4+
set +x
55
set -e
66

77
if [ -z "$ruby_version" ]
88
then
99
echo "set a value for environment variable ruby_version"
10-
exit 1
1110
else
1211
echo "ruby_version is $ruby_version"
13-
fi
1412

15-
# set volume read/write permissions to work both outside and inside container
16-
sudo -E ./test/bin/setup_volume_permissions.sh
13+
# set volume read/write permissions to work both outside and inside container
14+
sudo -E ./test/bin/setup_volume_permissions.sh
1715

18-
docker compose up -d
19-
echo "Waiting for containers to start..."
20-
sleep 10
16+
docker compose up -d
17+
echo "Waiting for containers to start..."
18+
sleep 10
2119

22-
# setup circleci ruby container for development
23-
docker exec cimg_ruby bash -c './setup_cimgruby_dev.sh'
20+
# setup circleci ruby container for development
21+
docker exec cimg_ruby bash -c './setup_cimgruby_dev.sh'
2422

25-
# enter container
26-
set +x
27-
echo "cimg/ruby container is ready for tiny_tds development.........."
28-
echo "To enter container run: docker exec -it cimg_ruby /bin/bash"
29-
echo "To build solution run: docker exec cimg_ruby bash -c 'bundle exec rake build'"
30-
echo "To test solution run: docker exec cimg_ruby bash -c 'bundle exec rake test'"
23+
# enter container
24+
set +x
25+
echo "cimg/ruby container is ready for tiny_tds development.........."
26+
echo "To enter container run: docker exec -it cimg_ruby /bin/bash"
27+
echo "To build solution run: docker exec cimg_ruby bash -c 'bundle exec rake build'"
28+
echo "To test solution run: docker exec cimg_ruby bash -c 'bundle exec rake test'"
29+
fi

tasks/ports/freetds.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def configure_defaults
1919
if version =~ /0\.91/
2020
opts << '--with-tdsver=7.1'
2121
else
22-
opts << '--with-tdsver=7.3'
22+
opts << '--with-tdsver=7.4'
2323
end
2424

2525
if windows?

test/bin/install-freetds.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ wget http://www.freetds.org/files/stable/freetds-$FREETDS_VERSION.tar.gz
1111
tar -xzf freetds-$FREETDS_VERSION.tar.gz
1212
cd freetds-$FREETDS_VERSION
1313
./configure --prefix=/opt/local \
14-
--with-openssl=/opt/local \
15-
--with-tdsver=7.3
14+
--with-gnutls \
15+
--with-tdsver=7.4
1616
make
1717
make install
1818
cd ..

tiny_tds.gemspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ Gem::Specification.new do |s|
1818
s.rdoc_options = ['--charset=UTF-8']
1919
s.extensions = ['ext/tiny_tds/extconf.rb']
2020
s.license = 'MIT'
21-
s.required_ruby_version = '>= 2.0.0'
21+
s.required_ruby_version = '>= 3.1.0'
2222
s.metadata['msys2_mingw_dependencies'] = 'freetds'
23-
s.add_development_dependency 'mini_portile2', '~> 2.5.0'
23+
s.add_development_dependency 'mini_portile2', '~> 2.8.1'
2424
s.add_development_dependency 'rake', '~> 13.0.0'
2525
s.add_development_dependency 'rake-compiler', '~> 1.1.0'
2626
s.add_development_dependency 'rake-compiler-dock', '~> 1.1.0'
27-
s.add_development_dependency 'minitest', '~> 5.14.0'
28-
s.add_development_dependency 'connection_pool', '~> 2.2.0'
29-
s.add_development_dependency 'toxiproxy', '~> 2.0.0'
27+
s.add_development_dependency 'minitest', '~> 5.17.0'
28+
s.add_development_dependency 'connection_pool', '~> 2.3.0'
29+
s.add_development_dependency 'toxiproxy', '~> 2.0.2'
3030
end

0 commit comments

Comments
 (0)