do_mysql 0.9.12-java → 0.10.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/HISTORY.markdown ADDED
@@ -0,0 +1,17 @@
1
+ ## 0.10.0 2009-10-15
2
+ * Improvements
3
+ * JRuby Support (using *do_jdbc*)
4
+
5
+ ## 0.9.12 2009-05-17
6
+ * Improvements
7
+ * Windows support
8
+
9
+ ## 0.9.11 2009-01-19
10
+ * Improvements
11
+ * Ruby 1.9 support
12
+ * Fixes
13
+ * Reconnecting now works properly
14
+
15
+ ## 0.9.9 2008-11-27
16
+ * Improvements
17
+ * Added initial support for Ruby 1.9 [John Harrison]
data/Manifest.txt CHANGED
@@ -1,8 +1,8 @@
1
1
  .gitignore
2
- History.txt
2
+ HISTORY.markdown
3
3
  LICENSE
4
4
  Manifest.txt
5
- README.txt
5
+ README.markdown
6
6
  Rakefile
7
7
  buildfile
8
8
  ext-java/src/main/java/DoMysqlExtService.java
@@ -1,3 +1,4 @@
1
- = do_mysql
1
+ do_mysql
2
+ ========
2
3
 
3
4
  A MySQL driver for DataObjects
data/Rakefile CHANGED
@@ -8,9 +8,9 @@ require 'lib/do_mysql/version'
8
8
  ROOT = Pathname(__FILE__).dirname.expand_path
9
9
  JRUBY = RUBY_PLATFORM =~ /java/
10
10
  WINDOWS = Gem.win_platform?
11
- SUDO = (WINDOWS || JRUBY) ? '' : ('sudo' unless ENV['SUDOLESS'])
12
- BINARY_VERSION = '5.0.77'
11
+ SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
12
+ BINARY_VERSION = '5.0.85'
13
13
 
14
- Dir['tasks/*.rake'].each { |f| import f }
14
+ Dir['tasks/*.rake'].sort.each { |f| import f }
15
15
 
