do_mysql 0.10.0-x86-mingw32 → 0.10.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/ChangeLog.markdown +27 -0
  2. data/LICENSE +1 -1
  3. data/README.markdown +104 -3
  4. data/Rakefile +56 -9
  5. data/ext/do_mysql/compat.h +55 -0
  6. data/ext/{do_mysql_ext/do_mysql_ext.c → do_mysql/do_mysql.c} +34 -57
  7. data/ext/{do_mysql_ext → do_mysql}/error.h +0 -0
  8. data/ext/{do_mysql_ext → do_mysql}/extconf.rb +15 -8
  9. data/lib/do_mysql.rb +27 -11
  10. data/lib/do_mysql/1.8/do_mysql.so +0 -0
  11. data/lib/do_mysql/1.9/do_mysql.so +0 -0
  12. data/lib/do_mysql/version.rb +1 -1
  13. data/spec/command_spec.rb +2 -2
  14. data/spec/connection_spec.rb +16 -14
  15. data/spec/encoding_spec.rb +2 -1
  16. data/spec/reader_spec.rb +1 -1
  17. data/spec/result_spec.rb +3 -3
  18. data/spec/spec_helper.rb +21 -31
  19. data/spec/typecast/array_spec.rb +1 -1
  20. data/spec/typecast/bigdecimal_spec.rb +2 -2
  21. data/spec/typecast/boolean_spec.rb +2 -2
  22. data/spec/typecast/byte_array_spec.rb +1 -1
  23. data/spec/typecast/class_spec.rb +1 -1
  24. data/spec/typecast/date_spec.rb +2 -2
  25. data/spec/typecast/datetime_spec.rb +2 -2
  26. data/spec/typecast/float_spec.rb +2 -2
  27. data/spec/typecast/integer_spec.rb +1 -1
  28. data/spec/typecast/nil_spec.rb +3 -3
  29. data/spec/typecast/other_spec.rb +8 -0
  30. data/spec/typecast/range_spec.rb +1 -1
  31. data/spec/typecast/string_spec.rb +1 -1
  32. data/spec/typecast/time_spec.rb +1 -1
  33. data/tasks/compile.rake +65 -0
  34. data/tasks/release.rake +12 -71
  35. data/tasks/retrieve.rake +1 -1
  36. data/tasks/spec.rake +19 -15
  37. metadata +65 -38
  38. data/HISTORY.markdown +0 -17
  39. data/Manifest.txt +0 -32
  40. data/lib/do_mysql_ext.so +0 -0
  41. data/spec/lib/rspec_immediate_feedback_formatter.rb +0 -3
  42. data/tasks/gem.rake +0 -8
  43. data/tasks/install.rake +0 -15
  44. data/tasks/native.rake +0 -31
File without changes
@@ -2,6 +2,9 @@ ENV["RC_ARCHS"] = "" if RUBY_PLATFORM =~ /darwin/
2
2
 
3
3
  require 'mkmf'
4
4
 
5
+ # Allow for custom compiler to be specified.
6
+ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
7
+
5
8
  # All instances of mysql_config on PATH ...
6
9
  def mysql_config_paths
7
10
  ENV['PATH'].split(File::PATH_SEPARATOR).collect do |path|
@@ -15,6 +18,10 @@ def default_mysql_config_path
15
18
  mysql_config_paths.compact.first
16
19
  end
17
20
 
21
+ def mysql_config(type)
22
+ IO.popen("#{default_mysql_config_path} --#{type}").readline.chomp rescue nil
23
+ end
24
+
18
25
  def default_prefix
19
26
  if mc = default_mysql_config_path
20
27
  File.dirname(File.dirname(mc))
@@ -33,13 +40,13 @@ if RUBY_PLATFORM =~ /mswin|mingw/
33
40
  have_func('mysql_query', 'mysql.h') || exit(1)
34
41
  have_func('mysql_ssl_set', 'mysql.h')
35
42
  elsif mc = with_config('mysql-config', default_mysql_config_path)
36
- mc = default_mysql_config_path if mc == true
37
- cflags = `#{mc} --cflags`.chomp
38
- exit 1 if $? != 0
39
- libs = `#{mc} --libs`.chomp
40
- exit 1 if $? != 0
41
- $CPPFLAGS += ' ' + cflags
42
- $libs = libs + " " + $libs
43
+ includes = mysql_config('include').split(/\s+/).map do |dir|
44
+ dir.gsub(/^-I/, "")
45
+ end.uniq
46
+ libs = mysql_config('libs').split(/\s+/).select {|lib| lib =~ /^-L/}.map do |dir|
47
+ dir.gsub(/^-L/, "")
48
+ end.uniq
49
+ dir_config('mysql', includes, libs)
43
50
  else
