tiny_tds 2.0.0 → 2.1.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7084d049851fdd79e13ea2374f02e7db213dcd1
4
- data.tar.gz: 55dc1f52301013838e64d27cd6c1f06fd72d5982
3
+ metadata.gz: 674f3bf12c13153acee5eefef544142949aff87c
4
+ data.tar.gz: 057a6b081fdb91f6f936b38b8415638956e15968
5
5
  SHA512:
6
- metadata.gz: ebede915a805cd34d6e372a0eb7dacaf8b773dbb5a9823d36df26b0bd21cfa268cb9c041e6e8169f578257c01e0858011fc6f48ae521814bcce7867b650fbc8f
7
- data.tar.gz: 5b1f60df1eb039c09d504033b4985c62ac914677470700717507024a860ce062425dcf69fb1fc4844dfc2d9872869dc79caddb1404ff57be36e350f0f412cf88
6
+ metadata.gz: d54ee93e3d6930738113d13e1c16ea2007da098418b9e859d80742f8389fe7fd41801f53748a641c331d2399ec79a21bad87c372e1a6c4a3b38eca05c1dc10f1
7
+ data.tar.gz: 46605e6eea9b24e70ffe6f6abebcdb257f38dcc1a675b153c93abd563267a753458c307b15f0b495533a09fe92fb92023251f71920fc17a75e4d9165a46fbfc6
data/CHANGELOG CHANGED
@@ -1,9 +1,20 @@
1
- * 1.3.0
1
+ * 2.1.0 *
2
+
3
+ * Support RubyInstaller2 for Windows. Fixes #365.
4
+ * Support the FREETDS_DIR environment variable. Fixes #371.
5
+
6
+
7
+ * 2.0.0 *
8
+
9
+ * Stop building FreeTDS as a part of the extension build.
10
+
11
+
12
+ * 1.3.0 *
2
13
 
3
14
  * FreeTDS: Link libgcc statically for Windows. (#351) Fixes #349.
4
15
 
5
16
 
6
- * 1.2.0
17
+ * 1.2.0 *
7
18
 
8
19
  * Use OpenSSL v1.1.0e & FreeTDS v1.00.27 for Windows builds.
9
20
 
data/Gemfile CHANGED
@@ -2,7 +2,6 @@ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  group :development do
5
- gem 'rake-compiler-dock', github: 'rake-compiler/rake-compiler-dock'
6
5
  end
7
6
 
8
7
  group :test do
data/Rakefile CHANGED
@@ -29,6 +29,9 @@ Rake::ExtensionTask.new('tiny_tds', SPEC) do |ext|
29
29
 
30
30
  # Add dependent DLLs to the cross gems
31
31
  ext.cross_compiling do |spec|
32
+ # The fat binary gem doesn't depend on the freetds package, since it bundles the library.
33
+ spec.metadata.delete('msys2_mingw_dependencies')
34
+
32
35
  platform_host_map = GEM_PLATFORM_HOSTS
33
36
  gemplat = spec.platform.to_s
34
37
  host = platform_host_map[gemplat]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0.pre1
@@ -3,6 +3,7 @@ init:
3
3
  - SET PATH=C:\MinGW\msys\1.0\bin;%PATH%
4
4
  - SET RAKEOPT=-rdevkit
5
5
  - SET TESTOPTS='-v'
6
+ - SET MAKE=make V=1
6
7
  clone_depth: 5
7
8
  skip_tags: true
8
9
  skip_branch_with_pr: true
@@ -42,8 +43,8 @@ environment:
42
43
  TINYTDS_UNIT_AZURE_PASS:
43
44
  secure: fYKSKV4v+36OFQp2nZdX4DfUpgmy5cm0wuR73cgdmEk=
44
45
  matrix:
45
- - ruby_version: "23-x64"
46
- - ruby_version: "23"
46
+ - ruby_version: "24-x64"
47
+ - ruby_version: "24"
47
48
  - ruby_version: "22-x64"
48
49
  - ruby_version: "22"
49
50
  on_failure:
@@ -23,15 +23,25 @@ do_help if arg_config('--help')
23
23
  # Make sure to check the ports path for the configured host
24
24
  host = RbConfig::CONFIG['host']
25
25
  project_dir = File.join(['..']*4)
26
- freetds_dir = File.join(project_dir, 'ports', host, 'freetds', FREETDS_VERSION)
27
- freetds_dir = File.expand_path(freetds_dir)
26
+ freetds_ports_dir = File.join(project_dir, 'ports', host, 'freetds', FREETDS_VERSION)
27
+ freetds_ports_dir = File.expand_path(freetds_ports_dir)
28
28
 
29
29
  # Add all the special path searching from the original tiny_tds build
30
30
  # order is important here! First in, last searched.
31
- %w(
31
+ DIRS = %w(
32
32
  /usr/local
33
33
  /opt/local
34
- ).each do |path|
34
+ )
35
+
36
+ # Grab freetds environment variable for use by people on services like
37
+ # Heroku who they can't easily use bundler config to set directories
38
+ DIRS.push(ENV['FREETDS_DIR']) if ENV.has_key?('FREETDS_DIR')
39
+
40
+ # Add the ports directory if it exists for local developer builds
41
+ DIRS.push(freetds_ports_dir) if File.directory?(freetds_ports_dir)
42
+
43
+ # Add the search paths for freetds configured above
44
+ DIRS.each do |path|
35
45
  idir = "#{path}/include"
36
46
  ldir = "#{path}/lib"
37
47
 
@@ -41,12 +51,6 @@ freetds_dir = File.expand_path(freetds_dir)
41
51
  )