16
16
  CLEAN.include(%w[ {tmp,pkg}/ **/*.{o,so,bundle,jar,log,a,gem,dSYM,obj,pdb,exp,DS_Store,rbc,db} ext/do_mysql_ext/Makefile ext-java/target ])
data/lib/do_mysql.rb CHANGED
@@ -1,21 +1,30 @@
1
- require 'rubygems'
2
1
  require 'data_objects'
3
2
  if RUBY_PLATFORM =~ /java/
4
3
  require 'do_jdbc'
5
4
  require 'java'
6
- gem 'jdbc-mysql'
7
- require 'jdbc/mysql' # the JDBC driver, packaged as a gem
5
+
6
+ driver = 'com.mysql.jdbc.Driver'
7
+ begin
8
+ java.lang.Thread.currentThread.getContextClassLoader().loadClass(driver, true)
9
+ rescue
10
+ require 'jdbc/mysql' # the JDBC driver, packaged as a gem
11
+ end
12
+
13
+ # Another way of loading the JDBC Class. This seems to be more reliable
14
+ # than Class.forName() or
15
+ # Thread.currentThread.getContextClassLoader().loadClass() within the
16
+ # data_objects.Connection Java class, which is currently not working as
17
+ # expected.
18
+ java_import driver
19
+
8
20
  end
9
21
 
10
22
  require 'do_mysql_ext'
11
- require File.expand_path(File.join(File.dirname(__FILE__), 'do_mysql', 'version'))
12
- require File.expand_path(File.join(File.dirname(__FILE__), 'do_mysql', 'transaction'))
23
+ require 'do_mysql/version'
24
+ require 'do_mysql/transaction'
25
+ require 'do_mysql/encoding'
13
26
 
14
27
  if RUBY_PLATFORM =~ /java/
15
- # Another way of loading the JDBC Class. This seems to be more reliable
16
- # than Class.forName() within the data_objects.Connection Java class,
17
- # which is currently not working as expected.
18
- import 'com.mysql.jdbc.Driver'
19
28
 
20
29
  module DataObjects
21
30
  module Mysql
@@ -28,15 +37,9 @@ if RUBY_PLATFORM =~ /java/
28
37
  @using_socket
29
38
  end
30
39
 
31
- def character_set
32
- # JDBC API does not provide an easy way to get the current character set
33
- reader = self.create_command("SHOW VARIABLES LIKE 'character_set_client'").execute_reader
34
- reader.next!
35
- char_set = reader.values[1]
36
- reader.close
37
- char_set.downcase
40
+ def secure?
41
+ false
38
42
  end
39
-
40
43
  end
41
44
  end
42
45
  end
@@ -0,0 +1,38 @@
1
+ module DataObjects
2
+ module Mysql
3
+ module Encoding
4
+ MAP = {
5
+ "Big5" => "big5",
6
+ "CP850" => "cp850",
7
+ "KOI8-R" => "koi8r",
8
+ "ISO-8859-1" => "latin1",
9
+ "ISO-8859-2" => "latin2",
10
+ "US-ASCII" => "ascii",
11
+ "EUC-JP" => "ujis",
12
+ "SJIS" => "sjis",
13
+ "ISO-8859-8" => "hebrew",
14
+ "TIS-620" => "tis620",
15
+ "EUC-KR" => "euckr",
16
+ "KOI8-U" => "koi8u",
17
+ "GB2312" => "gb2312",
18
+ "ISO-8859-7" => "greek",
19
+ "Windows-1250" => "cp1250",
20
+ "GBK" => "gbk",
21
+ "ISO-8859-9" => "latin5",
22
+ "UTF-8" => "utf8",
23
+ "UTF-16BE" => "ucs2",
24
+ "IBM866" => "cp866",
25
+ "macCentEuro" => "macce",
26
+ "macRoman" => "macroman",
27
+ "CP852" => "cp852",
28
+ "ISO-8859-13" => "latin7",
29
+ "Windows-1251" => "cp1251",
30
+ "Windows-1256" => "cp1256",
31
+ "Windows-1257" => "cp1257",
32
+ "ASCII-8BIT" => "binary",
33
+ "Windows-31J" => "cp932",
34
+ "eucJP-ms" => "eucjpms"
35
+ }
36
+ end
37
+ end
38
+ end
@@ -5,27 +5,16 @@ module DataObjects
5
5
 
6
6
  class Transaction < DataObjects::Transaction
7
7
 
8
- def finalize_transaction
9
- cmd = "XA END '#{id}'"
10
- connection.create_command(cmd).execute_non_query
11
- end
12
-
13
- def begin
8
+ def begin_prepared
14
9
  cmd = "XA START '#{id}'"
15
10
  connection.create_command(cmd).execute_non_query
16
11
  end
17
12
 
18
- def commit
13
+ def commit_prepared
19
14
  cmd = "XA COMMIT '#{id}'"
20
15
  connection.create_command(cmd).execute_non_query
21
16
  end
22
17
 
23
- def rollback
24
- finalize_transaction
25
- cmd = "XA ROLLBACK '#{id}'"
26
- connection.create_command(cmd).execute_non_query
27
- end
28
-
29
18
  def rollback_prepared
30
19
  cmd = "XA ROLLBACK '#{id}'"
31
20
  connection.create_command(cmd).execute_non_query
@@ -37,6 +26,13 @@ module DataObjects
37
26
  connection.create_command(cmd).execute_non_query
38
27
  end
39
28
 
29
+ private
30
+
31
+ def finalize_transaction
32
+ cmd = "XA END '#{id}'"
33
+ connection.create_command(cmd).execute_non_query
34
+ end
35
+
40
36
  end
41
37
 
42
38
  end
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Mysql
3
- VERSION = "0.9.12"
3
+ VERSION = "0.10.0"
4
4
  end
5
5
  end
data/lib/do_mysql_ext.jar CHANGED
Binary file
@@ -2,6 +2,7 @@
2
2
 
3
3
  require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
4
4
  require 'data_objects/spec/connection_spec'
5
+ require 'cgi'
5
6
 
6
7
  describe DataObjects::Mysql::Connection do
7
8
 
@@ -12,8 +13,49 @@ describe DataObjects::Mysql::Connection do
12
13
  @host = CONFIG.host
13
14
  @port = CONFIG.port
14
15
  @database = CONFIG.database
16
+ @ssl = CONFIG.ssl
15
17
  end
16
18
 
17
19
  it_should_behave_like 'a Connection'
18
- #it_should_behave_like 'a Connection with authentication support'
20
+ it_should_behave_like 'a Connection with authentication support'
21
+ it_should_behave_like 'a Connection with SSL support' unless JRUBY
22
+
23
+ if DataObjectsSpecHelpers.test_environment_supports_ssl?
24
+
25
+ describe 'connecting with SSL' do
26
+
27
+ it 'should raise an error when passed ssl=true' do
28
+ lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl=true") }.
29
+ should raise_error(ArgumentError)
30
+ end
31
+
32
+ it 'should raise an error when passed a nonexistent client certificate' do
33
+ lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl[client_cert]=nonexistent") }.
34
+ should raise_error(ArgumentError)
35
+ end
36
+
37
+ it 'should raise an error when passed a nonexistent client key' do
38
+ lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl[client_key]=nonexistent") }.
39
+ should raise_error(ArgumentError)
40
+ end
41
+
42
+ it 'should raise an error when passed a nonexistent ca certificate' do
43
+ lambda { DataObjects::Connection.new("#{CONFIG.uri}?ssl[ca_cert]=nonexistent") }.
44
+ should raise_error(ArgumentError)
45
+ end
46
+
47
+ it 'should connect with a specified SSL cipher' do
48
+ DataObjects::Connection.new("#{CONFIG.uri}?#{CONFIG.ssl}&ssl[cipher]=#{SSLHelpers::CONFIG.cipher}").
49
+ ssl_cipher.should == SSLHelpers::CONFIG.cipher
50
+ end
51
+
52
+ it 'should raise an error with an invalid SSL cipher' do
53
+ lambda { DataObjects::Connection.new("#{CONFIG.uri}?#{CONFIG.ssl}&ssl[cipher]=invalid") }.
54
+ should raise_error
55
+ end
56
+
57
+ end
58
+
59
+ end
60
+
19
61
  end
data/spec/result_spec.rb CHANGED
@@ -3,7 +3,14 @@
3
3
  require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
4
4
  require 'data_objects/spec/result_spec'
5
5
 
6
+ # splitting the descibe into two separate declaration avoids
7
+ # concurrent execution of the "it_should_behave_like ....."
8
+ # needed by some databases (sqlite3)
9
+
6
10
  describe DataObjects::Mysql::Result do
7
11
  it_should_behave_like 'a Result'
12
+ end
13
+
14
+ describe DataObjects::Mysql::Result do
8
15
  it_should_behave_like 'a Result which returns inserted keys'
9
16
  end
data/spec/spec_helper.rb CHANGED
@@ -11,21 +11,25 @@ require 'ostruct'
11
11
  require 'pathname'
12
12
  require 'fileutils'
13
13
 
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)
14
17
  # put data_objects from repository in the load path
15
18
  # DO NOT USE installed gem of data_objects!
16
- $:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'data_objects', 'lib'))
17
- require 'data_objects'
18
-
19
- DATAOBJECTS_SPEC_ROOT = Pathname(__FILE__).dirname.parent.parent + 'data_objects' + 'spec'
20
- Pathname.glob((DATAOBJECTS_SPEC_ROOT + 'lib/**/*.rb').to_s).each { |f| require f }
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
21
 
22
22
  if JRUBY
23
- $:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'do_jdbc', 'lib'))
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)
24
25
  require 'do_jdbc'