44
51
  inc, lib = dir_config('mysql', default_prefix)
45
52
  libs = ['m', 'z', 'socket', 'nsl']
@@ -64,4 +71,4 @@ if RUBY_VERSION < '1.8.6'
64
71
  $CFLAGS << ' -DRUBY_LESS_THAN_186'
65
72
  end
66
73
 
67
- create_makefile('do_mysql_ext')
74
+ create_makefile('do_mysql/do_mysql')
@@ -19,26 +19,42 @@ if RUBY_PLATFORM =~ /java/
19
19
 
20
20
  end
21
21
 
22
- require 'do_mysql_ext'
22
+ begin
23
+ require 'do_mysql/do_mysql'
24
+ rescue LoadError
25
+ if RUBY_PLATFORM =~ /mingw|mswin/
26
+ RUBY_VERSION =~ /(\d+.\d+)/
27
+ require "do_mysql/#{$1}/do_mysql"
28
+ else
29
+ raise
30
+ end
31
+ end
32
+
23
33
  require 'do_mysql/version'
24
- require 'do_mysql/transaction'
34
+ require 'do_mysql/transaction' if RUBY_PLATFORM !~ /java/
25
35
  require 'do_mysql/encoding'
26
36
 
27
37
  if RUBY_PLATFORM =~ /java/
28
38
 
39
+ DataObjects::Mysql::Connection.class_eval do
40
+
41
+ def using_socket?
42
+ @using_socket
43
+ end
44
+
45
+ def secure?
46
+ false
47
+ end
48
+
49
+ end
50
+
51
+ else
52
+
29
53
  module DataObjects
30
54
  module Mysql
31
55
  class Connection
32
- def self.pool_size
33
- 20
34
- end
35
-
36
- def using_socket?
37
- @using_socket
38
- end
39
-
40
56
  def secure?
41
- false
57
+ !(@ssl_cipher.nil? || @ssl_cipher.empty?)
42
58
  end
43
59
  end
44
60
  end
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Mysql
3
- VERSION = "0.10.0"
3
+ VERSION = '0.10.1'.freeze
4
4
  end
5
5
  end
@@ -4,6 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
4
4
  require 'data_objects/spec/command_spec'
5
5
 
6
6
  describe DataObjects::Mysql::Command do
7
- it_should_behave_like 'a Command'
8
- it_should_behave_like 'a Command with async'
7
+ behaves_like 'a Command'
8
+ behaves_like 'a Command with async'
9
9
  end
@@ -6,19 +6,21 @@ require 'cgi'
6
6
 
7
7
  describe DataObjects::Mysql::Connection do
8
8
 
9
- before :all do
10
- @driver = CONFIG.scheme
11
- @user = CONFIG.user
9
+ before do
10
+ @driver = CONFIG.scheme
11
+ @user = CONFIG.user
12
12
  @password = CONFIG.pass
13
- @host = CONFIG.host
14
- @port = CONFIG.port
13
+ @host = CONFIG.host
14
+ @port = CONFIG.port
15
15
  @database = CONFIG.database
16
- @ssl = CONFIG.ssl
16
+ @ssl = CONFIG.ssl
17
17
  end
18
18
 
19
- it_should_behave_like 'a Connection'
20
- it_should_behave_like 'a Connection with authentication support'
21
- it_should_behave_like 'a Connection with SSL support' unless JRUBY
19
+ behaves_like 'a Connection'
20
+ behaves_like 'a Connection with authentication support'
21
+ # FIXME: behaves_like 'a Connection with JDBC URL support' if JRUBY
22
+ behaves_like 'a Connection with SSL support' unless JRUBY
23
+ behaves_like 'a Connection via JDNI' if JRUBY
22
24
 
23
25
  if DataObjectsSpecHelpers.test_environment_supports_ssl?
24
26
 
@@ -26,22 +28,22 @@ describe DataObjects::Mysql::Connection do
26
28
 
27
29
  it 'should raise an error when passed ssl=true' do
28
30
  lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl=true") }.
29
- should raise_error(ArgumentError)
31
+ should.raise(ArgumentError)
30
32
  end
31
33
 
32
34
  it 'should raise an error when passed a nonexistent client certificate' do
33
35
  lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl[client_cert]=nonexistent") }.