42
52
  end
43
53
 
44
- # Add the ports directory if it exists for local developer builds
45
- if File.directory?(freetds_dir)
46
- puts "Using freetds port path #{freetds_dir}"
47
- dir_config('freetds', "#{freetds_dir}/include", "#{freetds_dir}/lib")
48
- end
49
-
50
54
  have_dependencies = [
51
55
  find_header('sybfront.h'),
52
56
  find_header('sybdb.h'),
@@ -1,5 +1,5 @@
1
1
 
2
- ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.14"
2
+ ICONV_VERSION = ENV['TINYTDS_ICONV_VERSION'] || "1.15"
3
3
  ICONV_SOURCE_URI = "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-#{ICONV_VERSION}.tar.gz"
4
4
 
5
5
  OPENSSL_VERSION = ENV['TINYTDS_OPENSSL_VERSION'] || '1.1.0e'
@@ -12,20 +12,39 @@ require 'tiny_tds/gem'
12
12
  # Support multiple ruby versions, fat binaries under Windows.
13
13
  if RUBY_PLATFORM =~ /mingw|mswin/ && RUBY_VERSION =~ /(\d+.\d+)/
14
14
  ver = Regexp.last_match(1)
15
- # Set the PATH environment variable, so that the DLLs can be found.
16
- old_path = ENV['PATH']
17
- begin
18
- ENV['PATH'] = [
19
- TinyTds::Gem.ports_bin_paths,
20
- TinyTds::Gem.ports_lib_paths,
21
- old_path
22
- ].flatten.join File::PATH_SEPARATOR
23
15
 
24
- require "tiny_tds/#{ver}/tiny_tds"
25
- rescue LoadError
26
- require 'tiny_tds/tiny_tds'
27
- ensure
28
- ENV['PATH'] = old_path
16
+ add_dll_path = proc do |path, &block|
17
+ begin
18
+ require 'ruby_installer/runtime'
19
+ RubyInstaller::Runtime.add_dll_directory(path, &block)
20
+ rescue LoadError
21
+ old_path = ENV['PATH']
22
+ ENV['PATH'] = "#{path};#{old_path}"
23
+ begin
24
+ block.call
25
+ ensure
26
+ ENV['PATH'] = old_path
27
+ end
28
+ end
29
+ end
30
+
31
+ add_dll_paths = proc do |paths, &block|
32
+ if path=paths.shift
33
+ add_dll_path.call(path) do
34
+ add_dll_paths.call(paths, &block)
35
+ end
36
+ else
37
+ block.call
38
+ end
39
+ end
40
+
41
+ # Temporary add bin directories for DLL search, so that freetds DLLs can be found.
42
+ add_dll_paths.call( TinyTds::Gem.ports_bin_paths ) do
43
+ begin
44
+ require "tiny_tds/#{ver}/tiny_tds"
45
+ rescue LoadError
46
+ require 'tiny_tds/tiny_tds'
47
+ end
29
48
  end
30
49
  else
31
50
  # Load dependent shared libraries into the process, so that they are already present,
@@ -0,0 +1,28 @@
1
+ From 56e8972f66c3e948e2ad6885595c58fd23dcdb37 Mon Sep 17 00:00:00 2001
2
+ From: Lars Kanis <kanis@comcard.de>
3
+ Date: Thu, 6 Jul 2017 17:09:40 +0200
4
+ Subject: [PATCH] Don't use MSYS2 file libws2_32.a for MINGW build
5
+
6
+ This file is intended for MSYS2/cygwin builds and blocks OpenSSL
7
+ detection of freetds on i686.
8
+ ---
9
+ configure | 2 --
10
+ configure.ac | 2 --
11
+ 2 files changed, 4 deletions(-)
12
+
13
+ diff --git a/configure b/configure
14
+ index 9495a49..31eb01d 100644
15
+ --- a/configure
16
+ +++ b/configure
17
+ @@ -15915,8 +15915,6 @@ case $host in
18
+ tds_mingw=yes
19
+ if test "$host_cpu" = "x86_64"; then
20
+ LIBS="-lws2_32"
21
+ - elif test -r /usr/lib/w32api/libws2_32.a; then
22
+ - LIBS="-L/usr/lib/w32api -lws2_32"
23
+ else
24
+ LIBS="-lws2_32"
25
+ fi
26
+ --
27
+ 2.6.2.windows.1
28
+
@@ -43,6 +43,9 @@ namespace :ports do
43
43
  # freetds doesn't have an option that will provide an rpath
44
44
  # so we do it manually
45
45
  ENV['OPENSSL_CFLAGS'] = "-Wl,-rpath -Wl,#{openssl.path}/lib"
46
+ # Add the pkgconfig file with MSYS2'ish path, to prefer our ports build
47
+ # over MSYS2 system OpenSSL.
48
+ ENV['PKG_CONFIG_PATH'] = "#{openssl.path.gsub(/^(\w):/i){"/"+$1.downcase}}/lib/pkgconfig:#{ENV['PKG_CONFIG_PATH']}"
46
49
  freetds.configure_options << "--with-openssl=#{openssl.path}"
47
50
  end
48
51
 
@@ -23,7 +23,7 @@ module Ports
23
23
  end
24
24
 
25
25
  if windows?
26
- opts << '--sysconfdir=C:\Sites'
26
+ opts << '--sysconfdir=C:/Sites'
27
27
  opts << '--enable-sspi'
28
28
  end
29
29
 
@@ -28,8 +28,11 @@ module Ports
28
28
  private
29
29
 
30
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.
31
34
  prev_path = ENV['PATH']
32
- if host =~ /mingw/
35
+ if host =~ /mingw/ && IO.popen(["perl", "-e", "print($])"], &:read).to_f < 5.010
33
36
  git_perl = 'C:/Program Files/Git/usr/bin'
34
37
  if File.directory?(git_perl)
35
38
  ENV['PATH'] = "#{git_perl}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
@@ -19,9 +19,10 @@ Gem::Specification.new do |s|
19
19
  s.extensions = ['ext/tiny_tds/extconf.rb']
20
20
  s.license = 'MIT'
21
21
  s.required_ruby_version = '>= 2.0.0'
22
- s.add_runtime_dependency 'mini_portile2', '~> 2.0'
22
+ s.metadata['msys2_mingw_dependencies'] = 'freetds'
23
+ s.add_development_dependency 'mini_portile2', '~> 2.0'
23
24
  s.add_development_dependency 'rake', '~> 10.4'
24
- s.add_development_dependency 'rake-compiler', '0.9.5'
25
+ s.add_development_dependency 'rake-compiler', '~> 1.0'
25
26
  s.add_development_dependency 'rake-compiler-dock', '~> 0.6.0'
26
27
  s.add_development_dependency 'minitest', '~> 5.6'
27
28
  s.add_development_dependency 'connection_pool', '~> 2.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-08 00:00:00.000000000 Z
13
+ date: 2017-07-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2
@@ -19,7 +19,7 @@ dependencies:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.0'
22
- type: :runtime
22
+ type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
@@ -44,16 +44,16 @@ dependencies:
44
44
  name: rake-compiler
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '='
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: 0.9.5
49
+ version: '1.0'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '='
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: 0.9.5
56
+ version: '1.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rake-compiler-dock
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -143,6 +143,7 @@ files:
143
143
  - lib/tiny_tds/result.rb
144
144
  - lib/tiny_tds/version.rb
145
145
  - patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff
146
+ - patches/freetds/1.00.27/0002-Don-t-use-MSYS2-file-libws2_32.diff
146
147
  - patches/libiconv/1.14/1-avoid-gets-error.patch
147
148
  - tasks/native_gem.rake
148
149
  - tasks/package.rake
@@ -178,7 +179,8 @@ files:
178
179
  homepage: http://github.com/rails-sqlserver/tiny_tds
179
180
  licenses:
180
181
  - MIT
181
- metadata: {}
182
+ metadata:
183
+ msys2_mingw_dependencies: freetds
182
184
  post_install_message:
183
185
  rdoc_options:
184
186
  - "--charset=UTF-8"
@@ -191,9 +193,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
193
  version: 2.0.0
192
194
  required_rubygems_version: !ruby/object:Gem::Requirement
193
195
  requirements:
194
- - - ">="
196
+ - - ">"
195
197
  - !ruby/object:Gem::Version
196
- version: '0'
198
+ version: 1.3.1
197
199
  requirements: []
198
200
  rubyforge_project:
199
201
  rubygems_version: 2.6.8
@@ -223,4 +225,3 @@ test_files:
223
225
  - test/schema_test.rb
224
226
  - test/test_helper.rb
225
227
  - test/thread_test.rb
226
- has_rdoc: