do_oracle 0.10.2-x86-mingw32 → 0.10.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.10.3 2011-01-30
2
+ * No changes
3
+
1
4
  ## 0.10.2 2010-05-19
2
5
  * Rework logging for making callbacks possible
3
6
 
data/Rakefile CHANGED
@@ -40,7 +40,7 @@ begin
40
40
  gem.add_dependency 'ruby-oci8', '~>2.0'
41
41
 
42
42
  gem.add_development_dependency 'bacon', '~>1.1'
43
- gem.add_development_dependency 'rake-compiler', '~>0.7'
43
+ gem.add_development_dependency 'rake-compiler', '= 0.7.0'
44
44
 
45
45
  gem.has_rdoc = false
46
46
  gem.rubyforge_project = 'dorb'
@@ -212,7 +212,7 @@ static VALUE parse_date(VALUE r_value) {
212
212
  } else if (rb_obj_class(r_value) == rb_cDateTime) {
213
213
  rational = rb_iv_get(r_value, "@ajd");
214
214
  return rb_funcall(rb_cDate, ID_NEW_DATE, 3, rational, INT2NUM(0), INT2NUM(2299161));
215
-
215
+
216
216
  } else {
217
217
  // Something went terribly wrong
218
218
  rb_raise(eDataError, "Couldn't parse date from class %s object", rb_obj_classname(r_value));
@@ -299,7 +299,7 @@ static VALUE parse_time(VALUE r_value) {
299
299
  } else {
300
300
  // Something went terribly wrong
301
301
  rb_raise(eDataError, "Couldn't parse time from class %s object", rb_obj_classname(r_value));
302
- }
302
+ }
303
303
  }
304
304
 