34
- should raise_error(ArgumentError)
36
+ should.raise(ArgumentError)
35
37
  end
36
38
 
37
39
  it 'should raise an error when passed a nonexistent client key' do
38
40
  lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl[client_key]=nonexistent") }.
39
- should raise_error(ArgumentError)
41
+ should.raise(ArgumentError)
40
42
  end
41
43
 
42
44
  it 'should raise an error when passed a nonexistent ca certificate' do
43
45
  lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl[ca_cert]=nonexistent") }.
44
- should raise_error(ArgumentError)
46
+ should.raise(ArgumentError)
45
47
  end
46
48
 
47
49
  it 'should connect with a specified SSL cipher' do
@@ -51,7 +53,7 @@ describe DataObjects::Mysql::Connection do
51
53
 
52
54
  it 'should raise an error with an invalid SSL cipher' do
53
55
  lambda { DataObjects::Connection.new("#{CONFIG.uri}?#{CONFIG.ssl}&ssl[cipher]=invalid") }.
54
- should raise_error
56
+ should.raise
55
57
  end
56
58
 
57
59
  end
@@ -4,5 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
4
4
  require 'data_objects/spec/encoding_spec'
5
5
 
6
6
  describe DataObjects::Mysql::Connection do
7
- it_should_behave_like 'a driver supporting encodings'
7
+ behaves_like 'a driver supporting different encodings'
8
+ behaves_like 'returning correctly encoded strings for the default encoding'
8
9
  end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
4
4
  require 'data_objects/spec/reader_spec'
5
5
 
6
6
  describe DataObjects::Mysql::Reader do
7
- it_should_behave_like 'a Reader'
7
+ behaves_like 'a Reader'
8
8
  end
@@ -4,13 +4,13 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
4
4
  require 'data_objects/spec/result_spec'
5
5
 
6
6
  # splitting the descibe into two separate declaration avoids
7
- # concurrent execution of the "it_should_behave_like ....."
7
+ # concurrent execution of the "behaves_like ....."
8
8
  # needed by some databases (sqlite3)
9
9
 
10
10
  describe DataObjects::Mysql::Result do
11
- it_should_behave_like 'a Result'
11
+ behaves_like 'a Result'
12
12
  end
13
13
 
14
14
  describe DataObjects::Mysql::Result do
15
- it_should_behave_like 'a Result which returns inserted keys'
15
+ behaves_like 'a Result which returns inserted keys'
16
16
  end
@@ -2,57 +2,45 @@ $TESTING=true
2
2
  JRUBY = RUBY_PLATFORM =~ /java/
3
3
 
4
4
  require 'rubygems'
5
-
6
- gem 'rspec', '>1.1.12'
7
- require 'spec'
8
-
9
5
  require 'date'
10
6
  require 'ostruct'
11
- require 'pathname'
12
7
  require 'fileutils'
8
+ require 'win32console' if RUBY_PLATFORM =~ /mingw|mswin/
9
+
10
+ driver_lib = File.expand_path('../../lib', __FILE__)
11
+ $LOAD_PATH.unshift(driver_lib) unless $LOAD_PATH.include?(driver_lib)
13
12
 
14
- dir = File.dirname(__FILE__)
15
- lib_path = File.expand_path("#{dir}/../lib")
16
- $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
17
- # put data_objects from repository in the load path
18
- # DO NOT USE installed gem of data_objects!
19
- do_lib_path = File.expand_path("#{dir}/../../data_objects/lib")
20
- $LOAD_PATH.unshift do_lib_path unless $LOAD_PATH.include?(do_lib_path)
21
-
22
- if JRUBY
23
- jdbc_lib_path = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'do_jdbc', 'lib'))
24
- $LOAD_PATH.unshift jdbc_lib_path unless $LOAD_PATH.include?(jdbc_lib_path)
25
- require 'do_jdbc'
13
+ # Prepend data_objects/do_jdbc in the repository to the load path.
14
+ # DO NOT USE installed gems, except when running the specs from gem.
15
+ repo_root = File.expand_path('../../..', __FILE__)
16
+ (['data_objects'] << ('do_jdbc' if JRUBY)).compact.each do |lib|
17
+ lib_path = "#{repo_root}/#{lib}/lib"
18
+ $LOAD_PATH.unshift(lib_path) if File.directory?(lib_path) && !$LOAD_PATH.include?(lib_path)
26
19
  end
27
20
 
28
21
  require 'data_objects'