25
26
  end
26
27
 
27
- # put the pre-compiled extension in the path to be found
28
- $:.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
28
+ 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
+
29
33
  require 'do_mysql'
30
34
 
31
35
  log_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'log', 'do.log'))
@@ -46,6 +50,7 @@ CONFIG.pass = ENV['DO_MYSQL_PASS'] || ''
46
50
  CONFIG.host = ENV['DO_MYSQL_HOST'] || 'localhost'
47
51
  CONFIG.port = ENV['DO_MYSQL_PORT'] || '3306'
48
52
  CONFIG.database = ENV['DO_MYSQL_DATABASE'] || '/do_test'
53
+ CONFIG.ssl = SSLHelpers.query(:ca_cert, :client_cert, :client_key)
49
54
 
50
55
  CONFIG.uri = ENV["DO_MYSQL_SPEC_URI"] ||"#{CONFIG.scheme}://#{CONFIG.user}:#{CONFIG.pass}@#{CONFIG.host}:#{CONFIG.port}#{CONFIG.database}"
51
56
  CONFIG.sleep = "SELECT sleep(1)"
@@ -96,7 +101,7 @@ module DataObjectsSpecHelpers
96
101
  `ad_image` mediumblob NULL,
97
102
  `whitepaper_text` longtext NULL,
