Skip to content

Commit ab25833

Browse files
committed
Add ruby-2.7 to cross build and tests, Update freetds and OpenSSL
1 parent e75a379 commit ab25833

File tree

8 files changed

+12
-29
lines changed

8 files changed

+12
-29
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rvm:
1111
- 2.4.5
1212
- 2.5.3
1313
- 2.6.1
14+
- 2.7.0
1415
before_install:
1516
- docker info
1617
- sudo ./test/bin/install-openssl.sh

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
* Removed old/unused appveyor config
44
* Remove old Rubies from CI & cross compile list
5-
* Add Ruby 2.6 to the cross compile list
5+
* Add Ruby 2.6 and 2.7 to the cross compile list
66

77
## 2.1.2
88

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ $ apt-get install wget
3838
$ apt-get install build-essential
3939
$ apt-get install libc6-dev
4040

41-
$ wget http://www.freetds.org/files/stable/freetds-1.1.6.tar.gz
42-
$ tar -xzf freetds-1.1.6.tar.gz
43-
$ cd freetds-1.1.6
41+
$ wget http://www.freetds.org/files/stable/freetds-1.1.24.tar.gz
42+
$ tar -xzf freetds-1.1.24.tar.gz
43+
$ cd freetds-1.1.24
4444
$ ./configure --prefix=/usr/local --with-tdsver=7.3
4545
$ make
4646
$ make install
@@ -401,7 +401,7 @@ The default is true and since FreeTDS v1.0 would do this as well.
401401

402402
## Compiling Gems for Windows
403403

404-
For the convenience of Windows users, TinyTDS ships pre-compiled gems for supported versions of Ruby on Windows. In order to generate these gems, [rake-compiler-dock](https://github.com/rake-compiler/rake-compiler-dock) is used. This project provides a [Docker image](https://registry.hub.docker.com/u/larskanis/rake-compiler-dock/) with rvm, cross-compilers and a number of different target versions of Ruby.
404+
For the convenience of Windows users, TinyTDS ships pre-compiled gems for supported versions of Ruby on Windows. In order to generate these gems, [rake-compiler-dock](https://github.com/rake-compiler/rake-compiler-dock) is used. This project provides several [Docker images](https://registry.hub.docker.com/u/larskanis/) with rvm, cross-compilers and a number of different target versions of Ruby.
405405

406406
Run the following rake task to compile the gems for Windows. This will check the availability of [Docker](https://www.docker.com/) (and boot2docker on Windows or OS-X) and will give some advice for download and installation. When docker is running, it will download the docker image (once-only) and start the build:
407407

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.0j'
5+
OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.1d'
66
OPENSSL_SOURCE_URI = "https://www.openssl.org/source/openssl-#{OPENSSL_VERSION}.tar.gz"
77

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

tasks/native_gem.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ task 'gem:windows' => ['ports:cross'] do
88
build = ['bundle']
99

1010
# and finally build the native gem
11-
build << 'rake cross native gem RUBY_CC_VERSION=2.6.0:2.5.0:2.4.0 CFLAGS="-Wall" MAKE="make -j`nproc`"'
11+
build << 'rake cross native gem RUBY_CC_VERSION=2.7.0:2.6.0:2.5.0:2.4.0 CFLAGS="-Wall" MAKE="make -j`nproc`"'
1212

1313
RakeCompilerDock.sh build.join(' && ')
1414
end

tasks/ports.rake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ require_relative 'ports/openssl'
66
require_relative 'ports/freetds'
77
require_relative '../ext/tiny_tds/extconsts'
88

9-
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if defined? OpenSSL
10-
119
namespace :ports do
1210
openssl = Ports::Openssl.new(OPENSSL_VERSION)
1311
libiconv = Ports::Libiconv.new(ICONV_VERSION)

tasks/ports/openssl.rb

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,11 @@ def install
2727

2828
private
2929

30-
def execute(action, command, options={})
31-
# OpenSSL Requires Perl >= 5.10, while the Ruby devkit uses MSYS1 with Perl 5.8.8.
32-
# To overcome this, prepend Git's usr/bin to the PATH.
33-
# It has MSYS2 with a recent version of perl.
34-
prev_path = ENV['PATH']
35-
if host =~ /mingw/ && IO.popen(["perl", "-e", "print($])"], &:read).to_f < 5.010
36-
git_perl = 'C:/Program Files/Git/usr/bin'
37-
if File.directory?(git_perl)
38-
ENV['PATH'] = "#{git_perl}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
39-
ENV['PERL'] = 'perl'
40-
end
41-
end
42-
43-
super
44-
ENV['PATH'] = prev_path
45-
end
46-
4730
def configure_defaults
4831
opts = [
4932
'shared',
50-
target_arch
33+
target_arch,
34+
"--openssldir=#{path}",
5135
]
5236

5337
if cross_build?

tiny_tds.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
2323
s.add_development_dependency 'mini_portile2', '~> 2.0'
2424
s.add_development_dependency 'rake', '~> 10.4'
2525
s.add_development_dependency 'rake-compiler', '~> 1.0'
26-
s.add_development_dependency 'rake-compiler-dock', '~> 0.6.3'
26+
s.add_development_dependency 'rake-compiler-dock', '~> 1.0'
2727
s.add_development_dependency 'minitest', '~> 5.6'
2828
s.add_development_dependency 'connection_pool', '~> 2.2'
2929
end

0 commit comments

Comments
 (0)