do_mysql 0.10.3 → 0.10.4.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.markdown +2 -9
- data/Rakefile +12 -45
- data/ext/do_mysql/do_common.c +526 -0
- data/ext/do_mysql/do_common.h +170 -0
- data/ext/do_mysql/do_mysql.c +200 -700
- data/ext/do_mysql/error.h +139 -263
- data/ext/do_mysql/extconf.rb +12 -14
- data/lib/do_mysql.rb +8 -3
- data/lib/do_mysql/version.rb +1 -1
- data/spec/command_spec.rb +3 -3
- data/spec/connection_spec.rb +17 -17
- data/spec/encoding_spec.rb +4 -4
- data/spec/error/sql_error_spec.rb +2 -2
- data/spec/reader_spec.rb +28 -2
- data/spec/result_spec.rb +5 -5
- data/spec/spec_helper.rb +14 -5
- data/spec/typecast/array_spec.rb +2 -2
- data/spec/typecast/bigdecimal_spec.rb +3 -3
- data/spec/typecast/boolean_spec.rb +3 -3
- data/spec/typecast/byte_array_spec.rb +2 -2
- data/spec/typecast/class_spec.rb +2 -2
- data/spec/typecast/date_spec.rb +3 -3
- data/spec/typecast/datetime_spec.rb +3 -3
- data/spec/typecast/float_spec.rb +3 -3
- data/spec/typecast/integer_spec.rb +2 -2
- data/spec/typecast/nil_spec.rb +4 -4
- data/spec/typecast/other_spec.rb +2 -2
- data/spec/typecast/range_spec.rb +2 -2
- data/spec/typecast/string_spec.rb +2 -2
- data/spec/typecast/time_spec.rb +2 -2
- data/tasks/compile.rake +30 -31
- data/tasks/spec.rake +8 -19
- metadata +23 -20
@@ -1,8 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
4
|
-
require 'data_objects/spec/typecast/string_spec'
|
4
|
+
require 'data_objects/spec/shared/typecast/string_spec'
|
5
5
|
|
6
6
|
describe 'DataObjects::Mysql with String' do
|
7
|
-
|
7
|
+
it_should_behave_like 'supporting String'
|
8
8
|
end
|
data/spec/typecast/time_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
4
|
-
require 'data_objects/spec/typecast/time_spec'
|
4
|
+
require 'data_objects/spec/shared/typecast/time_spec'
|
5
5
|
|
6
6
|
describe 'DataObjects::Mysql with Time' do
|
7
|
-
|
7
|
+
it_should_behave_like 'supporting Time'
|
8
8
|
end
|
data/tasks/compile.rake
CHANGED
@@ -3,51 +3,50 @@ begin
|
|
3
3
|
require 'rake/extensiontask'
|
4
4
|
require 'rake/javaextensiontask'
|
5
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
6
|
def gemspec
|
10
|
-
@clean_gemspec ||=
|
7
|
+
@clean_gemspec ||= Gem::Specification::load(File.expand_path('../../do_mysql.gemspec', __FILE__))
|
11
8
|
end
|
12
9
|
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
unless JRUBY
|
11
|
+
Rake::ExtensionTask.new('do_mysql', gemspec) do |ext|
|
12
|
+
ext.lib_dir = "lib/#{gemspec.name}"
|
13
|
+
mysql_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', "mysql-#{BINARY_VERSION}-win32"))
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
15
|
+
# automatically add build options to avoid need of manual input
|
16
|
+
if RUBY_PLATFORM =~ /mswin|mingw/ then
|
17
|
+
ext.config_options << "--with-mysql-include=#{mysql_lib}/include"
|
18
|
+
ext.config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
|
19
|
+
else
|
20
|
+
ext.cross_compile = true
|
21
|
+
ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
|
22
|
+
ext.cross_config_options << "--with-mysql-include=#{mysql_lib}/include"
|
23
|
+
ext.cross_config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
|
26
24
|
|
27
|
-
|
28
|
-
|
25
|
+
ext.cross_compiling do |gemspec|
|
26
|
+
gemspec.post_install_message = <<-POST_INSTALL_MESSAGE
|
29
27
|
|
30
|
-
|
28
|
+
======================================================================================================
|
31
29
|
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
You've installed the binary version of #{gemspec.name}.
|
31
|
+
It was built using MySQL version #{BINARY_VERSION}.
|
32
|
+
It's recommended to use the exact same version to avoid potential issues.
|
35
33
|
|
36
|
-
|
37
|
-
|
34
|
+
At the time of building this gem, the necessary DLL files where available
|
35
|
+
in the following download:
|
38
36
|
|
39
|
-
|
37
|
+
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-noinstall-#{BINARY_VERSION}-win32.zip/from/pick
|
40
38
|
|
41
|
-
|
42
|
-
|
39
|
+
You can put the lib\\opt\\libmysql.dll available in this package in your Ruby bin
|
40
|
+
directory, for example C:\\Ruby\\bin
|
43
41
|
|
44
|
-
|
42
|
+
======================================================================================================
|
43
|
+
|
44
|
+
POST_INSTALL_MESSAGE
|
45
|
+
end
|
45
46
|
|
46
|
-
POST_INSTALL_MESSAGE
|
47
47
|
end
|
48
48
|
|
49
49
|
end
|
50
|
-
|
51
50
|
end
|
52
51
|
|
53
52
|
Rake::JavaExtensionTask.new('do_mysql', gemspec) do |ext|
|
@@ -57,7 +56,7 @@ begin
|
|
57
56
|
ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
|
58
57
|
ext.java_compiling do |gem|
|
59
58
|
gem.add_dependency 'jdbc-mysql', '>=5.0.4'
|
60
|
-
gem.add_dependency 'do_jdbc', '0.10.
|
59
|
+
gem.add_dependency 'do_jdbc', '0.10.4.rc1'
|
61
60
|
end
|
62
61
|
end
|
63
62
|
rescue LoadError
|
data/tasks/spec.rake
CHANGED
@@ -1,23 +1,12 @@
|
|
1
|
-
require '
|
1
|
+
require 'rspec/core/rake_task'
|
2
2
|
|
3
|
-
|
4
|
-
spec.
|
5
|
-
spec.
|
6
|
-
spec.verbose = true
|
3
|
+
RSpec::Core::RakeTask.new(:spec => [:clean, :compile]) do |spec|
|
4
|
+
spec.pattern = './spec/**/*_spec.rb'
|
5
|
+
spec.skip_bundler = true
|
7
6
|
end
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
require 'rcov/rcovtask'
|
14
|
-
Rcov::RcovTask.new do |spec|
|
15
|
-
spec.libs << 'spec'
|
16
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
17
|
-
spec.verbose = true
|
18
|
-
end
|
19
|
-
rescue LoadError
|
20
|
-
task :rcov do
|
21
|
-
abort 'RCov is not available. In order to run rcov, you must: gem install rcov'
|
22
|
-
end
|
8
|
+
RSpec::Core::RakeTask.new(:rcov => [:clean, :compile]) do |rcov|
|
9
|
+
rcov.pattern = "./spec/**/*_spec.rb"
|
10
|
+
rcov.rcov = true
|
11
|
+
rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
|
23
12
|
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: do_mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 977940494
|
5
|
+
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
|
9
|
+
- 4
|
10
|
+
- rc1
|
11
|
+
version: 0.10.4.rc1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Dirkjan Bussink
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2011-
|
19
|
+
date: 2011-03-29 00:00:00 +02:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -26,27 +27,28 @@ dependencies:
|
|
26
27
|
requirements:
|
27
28
|
- - "="
|
28
29
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
30
|
+
hash: 977940494
|
30
31
|
segments:
|
31
32
|
- 0
|
32
33
|
- 10
|
33
|
-
-
|
34
|
-
|
34
|
+
- 4
|
35
|
+
- rc1
|
36
|
+
version: 0.10.4.rc1
|
35
37
|
type: :runtime
|
36
38
|
version_requirements: *id001
|
37
39
|
- !ruby/object:Gem::Dependency
|
38
|
-
name:
|
40
|
+
name: rspec
|
39
41
|
prerelease: false
|
40
42
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
43
|
none: false
|
42
44
|
requirements:
|
43
45
|
- - ~>
|
44
46
|
- !ruby/object:Gem::Version
|
45
|
-
hash:
|
47
|
+
hash: 9
|
46
48
|
segments:
|
47
|
-
-
|
48
|
-
-
|
49
|
-
version: "
|
49
|
+
- 2
|
50
|
+
- 5
|
51
|
+
version: "2.5"
|
50
52
|
type: :development
|
51
53
|
version_requirements: *id002
|
52
54
|
- !ruby/object:Gem::Dependency
|
@@ -55,14 +57,13 @@ dependencies:
|
|
55
57
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
58
|
none: false
|
57
59
|
requirements:
|
58
|
-
- -
|
60
|
+
- - ~>
|
59
61
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
62
|
+
hash: 5
|
61
63
|
segments:
|
62
64
|
- 0
|
63
65
|
- 7
|
64
|
-
|
65
|
-
version: 0.7.0
|
66
|
+
version: "0.7"
|
66
67
|
type: :development
|
67
68
|
version_requirements: *id003
|
68
69
|
description: Implements the DataObjects API for MySQL
|
@@ -81,6 +82,8 @@ files:
|
|
81
82
|
- README.markdown
|
82
83
|
- Rakefile
|
83
84
|
- ext/do_mysql/compat.h
|
85
|
+
- ext/do_mysql/do_common.c
|
86
|
+
- ext/do_mysql/do_common.h
|
84
87
|
- ext/do_mysql/do_mysql.c
|
85
88
|
- ext/do_mysql/error.h
|
86
89
|
- ext/do_mysql/extconf.rb
|
@@ -115,13 +118,13 @@ files:
|
|
115
118
|
- tasks/retrieve.rake
|
116
119
|
- tasks/spec.rake
|
117
120
|
- tasks/ssl.rake
|
118
|
-
has_rdoc:
|
121
|
+
has_rdoc: true
|
119
122
|
homepage:
|
120
123
|
licenses: []
|
121
124
|
|
122
125
|
post_install_message:
|
123
|
-
rdoc_options:
|
124
|
-
|
126
|
+
rdoc_options: []
|
127
|
+
|
125
128
|
require_paths:
|
126
129
|
- lib
|
127
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|