98
103
  `cad_drawing` longblob NULL,
99
- `flags` tinyint(1) default 0,
104
+ `flags` boolean default false,
100
105
  `number_in_stock` smallint default 500,
101
106
  `number_sold` mediumint default 0,
102
107
  `super_number` bigint default 9223372036854775807,
@@ -105,7 +110,7 @@ module DataObjectsSpecHelpers
105
110
  `cost2` decimal(8,2) default 50.23,
106
111
  `release_date` date default '2008-02-14',
107
112
  `release_datetime` datetime default '2008-02-14 00:31:12',
108
- `release_timestamp` timestamp default '2008-02-14 00:31:31',
113
+ `release_timestamp` timestamp NULL default '2008-02-14 00:31:31',
109
114
  `status` enum('active','out of stock') NOT NULL default 'active',
110
115
  PRIMARY KEY (`id`)
111
116
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -118,15 +123,106 @@ module DataObjectsSpecHelpers
118
123
  end
119
124
 
120
125
  conn.create_command(<<-EOF).execute_non_query
121
- update widgets set flags = 1 where id = 2
126
+ update widgets set flags = true where id = 2
122
127
  EOF
123
128
 
124
129
  conn.create_command(<<-EOF).execute_non_query
125
130
  update widgets set ad_description = NULL where id = 3
126
131
  EOF
127
132
 
133
+ conn.create_command(<<-EOF).execute_non_query
134
+ update widgets set flags = NULL where id = 4
135
+ EOF
136
+
137
+ conn.create_command(<<-EOF).execute_non_query
138
+ update widgets set cost1 = NULL where id = 5
139
+ EOF
140
+
141
+ conn.create_command(<<-EOF).execute_non_query
142
+ update widgets set cost2 = NULL where id = 6
143
+ EOF
144
+
145
+ conn.create_command(<<-EOF).execute_non_query
146
+ update widgets set release_date = NULL where id = 7
147
+ EOF
148
+
149
+ conn.create_command(<<-EOF).execute_non_query
150
+ update widgets set release_datetime = NULL where id = 8
151
+ EOF
152
+
153
+ conn.create_command(<<-EOF).execute_non_query
154
+ update widgets set release_timestamp = NULL where id = 9
155
+ EOF
156
+
128
157
  conn.close
129
158
 
130
159
  end
131
160
 
