do_mysql 0.10.0 → 0.10.1

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.
Files changed (41) 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/version.rb +1 -1
  11. data/spec/command_spec.rb +2 -2
  12. data/spec/connection_spec.rb +16 -14
  13. data/spec/encoding_spec.rb +2 -1
  14. data/spec/reader_spec.rb +1 -1
  15. data/spec/result_spec.rb +3 -3
  16. data/spec/spec_helper.rb +21 -31
  17. data/spec/typecast/array_spec.rb +1 -1
  18. data/spec/typecast/bigdecimal_spec.rb +2 -2
  19. data/spec/typecast/boolean_spec.rb +2 -2
  20. data/spec/typecast/byte_array_spec.rb +1 -1
  21. data/spec/typecast/class_spec.rb +1 -1
  22. data/spec/typecast/date_spec.rb +2 -2
  23. data/spec/typecast/datetime_spec.rb +2 -2
  24. data/spec/typecast/float_spec.rb +2 -2
  25. data/spec/typecast/integer_spec.rb +1 -1
  26. data/spec/typecast/nil_spec.rb +3 -3
  27. data/spec/typecast/other_spec.rb +8 -0
  28. data/spec/typecast/range_spec.rb +1 -1
  29. data/spec/typecast/string_spec.rb +1 -1
  30. data/spec/typecast/time_spec.rb +1 -1
  31. data/tasks/compile.rake +65 -0
  32. data/tasks/release.rake +12 -71
  33. data/tasks/retrieve.rake +1 -1
  34. data/tasks/spec.rake +19 -15
  35. metadata +50 -41
  36. data/HISTORY.markdown +0 -17
  37. data/Manifest.txt +0 -32
  38. data/spec/lib/rspec_immediate_feedback_formatter.rb +0 -3
  39. data/tasks/gem.rake +0 -8
  40. data/tasks/install.rake +0 -15
  41. data/tasks/native.rake +0 -31
@@ -1,75 +1,16 @@
1
- begin
2
- gem 'rubyforge', '~> 1.0.1'
3
- require 'rubyforge'
4
- rescue Exception
5
- nil
1
+ desc 'Builds all gems (native, binaries for JRuby and Windows)'
2
+ task :build_all do
3
+ `rake clean`
4
+ `rake build`
5
+ `rake java gem`
6
+ `rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1`
6
7
  end
7
8
 