29
-
30
- DATAOBJECTS_SPEC_ROOT = Pathname(__FILE__).dirname.parent.parent + 'data_objects' + 'spec'
31
- Pathname.glob((DATAOBJECTS_SPEC_ROOT + 'lib/**/*.rb').to_s).each { |f| require f }
32
-
22
+ require 'data_objects/spec/bacon'
23
+ require 'data_objects/spec/helpers/ssl'
33
24
  require 'do_mysql'
34
25
 
35
- log_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'log', 'do.log'))
36
- FileUtils.mkdir_p(File.dirname(log_path))
37
-
38
- DataObjects::Mysql.logger = DataObjects::Logger.new(log_path, :debug)
39
-
26
+ DataObjects::Mysql.logger = DataObjects::Logger.new(STDOUT, :off)
40
27
  at_exit { DataObjects.logger.flush }
41
28
 
42
- Spec::Runner.configure do |config|
43
- config.include(DataObjects::Spec::PendingHelpers)
44
- end
45
-
46
29
  CONFIG = OpenStruct.new
47
30
  CONFIG.scheme = 'mysql'
48
31
  CONFIG.user = ENV['DO_MYSQL_USER'] || 'root'
49
32
  CONFIG.pass = ENV['DO_MYSQL_PASS'] || ''
33
+ CONFIG.user_info = unless CONFIG.user == 'root' && CONFIG.pass.empty?
34
+ "#{CONFIG.user}:#{CONFIG.pass}@"
35
+ else
36
+ ''
37
+ end
50
38
  CONFIG.host = ENV['DO_MYSQL_HOST'] || 'localhost'
51
39
  CONFIG.port = ENV['DO_MYSQL_PORT'] || '3306'
52
40
  CONFIG.database = ENV['DO_MYSQL_DATABASE'] || '/do_test'
53
41
  CONFIG.ssl = SSLHelpers.query(:ca_cert, :client_cert, :client_key)
54
42
 
55
- CONFIG.uri = ENV["DO_MYSQL_SPEC_URI"] ||"#{CONFIG.scheme}://#{CONFIG.user}:#{CONFIG.pass}@#{CONFIG.host}:#{CONFIG.port}#{CONFIG.database}"
43
+ CONFIG.uri = ENV["DO_MYSQL_SPEC_URI"] ||"#{CONFIG.scheme}://#{CONFIG.user_info}#{CONFIG.host}:#{CONFIG.port}#{CONFIG.database}"
56
44
  CONFIG.sleep = "SELECT sleep(1)"
57
45
 
58
46
  module DataObjectsSpecHelpers
@@ -226,3 +214,5 @@ module DataObjectsSpecHelpers
226
214
  end
227
215
 
228
216
  end
217
+
218
+ include DataObjectsSpecHelpers
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/array_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Array' do
7
- it_should_behave_like 'supporting Array'
7
+ behaves_like 'supporting Array'
8
8
  end
@@ -4,6 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/bigdecimal_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with BigDecimal' do
7
- it_should_behave_like 'supporting BigDecimal'
8
- it_should_behave_like 'supporting BigDecimal autocasting'
7
+ behaves_like 'supporting BigDecimal'
8
+ behaves_like 'supporting BigDecimal autocasting'
9
9
  end
@@ -4,6 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/boolean_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Boolean' do
7
- it_should_behave_like 'supporting Boolean'
8
- it_should_behave_like 'supporting Boolean autocasting'
7
+ behaves_like 'supporting Boolean'
8
+ behaves_like 'supporting Boolean autocasting'
9
9
  end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/byte_array_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with ByteArray' do
7
- it_should_behave_like 'supporting ByteArray'
7
+ behaves_like 'supporting ByteArray'
8
8
  end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/class_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Class' do
7
- it_should_behave_like 'supporting Class'
7
+ behaves_like 'supporting Class'
8
8
  end
@@ -4,6 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/date_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Date' do
7
- it_should_behave_like 'supporting Date'
8
- it_should_behave_like 'supporting Date autocasting'
7
+ behaves_like 'supporting Date'
8
+ behaves_like 'supporting Date autocasting'
9
9
  end
@@ -4,6 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/datetime_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with DateTime' do
7
- it_should_behave_like 'supporting DateTime'
8
- it_should_behave_like 'supporting DateTime autocasting'
7
+ behaves_like 'supporting DateTime'
8
+ behaves_like 'supporting DateTime autocasting'
9
9
  end