161
+ def self.test_environment_ssl_config
162
+ ssl_config = SSLHelpers::CONFIG
163
+
164
+ message = "\nYou can configure MySQL via my.cnf with the following options in [mysqld]:\n"
165
+ message << "ssl_ca=#{ssl_config.ca_cert}\n"
166
+ message << "ssl_cert=#{ssl_config.server_cert}\n"
167
+ message << "ssl_key=#{ssl_config.server_key}\n"
168
+ message << "ssl_cipher=#{ssl_config.cipher}\n"
169
+
170
+ message << "\nOr you can use the following command line options:\n"
171
+ message << "--ssl-ca #{ssl_config.ca_cert} "
172
+ message << "--ssl-cert #{ssl_config.server_cert} "
173
+ message << "--ssl-key #{ssl_config.server_key} "
174
+ message << "--ssl-cipher #{ssl_config.cipher} "
175
+ message
176
+ end
177
+
178
+ def self.test_environment_ssl_config_errors
179
+ conn = DataObjects::Connection.new(CONFIG.uri)
180
+
181
+ ssl_variables = conn.create_command(<<-EOF).execute_reader
182
+ SHOW VARIABLES LIKE '%ssl%'
183
+ EOF
184
+
185
+ ssl_config = SSLHelpers::CONFIG
186
+ current_config = { }
187
+
188
+ while ssl_variables.next!
189
+ variable, value = ssl_variables.values
190
+ current_config[variable.intern] = value
191
+ end
192
+
193
+ errors = []
194
+
195
+ if current_config[:have_ssl] == 'NO'
196
+ errors << "SSL was not compiled"
197
+ end
198
+
199
+ if current_config[:have_ssl] == 'DISABLED'
200
+ errors << "SSL was not enabled"
201
+ end
202
+
203
+ if current_config[:ssl_ca] != ssl_config.ca_cert
204
+ errors << "The CA certificate is not configured (it was set to '#{current_config[:ssl_ca]}')"
205
+ end
206
+
207
+ if current_config[:ssl_cert] != ssl_config.server_cert
208
+ errors << "The server certificate is not configured (it was set to '#{current_config[:ssl_cert]}')"
209
+ end
210
+
211
+ if current_config[:ssl_key] != ssl_config.server_key
212
+ errors << "The server key is not configured, (it was set to '#{current_config[:ssl_key]}')"
213
+ end
214
+
215
+ if current_config[:ssl_cipher] != ssl_config.cipher
216
+ errors << "The cipher is not configured, (it was set to '#{current_config[:ssl_cipher]}')"
217
+ end
218
+
219
+ errors
220
+ ensure
221
+ conn.close if conn
222
+ end
223
+
224
+ def self.test_environment_supports_ssl?
225
+ test_environment_ssl_config_errors.empty?
226
+ end
227
+
132
228
  end
data/tasks/gem.rake CHANGED
@@ -1,60 +1,8 @@
1
1
  require 'rubygems/package_task'
2
2
 
3
- GEM_SPEC = Gem::Specification.new do |s|
4
- # basic information
5
- s.name = "do_mysql"
6
- s.version = DataObjects::Mysql::VERSION
7
-
8
- # description and details
9
- s.summary = 'DataObjects MySQL Driver'
10
- s.description = "Implements the DataObjects API for MySQL"
11
-
12
- # dependencies
13
- s.add_dependency "addressable", "~>2.0.0"
14
- s.add_dependency "extlib", "~>0.9.12"
15
- s.add_dependency "data_objects", DataObjects::Mysql::VERSION
16
-
17
- if JRUBY
18
- s.add_dependency "jdbc-mysql", ">=5.0.4"
19
- s.add_dependency "do_jdbc", DataObjects::Mysql::VERSION
20
- s.platform = "java"
21
- # components, files and paths
22
- s.files = FileList["lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake",
23
- "LICENSE", "Rakefile", "*.{rdoc,txt,yml}", "lib/*.jar"]
24
- else
25
- s.platform = Gem::Platform::RUBY
26
- s.extensions << 'ext/do_mysql_ext/extconf.rb'
27
- s.files = FileList["lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake", "ext/**/*.{rb,c}",
28
- "LICENSE", "Rakefile", "*.{rdoc,txt,yml}"]
29
- end
30
-
31
-
32
- # development dependencies
33
- s.add_development_dependency 'rspec', '~>1.2.0'
34
-
35
- s.require_path = 'lib'
36
-
37
- # documentation
38
- s.has_rdoc = false
39
-
40
- # project information
41
- s.homepage = 'http://github.com/datamapper/do'
42
- s.rubyforge_project = 'dorb'
43
-
44
- # author and contributors
45
- s.author = 'Dirkjan Bussink'
46
- s.email = 'd.bussink@gmail.com'
47
- end
3
+ GEM_SPEC = eval(File.read('do_mysql.gemspec'))
48
4
 