8
- if defined?(RubyForge) then
9
- if defined?(GEM_SPEC) then
10
- desc 'Package and upload to RubyForge'
11
- task :release do |t|
12
- ver = ENV['VERSION'] or fail "Must supply VERSION (rake release VERSION=x.y.z)."
13
-
14
- # compare versions to avoid mistakes
15
- unless ver == GEM_SPEC.version.to_s then
16
- fail "Version mismatch (supplied and specification versions differ)."
17
- end
18
-
19
- # no rubyforge project? no release for you!
20
- if GEM_SPEC.rubyforge_project == 'TODO' or GEM_SPEC.rubyforge_project.nil? then
21
- fail "Must define rubyforge_project in your gem specification."
22
- end
23
-
24
- # instantiate a RubyForge object
25
- rf = RubyForge.new
26
-
27
- # read project info and overview
28
- notes = begin
29
- r = File.read("README.markdown")
30
- r.split(/^(.*\n\-+)/)[1..4].join.strip
31
- rescue
32
- warn "Missing README.markdown"
33
- ''
34
- end
35
-
36
- # read changes
37
- changes = begin
38
- h = File.read("HISTORY.markdown")
39
- h.split(/^(##+ .*)/)[1..2].join.strip
40
- rescue
41
- warn "Missing HISTORY.markdown"
42
- ''
43
- end
44
-
45
- # build the configuration for the release
46
- config = Hash.new
47
- config["release_notes"] = notes
48
- config["release_changes"] = changes
49
- config["preformatted"] = true
50
-
51
- # prepare configuration
52
- rf.configure config
53
-
54
- files = FileList["pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version}*.*"].to_a
55
- fail "No files found for the release." if files.empty?
56
-
57
- puts "Logging in RubyForge..."
58
- rf.login
59
-
60
- puts "Files to upload:"
61
- files.each do |f|
62
- puts " * #{f}"
63
- end
64
-
65
- puts "Releasing #{GEM_SPEC.name} version #{GEM_SPEC.version}..."
66
- rf.add_release GEM_SPEC.rubyforge_project, GEM_SPEC.name, GEM_SPEC.version, *files
67
- puts "Done."
68
- end
69
- #Rake::Task['release'].prerequisites.unshift('clean', 'cross', 'native')
70
- else
71
- warn "no GEM_SPEC is found or defined. 'release' task cannot work without it."
9
+ desc 'Release all gems (native, binaries for JRuby and Windows)'
10
+ task :release_all => :build_all do
11
+ Dir["pkg/do_mysql-#{DataObjects::Mysql::VERSION}*.gem"].each do |gem_path|
12
+ command = "gem push #{gem_path}"
13
+ puts "Executing #{command.inspect}:"
14
+ sh command
72
15
  end
73
- else
74
- warn "rubyforge gem is required to generate releases, please install it (gem install rubyforge)."
75
16
  end
@@ -1,5 +1,5 @@
1
1
  begin
2
- gem('rake-compiler')
2
+ gem 'rake-compiler', '~>0.7'
3
3
  require 'rake/clean'
4
4
  require 'rake/extensioncompiler'
5
5
 
@@ -1,19 +1,23 @@
1
- # Specs
2
- require 'spec/rake/spectask'
1
+ require 'rake/testtask'
3
2
 
4
- desc 'Run specifications'
5
- Spec::Rake::SpecTask.new(:spec => [ :clean, :compile ]) do |t|
6
- t.spec_opts << '--options' << ROOT + 'spec/spec.opts'
7
- t.spec_files = Pathname.glob(ENV['FILES'] || 'spec/**/*_spec.rb').map { |f| f.to_s }
8
- t.libs << 'lib'
3
+ spec_defaults = lambda do |spec|
4
+ spec.libs << 'lib' << 'spec'
5
+ spec.pattern = 'spec/**/*_spec.rb'
6
+ spec.verbose = true
7
+ end
8
+
9
+ Rake::TestTask.new(:spec => [ :clean, :compile ], &spec_defaults)
10
+ Rake::TestTask.new(:spec_no_compile, &spec_defaults)
9
11
 
10
- begin
11
- # RCov is run by default, except on the JRuby platform
12
- t.rcov = JRUBY ? false : (ENV.has_key?('NO_RCOV') ? ENV['NO_RCOV'] != 'true' : true)
13
- t.rcov_opts << '--exclude' << 'spec'
14
- t.rcov_opts << '--text-summary'
15
- t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
16
- rescue Exception
17
- # rcov not installed
12
+ begin
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'
18
22
  end
19
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dirkjan Bussink
@@ -9,66 +9,65 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-15 00:00:00 -07:00
12
+ date: 2010-01-09 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: addressable
16
+ name: data_objects
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ~>
21
+ - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: "2.0"
23
+ version: 0.10.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: extlib
27
- type: :runtime
26
+ name: bacon
27
+ type: :development
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.12
33
+ version: "1.1"
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
- name: data_objects
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - "="
42
- - !ruby/object:Gem::Version
43
- version: 0.10.0
44
- version:
45
- - !ruby/object:Gem::Dependency
46
- name: rspec
36
+ name: rake-compiler
47
37
  type: :development
48
38
  version_requirement:
49
39
  version_requirements: !ruby/object:Gem::Requirement
50
40
  requirements:
51
41
  - - ~>
52
42
  - !ruby/object:Gem::Version
53
- version: 1.2.0
43
+ version: "0.7"
54
44
  version:
55
45
  description: Implements the DataObjects API for MySQL
56
46
  email: d.bussink@gmail.com
57
47
  executables: []
58
48
 
59
49
  extensions:
60
- - ext/do_mysql_ext/extconf.rb
61
- extra_rdoc_files: []
62
-
50
+ - ext/do_mysql/extconf.rb
51
+ extra_rdoc_files:
52
+ - ChangeLog.markdown
53
+ - LICENSE
54
+ - README.markdown
63
55
  files:
56
+ - ChangeLog.markdown
57
+ - LICENSE
58
+ - README.markdown
59
+ - Rakefile
60
+ - ext/do_mysql/compat.h
61
+ - ext/do_mysql/do_mysql.c
62
+ - ext/do_mysql/error.h
63
+ - ext/do_mysql/extconf.rb
64
+ - lib/do_mysql.rb
64
65
  - lib/do_mysql/encoding.rb
65
66
  - lib/do_mysql/transaction.rb
66
67
  - lib/do_mysql/version.rb
67
- - lib/do_mysql.rb
68
68
  - spec/command_spec.rb
69
69
  - spec/connection_spec.rb
70
70
  - spec/encoding_spec.rb
71
- - spec/lib/rspec_immediate_feedback_formatter.rb
72
71
  - spec/reader_spec.rb
73
72
  - spec/result_spec.rb
74
73
  - spec/spec_helper.rb
@@ -82,31 +81,22 @@ files:
82
81
  - spec/typecast/float_spec.rb
83
82
  - spec/typecast/integer_spec.rb
84
83
  - spec/typecast/nil_spec.rb
84
+ - spec/typecast/other_spec.rb
85
85
  - spec/typecast/range_spec.rb
86
86
  - spec/typecast/string_spec.rb
87
87
  - spec/typecast/time_spec.rb
88
- - tasks/gem.rake
89
- - tasks/install.rake
90
- - tasks/native.rake
88
+ - tasks/compile.rake
91
89
  - tasks/release.rake
92
90
  - tasks/retrieve.rake
93
91
  - tasks/spec.rake
94
92
  - tasks/ssl.rake
95
- - ext/do_mysql_ext/extconf.rb
96
- - ext/do_mysql_ext/do_mysql_ext.c
97
- - ext/do_mysql_ext/error.h
98
- - LICENSE
99
- - Rakefile
100
- - HISTORY.markdown
101
- - README.markdown
102
- - Manifest.txt
103
93
  has_rdoc: false
104
- homepage: http://github.com/datamapper/do
94
+ homepage:
105
95
  licenses: []
106
96
 
107
97
  post_install_message:
108
- rdoc_options: []
109
-
98
+ rdoc_options:
99
+ - --charset=UTF-8
110
100
  require_paths:
111
101
  - lib
112
102
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -128,5 +118,24 @@ rubygems_version: 1.3.5
128
118
  signing_key:
129
119
  specification_version: 3
130
120
  summary: DataObjects MySQL Driver
131
- test_files: []
132
-
121
+ test_files:
122
+ - spec/command_spec.rb
123
+ - spec/connection_spec.rb
124
+ - spec/encoding_spec.rb
125
+ - spec/reader_spec.rb
126
+ - spec/result_spec.rb
127
+ - spec/spec_helper.rb
128
+ - spec/typecast/array_spec.rb
129
+ - spec/typecast/bigdecimal_spec.rb
130
+ - spec/typecast/boolean_spec.rb
131
+ - spec/typecast/byte_array_spec.rb
132
+ - spec/typecast/class_spec.rb
133
+ - spec/typecast/date_spec.rb
134
+ - spec/typecast/datetime_spec.rb
135
+ - spec/typecast/float_spec.rb
136
+ - spec/typecast/integer_spec.rb
137
+ - spec/typecast/nil_spec.rb
138
+ - spec/typecast/other_spec.rb
139
+ - spec/typecast/range_spec.rb
140
+ - spec/typecast/string_spec.rb
141
+ - spec/typecast/time_spec.rb
@@ -1,17 +0,0 @@
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]
@@ -1,32 +0,0 @@
1
- .gitignore
2
- HISTORY.markdown
3
- LICENSE
4
- Manifest.txt
5
- README.markdown
6
- Rakefile
7
- buildfile
8
- ext-java/src/main/java/DoMysqlExtService.java
9
- ext-java/src/main/java/do_mysql/MySqlDriverDefinition.java
10
- ext/.gitignore
11
- ext/do_mysql_ext/do_mysql_ext.c
12
- ext/do_mysql_ext/extconf.rb
13
- lib/do_mysql.rb
14
- lib/do_mysql/transaction.rb
15
- lib/do_mysql/version.rb
16
- spec/command_spec.rb
17
- spec/connection_spec.rb
18
- spec/reader_spec.rb
19
- spec/result_spec.rb
20
- spec/spec.opts
21
- spec/spec_helper.rb
22
- spec/typecast/bigdecimal_spec.rb
23
- spec/typecast/boolean_spec.rb
24
- spec/typecast/byte_array_spec.rb
25
- spec/typecast/class_spec.rb
26
- spec/typecast/date_spec.rb
27
- spec/typecast/datetime_spec.rb
28
- spec/typecast/float_spec.rb
29
- spec/typecast/integer_spec.rb
30
- spec/typecast/nil_spec.rb
31
- spec/typecast/string_spec.rb
32
- spec/typecast/time_spec.rb
@@ -1,3 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'data_objects', 'spec', 'lib', 'rspec_immediate_feedback_formatter'))
@@ -1,8 +0,0 @@
1
- require 'rubygems/package_task'
2
-
3
- GEM_SPEC = eval(File.read('do_mysql.gemspec'))
4
-
5
- gem_package = Gem::PackageTask.new(GEM_SPEC) do |pkg|
6
- pkg.need_tar = false
7
- pkg.need_zip = false
8
- end
@@ -1,15 +0,0 @@
1
- def sudo_gem(cmd)
2
- sh "#{SUDO} #{RUBY} -S gem #{cmd}", :verbose => false
3
- end
4
-
5
- # Installation
6
-
7
- desc "Install #{GEM_SPEC.name} #{GEM_SPEC.version}"
8
- task :install => [ :package ] do
9
- sudo_gem "install pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version} --no-update-sources"
10
- end
11
-
12
- desc "Uninstall #{GEM_SPEC.name} #{GEM_SPEC.version}"
13
- task :uninstall => [ :clean ] do
14
- sudo_gem "uninstall #{GEM_SPEC.name} -v#{GEM_SPEC.version} -I -x"
15
- end
@@ -1,31 +0,0 @@
1
- begin
2
- gem('rake-compiler')
3
- require 'rake/extensiontask'
4
-
5
- Rake::ExtensionTask.new('do_mysql_ext', GEM_SPEC) do |ext|
6
-
7
- mysql_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', "mysql-#{BINARY_VERSION}-win32"))
8
-
9
- # automatically add build options to avoid need of manual input
10
- if RUBY_PLATFORM =~ /mswin|mingw/ then
11
- ext.config_options << "--with-mysql-include=#{mysql_lib}/include"
12
- ext.config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
13
- else
14
- ext.cross_compile = true
15
- ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
16
- ext.cross_config_options << "--with-mysql-include=#{mysql_lib}/include"
17
- ext.cross_config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
18
- end
19
-
20
- end
21
- rescue LoadError
22
- warn "To cross-compile, install rake-compiler (gem install rake-compiler)"
23
-
24
- if (tasks_dir = ROOT.parent + 'tasks').directory?
25
- require tasks_dir + 'ext_helper'
26
- require tasks_dir + 'ext_helper_java'
27
-
28
- setup_c_extension("#{GEM_SPEC.name}_ext", GEM_SPEC)
29
- setup_java_extension("#{GEM_SPEC.name}_ext", GEM_SPEC)
30
- end
31
- end