@@ -4,6 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/float_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Float' do
7
- it_should_behave_like 'supporting Float'
8
- it_should_behave_like 'supporting Float autocasting'
7
+ behaves_like 'supporting Float'
8
+ behaves_like 'supporting Float autocasting'
9
9
  end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/integer_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Integer' do
7
- it_should_behave_like 'supporting Integer'
7
+ behaves_like 'supporting Integer'
8
8
  end
@@ -4,7 +4,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/nil_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Nil' do
7
- it_should_behave_like 'supporting Nil'
8
- it_should_behave_like 'supporting writing an Nil'
9
- it_should_behave_like 'supporting Nil autocasting'
7
+ behaves_like 'supporting Nil'
8
+ behaves_like 'supporting writing an Nil'
9
+ behaves_like 'supporting Nil autocasting'
10
10
  end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
+ require 'data_objects/spec/typecast/other_spec'
5
+
6
+ describe 'DataObjects::H2 with other (unknown) type' do
7
+ behaves_like 'supporting other (unknown) type'
8
+ end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/range_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Range' do
7
- it_should_behave_like 'supporting Range'
7
+ behaves_like 'supporting Range'
8
8
  end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/string_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with String' do
7
- it_should_behave_like 'supporting String'
7
+ behaves_like 'supporting String'
8
8
  end
@@ -4,5 +4,5 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
4
4
  require 'data_objects/spec/typecast/time_spec'
5
5
 
6
6
  describe 'DataObjects::Mysql with Time' do
7
- it_should_behave_like 'supporting Time'
7
+ behaves_like 'supporting Time'
8
8
  end
@@ -0,0 +1,65 @@
1
+ begin
2
+ gem 'rake-compiler', '~>0.7'
3
+ require 'rake/extensiontask'
4
+ require 'rake/javaextensiontask'
5
+
6
+ # Hack to avoid "allocator undefined for Proc" issue when unpacking Gems:
7
+ # gemspec provided by Jeweler uses Rake::FileList for files, test_files and
8
+ # extra_rdoc_files, and procs cannot be marshalled.
9
+ def gemspec
10
+ @clean_gemspec ||= eval("#{Rake.application.jeweler.gemspec.to_ruby}") # $SAFE = 3\n
11
+ end
12
+
13
+ Rake::ExtensionTask.new('do_mysql', gemspec) do |ext|
14
+ ext.lib_dir = "lib/#{gemspec.name}"
15
+ mysql_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', "mysql-#{BINARY_VERSION}-win32"))
16
+
17
+ # automatically add build options to avoid need of manual input
18
+ if RUBY_PLATFORM =~ /mswin|mingw/ then
19
+ ext.config_options << "--with-mysql-include=#{mysql_lib}/include"
20
+ ext.config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
21
+ else
22
+ ext.cross_compile = true
23
+ ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
24
+ ext.cross_config_options << "--with-mysql-include=#{mysql_lib}/include"
25
+ ext.cross_config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
26
+
27
+ ext.cross_compiling do |gemspec|
28
+ gemspec.post_install_message = <<-POST_INSTALL_MESSAGE
29
+
30
+ ======================================================================================================
31
+
32
+ You've installed the binary version of #{gemspec.name}.
33
+ It was built using MySQL version #{BINARY_VERSION}.
34
+ It's recommended to use the exact same version to avoid potential issues.
35
+
36
+ At the time of building this gem, the necessary DLL files where available
37
+ in the following download:
38
+
39
+ http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-noinstall-#{BINARY_VERSION}-win32.zip/from/pick
40
+
41
+ You can put the lib\\opt\\libmysql.dll available in this package in your Ruby bin
42
+ directory, for example C:\\Ruby\\bin
43
+
44
+ ======================================================================================================
45
+
46
+ POST_INSTALL_MESSAGE
47
+ end
48
+
49
+ end
50
+
51
+ end
52
+
53
+ Rake::JavaExtensionTask.new('do_mysql', gemspec) do |ext|
54
+ ext.lib_dir = "lib/#{gemspec.name}"
55
+ ext.ext_dir = 'ext-java/src/main/java'
56
+ ext.debug = ENV.has_key?('DO_JAVA_DEBUG') && ENV['DO_JAVA_DEBUG']
57
+ ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
58
+ ext.java_compiling do |gem|
59
+ gem.add_dependency 'jdbc-mysql', '>=5.0.4'
60
+ gem.add_dependency 'do_jdbc', '0.10.1'
61
+ end
62
+ end
63
+ rescue LoadError
64
+ warn "To compile, install rake-compiler (gem install rake-compiler)"
65
+ end