do_mysql 0.10.6 → 0.10.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ## 0.10.7 2011-10-13
2
+
3
+ * Ruby 1.9.3 compatibility
4
+
1
5
  ## 0.10.6 2011-05-22
2
6
 
3
7
  Bugfixes
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'pathname'
2
2
  require 'rubygems'
3
3
  require 'bundler'
4
+ require 'rubygems/package_task'
4
5
  Bundler::GemHelper.install_tasks
5
6
 
6
7
  require 'rake'
@@ -185,11 +185,16 @@ VALUE data_objects_parse_date(const char *date) {
185
185
  return Qnil;
186
186
  }
187
187
 
188
+ #ifdef HAVE_NO_DATETIME_NEWBANG
189
+ return rb_funcall(rb_cDate, ID_NEW, 3, INT2NUM(year), INT2NUM(month), INT2NUM(day));
190
+ #else
191
+
188
192
  jd = data_objects_jd_from_date(year, month, day);
189
193
  ajd = (jd * 2) - 1; // Math from Date.jd_to_ajd
190
194
  rational = rb_funcall(rb_mKernel, ID_RATIONAL, 2, INT2NUM(ajd), INT2NUM(2));
191
195
 
192
196
  return rb_funcall(rb_cDate, ID_NEW_DATE, 3, rational, INT2NUM(0), INT2NUM(2299161));
197
+ #endif
193
198
  }
194
199
 
195
200
  VALUE data_objects_parse_time(const char *date) {
@@ -299,6 +304,11 @@ VALUE data_objects_parse_date_time(const char *date) {
299
304
  rb_raise(eDataError, "Couldn't parse date: %s", date);
300
305
  }
301
306
 
307
+ #ifdef HAVE_NO_DATETIME_NEWBANG
308
+ offset = data_objects_timezone_to_offset(hour_offset, minute_offset);
309
+ return rb_funcall(rb_cDateTime, ID_NEW, 7, INT2NUM(year), INT2NUM(month), INT2NUM(day),
310
+ INT2NUM(hour), INT2NUM(min), INT2NUM(sec), offset);
311
+ #else
302
312
  jd = data_objects_jd_from_date(year, month, day);
303
313
 
304
314
  /*
@@ -327,6 +337,7 @@ VALUE data_objects_parse_date_time(const char *date) {
327
337
  offset = data_objects_timezone_to_offset(hour_offset, minute_offset);
328
338
 
329
339
  return rb_funcall(rb_cDateTime, ID_NEW_DATE, 3, ajd, offset, INT2NUM(2299161));
340
+ #endif
330
341
  }
331
342
 
332
343
  VALUE data_objects_cConnection_character_set(VALUE self) {
@@ -1,6 +1,7 @@
1
1
  ENV["RC_ARCHS"] = "" if RUBY_PLATFORM =~ /darwin/
2
2
 
3
3
  require 'mkmf'
4
+ require 'date'
4
5
 
5
6
  # Allow for custom compiler to be specified.
6
7
  RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
@@ -81,6 +82,10 @@ have_func 'mysql_set_character_set', 'mysql.h'
81
82
  have_func 'mysql_get_server_version', 'mysql.h'
82
83
  have_struct_member 'MYSQL_FIELD', 'charsetnr', 'mysql.h'
83
84
 
85
+ unless DateTime.respond_to?(:new!)
86
+ $CFLAGS << ' -DHAVE_NO_DATETIME_NEWBANG'
87
+ end
88
+
84
89
  $CFLAGS << ' -Wall '
85
90
 
86
91
  if RUBY_VERSION < '1.8.6'
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Mysql
3
- VERSION = '0.10.6'
3
+ VERSION = '0.10.7'
4
4
  end
5
5
  end
@@ -56,7 +56,7 @@ begin
56
56
  ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
57
57
  ext.java_compiling do |gem|
58
58
  gem.add_dependency 'jdbc-mysql', '>=5.0.4'
59
- gem.add_dependency 'do_jdbc', '0.10.6'
59
+ gem.add_dependency 'do_jdbc', '0.10.7'
60
60
  end
61
61
  end
62
62
  rescue LoadError
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_mysql
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 6
10
- version: 0.10.6
9
+ - 7
10
+ version: 0.10.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dirkjan Bussink
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-29 00:00:00 +02:00
19
- default_executable:
18
+ date: 2011-03-29 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: data_objects
@@ -26,12 +25,12 @@ dependencies:
26
25
  requirements:
27
26
  - - "="
28
27
  - !ruby/object:Gem::Version
29
- hash: 59
28
+ hash: 57
30
29
  segments:
31
30
  - 0
32
31
  - 10
33
- - 6
34
- version: 0.10.6
32
+ - 7
33
+ version: 0.10.7
35
34
  type: :runtime
36
35
  version_requirements: *id001
37
36
  - !ruby/object:Gem::Dependency
@@ -116,7 +115,6 @@ files:
116
115
  - tasks/retrieve.rake
117
116
  - tasks/spec.rake
118
117
  - tasks/ssl.rake
119
- has_rdoc: true
120
118
  homepage:
121
119
  licenses: []
122
120
 
@@ -146,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
144
  requirements: []
147
145
 
148
146
  rubyforge_project: dorb
149
- rubygems_version: 1.5.2
147
+ rubygems_version: 1.8.6
150
148
  signing_key:
151
149
  specification_version: 3
152
150
  summary: DataObjects MySQL Driver