49
5
  gem_package = Gem::PackageTask.new(GEM_SPEC) do |pkg|
50
6
  pkg.need_tar = false
51
7
  pkg.need_zip = false
52
8
  end
53
-
54
- file "#{GEM_SPEC.name}.gemspec" => ['Rakefile', 'tasks/gem.rake'] do |t|
55
- puts "Generating #{t.name}"
56
- File.open(t.name, 'w') { |f| f.puts GEM_SPEC.to_yaml }
57
- end
58
-
59
- desc "Generate or update the standalone gemspec file for the project"
60
- task :gemspec => ["#{GEM_SPEC.name}.gemspec"]
data/tasks/release.rake CHANGED
@@ -8,7 +8,7 @@ end
8
8
  if defined?(RubyForge) then
9
9
  if defined?(GEM_SPEC) then
10
10
  desc 'Package and upload to RubyForge'
11
- task :release => [:package] do |t|
11
+ task :release do |t|
12
12
  ver = ENV['VERSION'] or fail "Must supply VERSION (rake release VERSION=x.y.z)."
13
13
 
14
14
  # compare versions to avoid mistakes
@@ -26,19 +26,19 @@ if defined?(RubyForge) then
26
26
 
27
27
  # read project info and overview
28
28
  notes = begin
29
- r = File.read("README.rdoc")
30
- r.split(/^(=+ .*)/)[1..4].join.strip
29
+ r = File.read("README.markdown")
30
+ r.split(/^(.*\n\-+)/)[1..4].join.strip
31
31
  rescue
32
- warn "Missing README.rdoc"
32
+ warn "Missing README.markdown"
33
33
  ''
34
34
  end
35
35
 
36
36
  # read changes
37
37
  changes = begin