305
305
  static VALUE parse_boolean(VALUE r_value) {
@@ -318,7 +318,7 @@ static VALUE parse_boolean(VALUE r_value) {
318
318
 
319
319
  static VALUE infer_ruby_type(VALUE type, VALUE precision, VALUE scale) {
320
320
  ID type_id = SYM2ID(type);
321
-
321
+
322
322
  if (type_id == ID_NUMBER)
323
323
  return scale != Qnil && NUM2INT(scale) == 0 ?
324
324
  (NUM2INT(precision) == 1 ? rb_cTrueClass : rb_cInteger) : rb_cBigDecimal;
@@ -342,7 +342,7 @@ static VALUE infer_ruby_type(VALUE type, VALUE precision, VALUE scale) {
342
342
 
343
343
  static VALUE typecast(VALUE r_value, const VALUE type) {
344
344
  VALUE r_data;
345
-
345
+
346
346
  if (type == rb_cInteger) {
347
347
  return TYPE(r_value) == T_FIXNUM || TYPE(r_value) == T_BIGNUM ? r_value : rb_funcall(r_value, ID_TO_I, 0);
348
348
 
@@ -494,7 +494,7 @@ static VALUE cCommand_execute_internal(VALUE self, VALUE connection, VALUE sql,
494
494
  arg.cursor = rb_funcall(oci8_conn, ID_PARSE, 1, sql);
495
495
  arg.statement_type = rb_funcall(arg.cursor, ID_TYPE, 0);
496
496
  arg.args = args;
497
-
497
+
498
498
  return rb_ensure(cCommand_execute_try, (VALUE)&arg, cCommand_execute_ensure, (VALUE)&arg);
499
499
  }
500
500
 
@@ -506,7 +506,7 @@ static VALUE execute_sql(VALUE connection, VALUE sql) {
506
506
  static VALUE cCommand_execute_try(cCommand_execute_try_t *arg) {
507
507
  VALUE result = Qnil;
508
508
  int insert_id_present;
509
-
509
+
510
510
  // no arguments given
511
511
  if NIL_P(arg->args) {
512
512
  result = rb_funcall(arg->cursor, ID_EXEC, 0);
@@ -556,7 +556,7 @@ static VALUE cConnection_initialize(VALUE self, VALUE uri) {
556
556
  char *non_blocking = NULL;
557
557
  char *time_zone = NULL;
558
558
  char set_time_zone_command[80];
559
-
559
+
560
560
  char *host = "localhost", *port = "1521", *path = NULL;
561
561
  char *connect_string;
562
562
  int connect_string_length;
@@ -569,13 +569,13 @@ static VALUE cConnection_initialize(VALUE self, VALUE uri) {
569
569
  if ( Qnil != r_host && RSTRING_LEN(r_host) > 0) {
570
570
  host = StringValuePtr(r_host);
571
571
  }
572
-
572
+
573
573
  r_port = rb_funcall(uri, rb_intern("port"), 0);
574
574
  if ( Qnil != r_port ) {
575
575
  r_port = rb_funcall(r_port, ID_TO_S, 0);
576
576
  port = StringValuePtr(r_port);
577
577
  }
578
-
578
+
579
579
  r_path = rb_funcall(uri, rb_intern("path"), 0);
580
580
  if ( Qnil != r_path ) {
581
581
  path = StringValuePtr(r_path);
@@ -627,7 +627,7 @@ static VALUE cConnection_initialize(VALUE self, VALUE uri) {
627
627
  snprintf(set_time_zone_command, 80, "alter session set time_zone = '%s'", time_zone);
628
628
  execute_sql(self, RUBY_STRING(set_time_zone_command));
629
629
  }
630
-
630
+
631
631
  execute_sql(self, RUBY_STRING("alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS'"));
632
632
  execute_sql(self, RUBY_STRING("alter session set nls_timestamp_format = 'YYYY-MM-DD HH24:MI:SS.FF'"));
633
633
  execute_sql(self, RUBY_STRING("alter session set nls_timestamp_tz_format = 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM'"));
@@ -649,7 +649,7 @@ static VALUE cCommand_execute_reader(int argc, VALUE *argv[], VALUE self) {
649
649
  VALUE reader, query;
650
650
  VALUE field_names, field_types;
651
651
  VALUE column_metadata, column, column_name;
652
-
652
+
653
653
  int i;
654
654
  int field_count;
655
655
  int infer_types = 0;
@@ -660,7 +660,7 @@ static VALUE cCommand_execute_reader(int argc, VALUE *argv[], VALUE self) {
660
660
  rb_raise(eArgumentError, "\"%s\" is invalid SELECT query", StringValuePtr(query));
661
661
  }
662
662
 
663
- column_metadata = rb_funcall(cursor, ID_COLUMN_METADATA, 0);
663
+ column_metadata = rb_funcall(cursor, ID_COLUMN_METADATA, 0);
664
664
  field_count = RARRAY_LEN(column_metadata);
665
665
  // reduce field_count by 1 if RAW_RNUM_ is present as last column
666
666
  // (generated by DataMapper to simulate LIMIT and OFFSET)
@@ -734,7 +734,7 @@ static VALUE cReader_next(VALUE self) {
734
734
  VALUE value;
735
735
 
736
736
  VALUE fetch_result = rb_funcall(cursor, ID_FETCH, 0);
737
-
737
+
738
738
  if (Qnil == fetch_result) {
739
739
  rb_iv_set(self, "@values", Qnil);
740
740
  rb_iv_set(self, "@last_row", Qtrue);
@@ -782,7 +782,9 @@ static VALUE cReader_field_count(VALUE self) {
782
782
  void Init_do_oracle() {
783
783
  // rb_require("oci8");
784
784
  rb_require("date");
785
+ rb_require("rational");
785
786
  rb_require("bigdecimal");
787
+ rb_require("data_objects");
786
788
 
787
789
  // Get references classes needed for Date/Time parsing
788
790
  rb_cDate = CONST_GET(rb_mKernel, "Date");
@@ -826,16 +828,16 @@ void Init_do_oracle() {
826
828
  ID_TO_I = rb_intern("to_i");
827
829
  ID_TO_S = rb_intern("to_s");
828
830
  ID_TO_F = rb_intern("to_f");
829
-
831
+
830
832
  ID_UTC_OFFSET = rb_intern("utc_offset");
831
833
  ID_FULL_CONST_GET = rb_intern("full_const_get");
832
-
834
+
833
835
  ID_PARSE = rb_intern("parse");
834
836
  ID_FETCH = rb_intern("fetch");
835
837
  ID_TYPE = rb_intern("type");
836
838
  ID_EXECUTE = rb_intern("execute");
837
839
  ID_EXEC = rb_intern("exec");
838
-
840
+
839
841
  ID_SELECT_STMT = rb_intern("select_stmt");
840
842
  ID_COLUMN_METADATA = rb_intern("column_metadata");
841
843
  ID_PRECISION = rb_intern("precision");
@@ -843,10 +845,10 @@ void Init_do_oracle() {
843
845
  ID_BIND_PARAM = rb_intern("bind_param");
844
846
  ID_ELEM = rb_intern("[]");
845
847
  ID_READ = rb_intern("read");
846
-
848
+
847
849
  ID_CLOSE = rb_intern("close");
848
850
  ID_LOGOFF = rb_intern("logoff");
849
-
851
+
850
852
  // Get references to the Extlib module
851
853
  mExtlib = CONST_GET(rb_mKernel, "Extlib");
852
854
  rb_cByteArray = CONST_GET(mExtlib, "ByteArray");
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Oracle
3
- VERSION = '0.10.2'
3
+ VERSION = '0.10.3'
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -181,6 +181,10 @@ module DataObjectsSpecHelpers
181
181
  update widgets set release_timestamp = NULL where id = 9
182
182
  EOF
183
183
 
184
+ conn.create_command(<<-EOF).execute_non_query
185
+ update widgets set release_datetime = '2008-07-14 00:31:12' where id = 10
186
+ EOF
187
+
184
188
  conn.close
185
189
  $test_environment_setup_done = true
186
190
  end
data/tasks/compile.rake CHANGED
@@ -27,14 +27,14 @@ begin
27
27
  ext.lib_dir = "lib/#{gemspec.name}"
28
28
  ext.ext_dir = 'ext-java/src/main/java'
29
29
  ext.debug = ENV.has_key?('DO_JAVA_DEBUG') && ENV['DO_JAVA_DEBUG']
30
- ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
30
+ ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar:../jdbc_drivers/oracle/ojdbc5.jar'
31
31
  ext.java_compiling do |gem|
32
32
 
33
33
  # Hack: Unfortunately there is no way to remove a dependency in the
34
34
  # Gem::Specification API.
35
35
  gem.dependencies.delete_if { |d| d.name == 'ruby-oci8'}
36
36
 
37
- gem.add_dependency "do_jdbc", '0.10.2'
37
+ gem.add_dependency "do_jdbc", '0.10.3'
38
38
  end
39
39
  end
40
40
  rescue LoadError
data/tasks/release.rake CHANGED
@@ -3,7 +3,7 @@ task :build_all do
3
3
  `rake clean`
4
4
  `rake build`
5
5
  `rake java gem`
6
- `rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1`
6
+ `rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.2`
7
7
  end
8
8
 
9
9
  desc 'Release all gems (native, binaries for JRuby and Windows)'
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_oracle
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 49
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 10
8
- - 2
9
- version: 0.10.2
9
+ - 3
10
+ version: 0.10.3
10
11
  platform: x86-mingw32
11
12
  authors:
12
13
  - Raimonds Simanovskis
@@ -14,30 +15,34 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-19 00:00:00 +02:00
18
+ date: 2011-01-30 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: data_objects
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 49
27
30
  segments:
28
31
  - 0
29
32
  - 10
30
- - 2
31
- version: 0.10.2
33
+ - 3
34
+ version: 0.10.3
32
35
  type: :runtime
33
36
  version_requirements: *id001
34
37
  - !ruby/object:Gem::Dependency
35
38
  name: ruby-oci8
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ~>
40
44
  - !ruby/object:Gem::Version
45
+ hash: 3
41
46
  segments:
42
47
  - 2
43
48
  - 0
@@ -48,9 +53,11 @@ dependencies:
48
53
  name: bacon
49
54
  prerelease: false
50
55
  requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
51
57
  requirements:
52
58
  - - ~>
53
59
  - !ruby/object:Gem::Version
60
+ hash: 13
54
61
  segments:
55
62
  - 1
56
63
  - 1
@@ -61,13 +68,16 @@ dependencies:
61
68
  name: rake-compiler
62
69
  prerelease: false
63
70
  requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
64
72
  requirements:
65
- - - ~>
73
+ - - "="
66
74
  - !ruby/object:Gem::Version
75
+ hash: 3
67
76
  segments:
68
77
  - 0
69
78
  - 7
70
- version: "0.7"
79
+ - 0
80
+ version: 0.7.0
71
81
  type: :development
72
82
  version_requirements: *id004
73
83
  description: Implements the DataObjects API for Oracle
@@ -128,23 +138,27 @@ rdoc_options:
128
138
  require_paths:
129
139
  - lib
130
140
  required_ruby_version: !ruby/object:Gem::Requirement
141
+ none: false
131
142
  requirements:
132
143
  - - ">="
133
144
  - !ruby/object:Gem::Version
145
+ hash: 3
134
146
  segments:
135
147
  - 0
136
148
  version: "0"
137
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
+ none: false
138
151
  requirements:
139
152
  - - ">="
140
153
  - !ruby/object:Gem::Version
154
+ hash: 3
141
155
  segments:
142
156
  - 0
143
157
  version: "0"
144
158
  requirements: []
145
159
 
146
160
  rubyforge_project: dorb
147
- rubygems_version: 1.3.6
161
+ rubygems_version: 1.3.7
148
162
  signing_key:
149
163
  specification_version: 3
150
164
  summary: DataObjects Oracle Driver