do_sqlite3 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,12 +1,9 @@
1
1
  require 'rubygems'
2
2
  require 'pathname'
3
3
  require 'bundler'
4
+ require 'rubygems/package_task'
4
5
  Bundler::GemHelper.install_tasks
5
6
 
6
- $: << '../do_mysql/lib'
7
-
8
- require 'do_mysql'
9
-
10
7
  require 'rake'
11
8
  require 'rake/clean'
12
9
 
@@ -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) {
@@ -2,6 +2,7 @@ ENV["RC_ARCHS"] = "" if RUBY_PLATFORM =~ /darwin/
2
2
 
3
3
  # Loads mkmf which is used to make makefiles for Ruby extensions
4
4
  require 'mkmf'
5
+ require 'date'
5
6
 
6
7
  # Allow for custom compiler to be specified.
7
8
  RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
@@ -16,6 +17,10 @@ if RUBY_VERSION < '1.8.6'
16
17
  $CFLAGS << ' -DRUBY_LESS_THAN_186'
17
18
  end
18
19
 
20
+ unless DateTime.respond_to?(:new!)
21
+ $CFLAGS << ' -DHAVE_NO_DATETIME_NEWBANG'
22
+ end
23
+
19
24
  # Do the work
20
25
  # create_makefile(extension_name)
21
26
  if have_header( "sqlite3.h" ) && have_library( "sqlite3", "sqlite3_open" )
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Sqlite3
3
- VERSION = '0.10.6'
3
+ VERSION = '0.10.7'
4
4
  end
5
5
  end
@@ -55,7 +55,7 @@ begin
55
55
  ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
56
56
  ext.java_compiling do |gem|
57
57
  gem.add_dependency 'jdbc-sqlite3', '>=3.5.8'
58
- gem.add_dependency 'do_jdbc', '0.10.6'
58
+ gem.add_dependency 'do_jdbc', '0.10.7'
59
59
  end
60
60
  end
61
61
  rescue LoadError
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_sqlite3
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
@@ -115,7 +114,6 @@ files:
115
114
  - tasks/release.rake
116
115
  - tasks/retrieve.rake
117
116
  - tasks/spec.rake
118
- has_rdoc: true
119
117
  homepage:
120
118
  licenses: []
121
119
 
@@ -145,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
143
  requirements: []
146
144
 
147
145
  rubyforge_project: dorb
148
- rubygems_version: 1.5.2
146
+ rubygems_version: 1.8.6
149
147
  signing_key:
150
148
  specification_version: 3
151
149
  summary: DataObjects Sqlite3 Driver