38
- h = File.read("History.txt")
39
- h.split(/^(==+ .*)/)[1..2].join.strip
38
+ h = File.read("HISTORY.markdown")
39
+ h.split(/^(##+ .*)/)[1..2].join.strip
40
40
  rescue
41
- warn "Missing History.txt"
41
+ warn "Missing HISTORY.markdown"
42
42
  ''
43
43
  end
44
44
 
data/tasks/retrieve.rake CHANGED
@@ -33,7 +33,7 @@ begin
33
33
  url = "http://mysql.proserve.nl/Downloads/MySQL-#{base_version}/#{File.basename(t.name)}"
34
34
  when_writing "downloading #{t.name}" do
35
35
  cd File.dirname(t.name) do
36
- sh "wget -c #{url} || curl -C - -O #{url}"
36
+ sh "wget -c #{url} || curl -L -C - -O #{url}"
37
37
  end
38
38
  end
39
39
  end
data/tasks/spec.rake CHANGED
@@ -5,6 +5,7 @@ desc 'Run specifications'
5
5
  Spec::Rake::SpecTask.new(:spec => [ :clean, :compile ]) do |t|
6
6
  t.spec_opts << '--options' << ROOT + 'spec/spec.opts'
7
7
  t.spec_files = Pathname.glob(ENV['FILES'] || 'spec/**/*_spec.rb').map { |f| f.to_s }
8
+ t.libs << 'lib'
8
9
 
9
10
  begin
10
11
  # RCov is run by default, except on the JRuby platform
data/tasks/ssl.rake ADDED
@@ -0,0 +1,29 @@
1
+ namespace :ssl do
2
+
3
+ task :env do
4
+ require ROOT.join('spec', 'spec_helper')
5
+ end
6
+
7
+ desc "Check test environment for SSL support."
8
+ task :check => :env do
9
+ ssl_supported, messages = DataObjectsSpecHelpers.test_environment_supports_ssl?
10
+
11
+ if DataObjectsSpecHelpers.test_environment_supports_ssl?
12
+ puts
13
+ puts "** SSL successfully configured for the test environment **"
14
+ else
15
+ puts
16
+ puts "** SSL is not configured for the test environment **"
17
+ puts
18
+ puts DataObjectsSpecHelpers.test_environment_ssl_config_errors.join("\n")
19
+ puts
20
+ fail "Run rake ssl:config for instructions on how to configure the test environment."
21
+ end
22
+ end
23
+
24
+ desc "Provide instructions on how to configure SSL in your test environment."
25
+ task :config => :env do
26
+ puts DataObjectsSpecHelpers.test_environment_ssl_config
27
+ end
28
+
29
+ end
metadata CHANGED
@@ -28,6 +28,7 @@ specification_version: 3
28
28
  default_executable:
29
29
  files:
30
30
  - lib/do_mysql.rb
31
+ - lib/do_mysql/encoding.rb
31
32
  - lib/do_mysql/transaction.rb
32
33
  - lib/do_mysql/version.rb
33
34
  - spec/command_spec.rb
@@ -56,11 +57,12 @@ files:
56
57
  - tasks/release.rake
57
58
  - tasks/retrieve.rake
58
59
  - tasks/spec.rake
60
+ - tasks/ssl.rake
59
61
  - LICENSE
60
62
  - Rakefile
61
- - History.txt
63
+ - HISTORY.markdown
64
+ - README.markdown
62
65
  - Manifest.txt
63
- - README.txt
64
66
  - lib/do_mysql_ext.jar
65
67
  required_rubygems_version: !ruby/object:Gem::Requirement
66
68
  requirements:
@@ -70,17 +72,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
72
  version:
71
73
  extensions: []
72
74
 
73
- rubygems_version: 1.3.2
75
+ rubygems_version: 1.3.3
74
76
  requirements: []
75
77
 
76
78
  authors:
77
79
  - Dirkjan Bussink
78
- date: 2009-05-16 22:00:00 +00:00
80
+ date: 2009-09-19 22:00:00 +00:00
79
81
  platform: java
80
82
  test_files: []
81
83
 
82
84
  version: !ruby/object:Gem::Version
83
- version: 0.9.12
85
+ version: 0.10.0
84
86
  require_paths:
85
87
  - lib
86
88
  dependencies:
@@ -89,7 +91,7 @@ dependencies:
89
91
  requirements:
90
92
  - - ~>
91
93
  - !ruby/object:Gem::Version
92
- version: 2.0.0
94
+ version: "2.0"
93
95
  version:
94
96
  type: :runtime
95
97
  version_requirement:
@@ -109,7 +111,7 @@ dependencies:
109
111
  requirements:
110
112
  - - "="
111
113
  - !ruby/object:Gem::Version
112
- version: 0.9.12
114
+ version: 0.10.0
113
115
  version:
114
116
  type: :runtime
115
117
  version_requirement:
@@ -129,7 +131,7 @@ dependencies:
129
131
  requirements:
130
132
  - - "="
131
133
  - !ruby/object:Gem::Version
132
- version: 0.9.12
134
+ version: 0.10.0
133
135
  version:
134
136
  type: :runtime
135
137
  version_requirement:
@@ -145,4 +147,4 @@ dependencies:
145
147
  version_requirement:
146
148
  name: rspec
147
149
  bindir: bin
148
- has_rdoc: false
150
+ has_rdoc: true
data/History.txt DELETED
@@ -1,9 +0,0 @@
1
- == 0.9.11 2009-01-19
2
- * Improvements
3
- * Ruby 1.9 support
4
- * Fixes
5
- * Reconnecting now works properly
6
-
7
- == 0.9.9 2008-11-27
8
- * Improvements
9
- * Added initial support for Ruby 1.9 [John Harrison]