do_postgres 0.10.5-x86-mingw32 → 0.10.6-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,8 @@
1
+ ## 0.10.6 2011-05-22
2
+
3
+ Bugfixes
4
+ * Fix an issue on some platforms when multiple DO drivers are loaded
5
+
1
6
  ## 0.10.5 2011-05-03
2
7
 
3
8
  No changes
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'pathname'
2
+ require 'rubygems'
2
3
  require 'bundler'
3
4
  Bundler::GemHelper.install_tasks
4
5
 
@@ -45,6 +45,11 @@ VALUE rb_cBigDecimal;
45
45
  * Common Functions
46
46
  */
47
47
 
48
+
49
+ VALUE data_objects_const_get(VALUE scope, const char *constant) {
50
+ return rb_funcall(scope, ID_CONST_GET, 1, rb_str_new2(constant));
51
+ }
52
+
48
53
  void data_objects_debug(VALUE connection, VALUE string, struct timeval *start) {
49
54
  struct timeval stop;
50
55
  VALUE message;
@@ -57,7 +62,7 @@ void data_objects_debug(VALUE connection, VALUE string, struct timeval *start) {
57
62
  rb_funcall(connection, ID_LOG, 1, message);
58
63
  }
59
64
 
60
- void do_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state) {
65
+ void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state) {
61
66
  const char *exception_type = "SQLError";
62
67
  const struct errcodes *e;
63
68
 
@@ -72,7 +77,7 @@ void do_raise_error(VALUE self, const struct errcodes *errors, int errnum, const
72
77
  VALUE uri = rb_funcall(rb_iv_get(self, "@connection"), rb_intern("to_s"), 0);
73
78
 
74
79
  VALUE exception = rb_funcall(
75
- do_const_get(mDO, exception_type),
80
+ data_objects_const_get(mDO, exception_type),
76
81
  ID_NEW,
77
82
  5,
78
83
  rb_str_new2(message),
@@ -85,7 +90,7 @@ void do_raise_error(VALUE self, const struct errcodes *errors, int errnum, const
85
90
  rb_exc_raise(exception);
86
91
  }
87
92
 
88
- char *get_uri_option(VALUE query_hash, const char *key) {
93
+ char *data_objects_get_uri_option(VALUE query_hash, const char *key) {
89
94
  VALUE query_value;
90
95
  char *value = NULL;
91
96
 
@@ -102,7 +107,7 @@ char *get_uri_option(VALUE query_hash, const char *key) {
102
107
  return value;
103
108
  }
104
109
 
105
- void assert_file_exists(char *file, const char *message) {
110
+ void data_objects_assert_file_exists(char *file, const char *message) {
106
111
  if (file) {
107
112
  if (rb_funcall(rb_cFile, rb_intern("exist?"), 1, rb_str_new2(file)) == Qfalse) {
108
113
  rb_raise(rb_eArgError, "%s", message);
@@ -110,7 +115,7 @@ void assert_file_exists(char *file, const char *message) {
110
115
  }
111
116
  }
112
117
 
113
- VALUE build_query_from_args(VALUE klass, int count, VALUE *args) {
118
+ VALUE data_objects_build_query_from_args(VALUE klass, int count, VALUE *args) {
114
119
  VALUE array = rb_ary_new();
115
120
  int i;
116
121
 
@@ -123,7 +128,7 @@ VALUE build_query_from_args(VALUE klass, int count, VALUE *args) {
123
128
 
124
129
  // Find the greatest common denominator and reduce the provided numerator and denominator.
125
130
  // This replaces calles to Rational.reduce! which does the same thing, but really slowly.
126
- void reduce(do_int64 *numerator, do_int64 *denominator) {
131
+ void data_objects_reduce(do_int64 *numerator, do_int64 *denominator) {
127
132
  do_int64 a = *numerator, b = *denominator, c;
128
133
 
129
134
  while (a != 0) {
@@ -137,7 +142,7 @@ void reduce(do_int64 *numerator, do_int64 *denominator) {
137
142
  }
138
143
 
139
144
  // Generate the date integer which Date.civil_to_jd returns
140
- int jd_from_date(int year, int month, int day) {
145
+ int data_objects_jd_from_date(int year, int month, int day) {
141
146
  int a, b;
142
147
 
143
148
  if (month <= 2) {
@@ -151,24 +156,24 @@ int jd_from_date(int year, int month, int day) {
151
156
  return (int)(floor(365.25 * (year + 4716)) + floor(30.6001 * (month + 1)) + day + b - 1524);
152
157
  }
153
158
 
154
- VALUE seconds_to_offset(long seconds_offset) {
159
+ VALUE data_objects_seconds_to_offset(long seconds_offset) {
155
160
  do_int64 num = seconds_offset;
156
161
  do_int64 den = 86400;
157
162
 
158
- reduce(&num, &den);
163
+ data_objects_reduce(&num, &den);
159
164
  return rb_funcall(rb_mKernel, ID_RATIONAL, 2, rb_ll2inum(num), rb_ll2inum(den));
160
165
  }
161
166
 
162
- VALUE timezone_to_offset(int hour_offset, int minute_offset) {
167
+ VALUE data_objects_timezone_to_offset(int hour_offset, int minute_offset) {
163
168
  do_int64 seconds = 0;
164
169
 
165
170
  seconds += hour_offset * 3600;
166
171
  seconds += minute_offset * 60;
167
172
 
168
- return seconds_to_offset(seconds);
173
+ return data_objects_seconds_to_offset(seconds);
169
174
  }
170
175
 
171
- VALUE parse_date(const char *date) {
176
+ VALUE data_objects_parse_date(const char *date) {
172
177
  static char const *const _fmt_date = "%4d-%2d-%2d";
173
178
  int year = 0, month = 0, day = 0;
174
179
  int jd, ajd;
@@ -180,14 +185,14 @@ VALUE parse_date(const char *date) {
180
185
  return Qnil;
181
186
  }
182
187
 
183
- jd = jd_from_date(year, month, day);
188
+ jd = data_objects_jd_from_date(year, month, day);
184
189
  ajd = (jd * 2) - 1; // Math from Date.jd_to_ajd
185
190
  rational = rb_funcall(rb_mKernel, ID_RATIONAL, 2, INT2NUM(ajd), INT2NUM(2));
186
191
 
187
192
  return rb_funcall(rb_cDate, ID_NEW_DATE, 3, rational, INT2NUM(0), INT2NUM(2299161));
188
193
  }
189
194
 
190
- VALUE parse_time(const char *date) {
195
+ VALUE data_objects_parse_time(const char *date) {
191
196
  static char const* const _fmt_datetime = "%4d-%2d-%2d %2d:%2d:%2d%7lf";
192
197
  int year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0, usec = 0;
193
198
  double subsec = 0;
@@ -208,7 +213,7 @@ VALUE parse_time(const char *date) {
208
213
  return rb_funcall(rb_cTime, rb_intern("local"), 7, INT2NUM(year), INT2NUM(month), INT2NUM(day), INT2NUM(hour), INT2NUM(min), INT2NUM(sec), INT2NUM(usec));
209
214
  }
210
215
 
211
- VALUE parse_date_time(const char *date) {
216
+ VALUE data_objects_parse_date_time(const char *date) {
212
217
  static char const* const _fmt_datetime_tz_normal = "%4d-%2d-%2d%*c%2d:%2d:%2d%3d:%2d";
213
218
  static char const* const _fmt_datetime_tz_subsec = "%4d-%2d-%2d%*c%2d:%2d:%2d.%*d%3d:%2d";
214
219
  int tokens_read;
@@ -294,7 +299,7 @@ VALUE parse_date_time(const char *date) {
294
299
  rb_raise(eDataError, "Couldn't parse date: %s", date);
295
300
  }
296
301
 
297
- jd = jd_from_date(year, month, day);
302
+ jd = data_objects_jd_from_date(year, month, day);
298
303
 
299
304
  /*
300
305
  * Generate ajd with fractional days for the time.
@@ -306,47 +311,47 @@ VALUE parse_date_time(const char *date) {
306
311
  num = (hour * 1440) + (min * 24);
307
312
  num -= (hour_offset * 1440) + (minute_offset * 24);
308
313
  den = (24 * 1440);
309
- reduce(&num, &den);
314
+ data_objects_reduce(&num, &den);
310
315
 
311
316
  num = (num * 86400) + (sec * den);
312
317
  den = den * 86400;
313
- reduce(&num, &den);
318
+ data_objects_reduce(&num, &den);
314
319
 
315
320
  num += jd * den;
316
321
 
317
322
  num = (num * 2) - den;
318
323
  den *= 2;
319
- reduce(&num, &den);
324
+ data_objects_reduce(&num, &den);
320
325
 
321
326
  ajd = rb_funcall(rb_mKernel, ID_RATIONAL, 2, rb_ull2inum(num), rb_ull2inum(den));
322
- offset = timezone_to_offset(hour_offset, minute_offset);
327
+ offset = data_objects_timezone_to_offset(hour_offset, minute_offset);
323
328
 
324
329
  return rb_funcall(rb_cDateTime, ID_NEW_DATE, 3, ajd, offset, INT2NUM(2299161));
325
330
  }
326
331
 
327
- VALUE cConnection_character_set(VALUE self) {
332
+ VALUE data_objects_cConnection_character_set(VALUE self) {
328
333
  return rb_iv_get(self, "@encoding");
329
334
  }
330
335
 
331
- VALUE cConnection_is_using_socket(VALUE self) {
336
+ VALUE data_objects_cConnection_is_using_socket(VALUE self) {
332
337
  return rb_iv_get(self, "@using_socket");
333
338
  }
334
339
 
335
- VALUE cConnection_ssl_cipher(VALUE self) {
340
+ VALUE data_objects_cConnection_ssl_cipher(VALUE self) {
336
341
  return rb_iv_get(self, "@ssl_cipher");
337
342
  }
338
343
 
339
- VALUE cConnection_quote_time(VALUE self, VALUE value) {
344
+ VALUE data_objects_cConnection_quote_time(VALUE self, VALUE value) {
340
345
  return rb_funcall(value, ID_STRFTIME, 1, rb_str_new2("'%Y-%m-%d %H:%M:%S'"));
341
346
  }
342
347
 
343
- VALUE cConnection_quote_date_time(VALUE self, VALUE value) {
348
+ VALUE data_objects_cConnection_quote_date_time(VALUE self, VALUE value) {
344
349
  // TODO: Support non-local dates. we need to call #new_offset on the date to be
345
350
  // quoted and pass in the current locale's date offset (self.new_offset((hours * 3600).to_r / 86400)
346
351
  return rb_funcall(value, ID_STRFTIME, 1, rb_str_new2("'%Y-%m-%d %H:%M:%S'"));
347
352
  }
348
353
 
349
- VALUE cConnection_quote_date(VALUE self, VALUE value) {
354
+ VALUE data_objects_cConnection_quote_date(VALUE self, VALUE value) {
350
355
  return rb_funcall(value, ID_STRFTIME, 1, rb_str_new2("'%Y-%m-%d'"));
351
356
  }
352
357
 
@@ -354,7 +359,7 @@ VALUE cConnection_quote_date(VALUE self, VALUE value) {
354
359
  * Accepts an array of Ruby types (Fixnum, Float, String, etc...) and turns them
355
360
  * into Ruby-strings so we can easily typecast later
356
361
  */
357
- VALUE cCommand_set_types(int argc, VALUE *argv, VALUE self) {
362
+ VALUE data_objects_cCommand_set_types(int argc, VALUE *argv, VALUE self) {
358
363
  VALUE type_strings = rb_ary_new();
359
364
  VALUE array = rb_ary_new();
360
365
 
@@ -393,7 +398,7 @@ VALUE cCommand_set_types(int argc, VALUE *argv, VALUE self) {
393
398
  return array;
394
399
  }
395
400
 
396
- VALUE cReader_values(VALUE self) {
401
+ VALUE data_objects_cReader_values(VALUE self) {
397
402
  VALUE state = rb_iv_get(self, "@opened");
398
403
  VALUE values = rb_iv_get(self, "@values");
399
404
 
@@ -404,27 +409,27 @@ VALUE cReader_values(VALUE self) {
404
409
  return rb_iv_get(self, "@values");
405
410
  }
406
411
 
407
- VALUE cReader_fields(VALUE self) {
412
+ VALUE data_objects_cReader_fields(VALUE self) {
408
413
  return rb_iv_get(self, "@fields");
409
414
  }
410
415
 
411
- VALUE cReader_field_count(VALUE self) {
416
+ VALUE data_objects_cReader_field_count(VALUE self) {
412
417
  return rb_iv_get(self, "@field_count");
413
418
  }
414
419
 
415
- void common_init(void) {
420
+ void data_objects_common_init(void) {
416
421
  rb_require("bigdecimal");
417
422
  rb_require("rational");
418
423
  rb_require("date");
419
424
  rb_require("data_objects");
420
425
 
421
- // Needed by do_const_get
426
+ // Needed by data_objects_const_get
422
427
  ID_CONST_GET = rb_intern("const_get");
423
428
 
424
429
  // Get references classes needed for Date/Time parsing
425
- rb_cDate = do_const_get(rb_mKernel, "Date");
426
- rb_cDateTime = do_const_get(rb_mKernel, "DateTime");
427
- rb_cBigDecimal = do_const_get(rb_mKernel, "BigDecimal");
430
+ rb_cDate = data_objects_const_get(rb_mKernel, "Date");
431
+ rb_cDateTime = data_objects_const_get(rb_mKernel, "DateTime");
432
+ rb_cBigDecimal = data_objects_const_get(rb_mKernel, "BigDecimal");
428
433
 
429
434
  ID_NEW = rb_intern("new");
430
435
  #ifdef RUBY_LESS_THAN_186
@@ -439,22 +444,22 @@ void common_init(void) {
439
444
  ID_LOG = rb_intern("log");
440
445
 
441
446
  // Get references to the Extlib module
442
- mExtlib = do_const_get(rb_mKernel, "Extlib");
443
- rb_cByteArray = do_const_get(mExtlib, "ByteArray");
447
+ mExtlib = data_objects_const_get(rb_mKernel, "Extlib");
448
+ rb_cByteArray = data_objects_const_get(mExtlib, "ByteArray");
444
449
 
445
450
  // Get references to the DataObjects module and its classes
446
- mDO = do_const_get(rb_mKernel, "DataObjects");
447
- cDO_Quoting = do_const_get(mDO, "Quoting");
448
- cDO_Connection = do_const_get(mDO, "Connection");
449
- cDO_Command = do_const_get(mDO, "Command");
450
- cDO_Result = do_const_get(mDO, "Result");
451
- cDO_Reader = do_const_get(mDO, "Reader");
452
- cDO_Logger = do_const_get(mDO, "Logger");
453
- cDO_Logger_Message = do_const_get(cDO_Logger, "Message");
454
- cDO_Extension = do_const_get(mDO, "Extension");
455
-
456
- eConnectionError = do_const_get(mDO, "ConnectionError");
457
- eDataError = do_const_get(mDO, "DataError");
451
+ mDO = data_objects_const_get(rb_mKernel, "DataObjects");
452
+ cDO_Quoting = data_objects_const_get(mDO, "Quoting");
453
+ cDO_Connection = data_objects_const_get(mDO, "Connection");
454
+ cDO_Command = data_objects_const_get(mDO, "Command");
455
+ cDO_Result = data_objects_const_get(mDO, "Result");
456
+ cDO_Reader = data_objects_const_get(mDO, "Reader");
457
+ cDO_Logger = data_objects_const_get(mDO, "Logger");
458
+ cDO_Logger_Message = data_objects_const_get(cDO_Logger, "Message");
459
+ cDO_Extension = data_objects_const_get(mDO, "Extension");
460
+
461
+ eConnectionError = data_objects_const_get(mDO, "ConnectionError");
462
+ eDataError = data_objects_const_get(mDO, "DataError");
458
463
 
459
464
  rb_global_variable(&ID_NEW_DATE);
460
465
  rb_global_variable(&ID_RATIONAL);
@@ -480,7 +485,7 @@ void common_init(void) {
480
485
  /*
481
486
  * Common typecasting logic that can be used or overriden by Adapters.
482
487
  */
483
- extern VALUE do_typecast(const char *value, long length, const VALUE type, int encoding) {
488
+ extern VALUE data_objects_typecast(const char *value, long length, const VALUE type, int encoding) {
484
489
  #ifdef HAVE_RUBY_ENCODING_H
485
490
  rb_encoding *internal_encoding = rb_default_internal_encoding();
486
491
  #else
@@ -491,7 +496,7 @@ extern VALUE do_typecast(const char *value, long length, const VALUE type, int e
491
496
  return rb_cstr2inum(value, 10);
492
497
  }
493
498
  else if (type == rb_cString) {
494
- return do_str_new(value, length, encoding, internal_encoding);
499
+ return DATA_OBJECTS_STR_NEW(value, length, encoding, internal_encoding);
495
500
  }
496
501
  else if (type == rb_cFloat) {
497
502
  return rb_float_new(rb_cstr_to_dbl(value, Qfalse));
@@ -500,13 +505,13 @@ extern VALUE do_typecast(const char *value, long length, const VALUE type, int e
500
505
  return rb_funcall(rb_cBigDecimal, ID_NEW, 1, rb_str_new(value, length));
501
506
  }
502
507
  else if (type == rb_cDate) {
503
- return parse_date(value);
508
+ return data_objects_parse_date(value);
504
509
  }
505
510
  else if (type == rb_cDateTime) {
506
- return parse_date_time(value);
511
+ return data_objects_parse_date_time(value);
507
512
  }
508
513
  else if (type == rb_cTime) {
509
- return parse_time(value);
514
+ return data_objects_parse_time(value);
510
515
  }
511
516
  else if (type == rb_cTrueClass) {
512
517
  return (!value || strcmp("0", value) == 0) ? Qfalse : Qtrue;
@@ -521,6 +526,6 @@ extern VALUE do_typecast(const char *value, long length, const VALUE type, int e
521
526
  return Qnil;
522
527
  }
523
528
  else {
524
- return DO_STR_NEW(value, length, encoding, internal_encoding);
529
+ return DATA_OBJECTS_STR_NEW(value, length, encoding, internal_encoding);
525
530
  }
526
531
  }
@@ -3,18 +3,24 @@
3
3
 
4
4
  #include <ruby.h>
5
5
 
6
+ // Needed for defining error.h
7
+ struct errcodes {
8
+ int error_no;
9
+ const char *error_name;
10
+ const char *exception;
11
+ };
12
+
13
+ #define ERRCODE(name,message) {name, #name, message}
14
+
6
15
  #ifdef _WIN32
7
- #define cCommand_execute cCommand_execute_sync
8
16
  typedef signed __int64 do_int64;
9
17
  #else
10
- #define cCommand_execute cCommand_execute_async
11
18
  typedef signed long long int do_int64;
12
19
  #endif
13
20
 
14
21
  #ifdef HAVE_RUBY_ENCODING_H
15
22
  #include <ruby/encoding.h>
16
-
17
- #define DO_STR_NEW2(str, encoding, internal_encoding) \
23
+ #define DATA_OBJECTS_STR_NEW2(str, encoding, internal_encoding) \
18
24
  ({ \
19
25
  VALUE _string = rb_str_new2((const char *)str); \
20
26
  if(encoding != -1) { \
@@ -26,7 +32,7 @@ typedef signed long long int do_int64;
26
32
  _string; \
27
33
  })
28
34
 
29
- #define DO_STR_NEW(str, len, encoding, internal_encoding) \
35
+ #define DATA_OBJECTS_STR_NEW(str, len, encoding, internal_encoding) \
30
36
  ({ \
31
37
  VALUE _string = rb_str_new((const char *)str, (long)len); \
32
38
  if(encoding != -1) { \
@@ -38,24 +44,15 @@ typedef signed long long int do_int64;
38
44
  _string; \
39
45
  })
40
46
 
41
- # else
47
+ #else
42
48
 
43
- #define DO_STR_NEW2(str, encoding, internal_encoding) \
49
+ #define DATA_OBJECTS_STR_NEW2(str, encoding, internal_encoding) \
44
50
  rb_str_new2((const char *)str)
45
51
 
46
- #define DO_STR_NEW(str, len, encoding, internal_encoding) \
52
+ #define DATA_OBJECTS_STR_NEW(str, len, encoding, internal_encoding) \
47
53
  rb_str_new((const char *)str, (long)len)
48
54
  #endif
49
55
 
50
- // Needed for defining error.h
51
- struct errcodes {
52
- int error_no;
53
- const char *error_name;
54
- const char *exception;
55
- };
56
-
57
- #define ERRCODE(name,message) {name, #name, message}
58
-
59
56
  // To store rb_intern values
60
57
  extern ID ID_NEW;
61
58
  extern ID ID_NEW_DATE;
@@ -89,71 +86,37 @@ extern VALUE rb_cDateTime;
89
86
  extern VALUE rb_cBigDecimal;
90
87
 
91
88
  extern void data_objects_debug(VALUE connection, VALUE string, struct timeval *start);
92
- extern char *get_uri_option(VALUE query_hash, const char *key);
93
- extern void assert_file_exists(char *file, const char *message);
94
- extern VALUE build_query_from_args(VALUE klass, int count, VALUE *args);
95
-
96
- extern void reduce(do_int64 *numerator, do_int64 *denominator);
97
- extern int jd_from_date(int year, int month, int day);
98
- extern VALUE seconds_to_offset(long seconds_offset);
99
- extern VALUE timezone_to_offset(int hour_offset, int minute_offset);
100
-
101
- extern VALUE parse_date(const char *date);
102
- extern VALUE parse_time(const char *date);
103
- extern VALUE parse_date_time(const char *date);
104
-
105
- extern VALUE cConnection_character_set(VALUE self);
106
- extern VALUE cConnection_is_using_socket(VALUE self);
107
- extern VALUE cConnection_ssl_cipher(VALUE self);
108
- extern VALUE cConnection_quote_time(VALUE self, VALUE value);
109
- extern VALUE cConnection_quote_date_time(VALUE self, VALUE value);
110
- extern VALUE cConnection_quote_date(VALUE self, VALUE value);
111
-
112
- extern VALUE cCommand_set_types(int argc, VALUE *argv, VALUE self);
113
-
114
- extern VALUE cReader_values(VALUE self);
115
- extern VALUE cReader_fields(VALUE self);
116
- extern VALUE cReader_field_count(VALUE self);
117
-
118
- extern void common_init(void);
119
-
120
- static inline VALUE do_const_get(VALUE scope, const char *constant) {
121
- return rb_funcall(scope, ID_CONST_GET, 1, rb_str_new2(constant));
122
- }
89
+ extern char *data_objects_get_uri_option(VALUE query_hash, const char *key);
90
+ extern void data_objects_assert_file_exists(char *file, const char *message);
91
+ extern VALUE data_objects_build_query_from_args(VALUE klass, int count, VALUE *args);
123
92
 
124
- static inline VALUE do_str_new(const void *string, long length, int encoding, void *internal_encoding) {
125
- VALUE new_string = rb_str_new(string, length);
93
+ extern void data_objects_reduce(do_int64 *numerator, do_int64 *denominator);
94
+ extern int data_objects_jd_from_date(int year, int month, int day);
95
+ extern VALUE data_objects_seconds_to_offset(long seconds_offset);
96
+ extern VALUE data_objects_timezone_to_offset(int hour_offset, int minute_offset);
126
97
 
127
- #ifdef HAVE_RUBY_ENCODING_H
128
- if(encoding != -1) {
129
- rb_enc_associate_index(new_string, encoding);
130
- }
98
+ extern VALUE data_objects_parse_date(const char *date);
99
+ extern VALUE data_objects_parse_time(const char *date);
100
+ extern VALUE data_objects_parse_date_time(const char *date);
131
101
 
132
- if(internal_encoding) {
133
- new_string = rb_str_export_to_enc(new_string, internal_encoding);
134
- }
135
- #endif
102
+ extern VALUE data_objects_cConnection_character_set(VALUE self);
103
+ extern VALUE data_objects_cConnection_is_using_socket(VALUE self);
104
+ extern VALUE data_objects_cConnection_ssl_cipher(VALUE self);
105
+ extern VALUE data_objects_cConnection_quote_time(VALUE self, VALUE value);
106
+ extern VALUE data_objects_cConnection_quote_date_time(VALUE self, VALUE value);
107
+ extern VALUE data_objects_cConnection_quote_date(VALUE self, VALUE value);
136
108
 
137
- return new_string;
138
- }
109
+ extern VALUE data_objects_cCommand_set_types(int argc, VALUE *argv, VALUE self);
139
110
 
140
- static inline VALUE do_str_new2(const void *string, int encoding, void *internal_encoding) {
141
- VALUE new_string = rb_str_new2(string);
111
+ extern VALUE data_objects_cReader_values(VALUE self);
112
+ extern VALUE data_objects_cReader_fields(VALUE self);
113
+ extern VALUE data_objects_cReader_field_count(VALUE self);
142
114
 
143
- #ifdef HAVE_RUBY_ENCODING_H
144
- if(encoding != -1) {
145
- rb_enc_associate_index(new_string, encoding);
146
- }
147
-
148
- if(internal_encoding) {
149
- new_string = rb_str_export_to_enc(new_string, internal_encoding);
150
- }
151
- #endif
115
+ extern void data_objects_common_init(void);
152
116
 
153
- return new_string;
154
- }
117
+ extern VALUE data_objects_const_get(VALUE scope, const char *constant);
155
118
 
156
- static inline void do_define_errors(VALUE scope, const struct errcodes *errors) {
119
+ static inline void data_objects_define_errors(VALUE scope, const struct errcodes *errors) {
157
120
  const struct errcodes *e;
158
121
 
159
122
  for (e = errors; e->error_name; e++) {
@@ -161,9 +124,9 @@ static inline void do_define_errors(VALUE scope, const struct errcodes *errors)
161
124
  }
162
125
  }
163
126
 
164
- extern void do_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state);
127
+ extern void data_objects_raise_error(VALUE self, const struct errcodes *errors, int errnum, const char *message, VALUE query, VALUE state);
165
128
 
166
- extern VALUE do_typecast(const char *value, long length, const VALUE type, int encoding);
129
+ extern VALUE data_objects_typecast(const char *value, long length, const VALUE type, int encoding);
167
130
 
168
131
  #define RSTRING_NOT_MODIFIED
169
132
 
@@ -25,6 +25,13 @@
25
25
  #undef printf
26
26
  #endif
27
27
 
28
+ #ifdef _WIN32
29
+ #define do_postgres_cCommand_execute do_postgres_cCommand_execute_sync
30
+ #else
31
+ #define do_postgres_cCommand_execute do_postgres_cCommand_execute_async
32
+ #endif
33
+
34
+
28
35
  #include <ruby.h>
29
36
  #include <string.h>
30
37
  #include <math.h>
@@ -37,16 +44,16 @@
37
44
 
38
45
  VALUE mPostgres;
39
46
  VALUE mEncoding;
40
- VALUE cConnection;
41
- VALUE cCommand;
42
- VALUE cResult;
43
- VALUE cReader;
47
+ VALUE cPostgresConnection;
48
+ VALUE cPostgresCommand;
49
+ VALUE cPostgresResult;
50
+ VALUE cPostgresReader;
44
51
 
45
- void full_connect(VALUE self, PGconn *db);
52
+ void do_postgres_full_connect(VALUE self, PGconn *db);
46
53
 
47
54
  /* ===== Typecasting Functions ===== */
48
55
 
49
- VALUE infer_ruby_type(Oid type) {
56
+ VALUE do_postgres_infer_ruby_type(Oid type) {
50
57
  switch(type) {
51
58
  case BITOID:
52
59
  case VARBITOID:
@@ -74,7 +81,7 @@ VALUE infer_ruby_type(Oid type) {
74
81
  }
75
82
  }
76
83
 
77
- VALUE typecast(const char *value, long length, const VALUE type, int encoding) {
84
+ VALUE do_postgres_typecast(const char *value, long length, const VALUE type, int encoding) {
78
85
  if (type == rb_cTrueClass) {
79
86
  return *value == 't' ? Qtrue : Qfalse;
80
87
  }
@@ -87,23 +94,23 @@ VALUE typecast(const char *value, long length, const VALUE type, int encoding) {
87
94
  return byte_array;
88
95
  }
89
96
  else {
90
- return do_typecast(value, length, type, encoding);
97
+ return data_objects_typecast(value, length, type, encoding);
91
98
  }
92
99
  }
93
100
 
94
- void raise_error(VALUE self, PGresult *result, VALUE query) {
101
+ void do_postgres_raise_error(VALUE self, PGresult *result, VALUE query) {
95
102
  const char *message = PQresultErrorMessage(result);
96
103
  char *sql_state = PQresultErrorField(result, PG_DIAG_SQLSTATE);
97
104
  int postgres_errno = MAKE_SQLSTATE(sql_state[0], sql_state[1], sql_state[2], sql_state[3], sql_state[4]);
98
105
 
99
106
  PQclear(result);
100
107
 
101
- do_raise_error(self, errors, postgres_errno, message, query, rb_str_new2(sql_state));
108
+ data_objects_raise_error(self, do_postgres_errors, postgres_errno, message, query, rb_str_new2(sql_state));
102
109
  }
103
110
 
104
111
  /* ====== Public API ======= */
105
112
 
106
- VALUE cConnection_dispose(VALUE self) {
113
+ VALUE do_postgres_cConnection_dispose(VALUE self) {
107
114
  VALUE connection_container = rb_iv_get(self, "@connection");
108
115
 
109
116
  if (connection_container == Qnil) {
@@ -121,7 +128,7 @@ VALUE cConnection_dispose(VALUE self) {
121
128
  return Qtrue;
122
129
  }
123
130
 
124
- VALUE cConnection_quote_string(VALUE self, VALUE string) {
131
+ VALUE do_postgres_cConnection_quote_string(VALUE self, VALUE string) {
125
132
  PGconn *db = DATA_PTR(rb_iv_get(self, "@connection"));
126
133
  const char *source = rb_str_ptr_readonly(string);
127
134
  int error = 0;
@@ -154,13 +161,13 @@ VALUE cConnection_quote_string(VALUE self, VALUE string) {
154
161
  // Wrap the escaped string in single-quotes, this is DO's convention
155
162
  escaped[0] = escaped[quoted_length + 1] = '\'';
156
163
 
157
- result = DO_STR_NEW(escaped, quoted_length + 2, FIX2INT(rb_iv_get(self, "@encoding_id")), NULL);
164
+ result = DATA_OBJECTS_STR_NEW(escaped, quoted_length + 2, FIX2INT(rb_iv_get(self, "@encoding_id")), NULL);
158
165
 
159
166
  free(escaped);
160
167
  return result;
161
168
  }
162
169
 
163
- VALUE cConnection_quote_byte_array(VALUE self, VALUE string) {
170
+ VALUE do_postgres_cConnection_quote_byte_array(VALUE self, VALUE string) {
164
171
  PGconn *db = DATA_PTR(rb_iv_get(self, "@connection"));
165
172
  const unsigned char *source = (unsigned char *)rb_str_ptr_readonly(string);
166
173
  size_t source_len = rb_str_len(string);
@@ -194,7 +201,7 @@ VALUE cConnection_quote_byte_array(VALUE self, VALUE string) {
194
201
  }
195
202
 
196
203
  #ifdef _WIN32
197
- PGresult * cCommand_execute_sync(VALUE self, VALUE connection, PGconn *db, VALUE query) {
204
+ PGresult * do_postgres_cCommand_execute_sync(VALUE self, VALUE connection, PGconn *db, VALUE query) {
198
205
  char *str = StringValuePtr(query);
199
206
  PGresult *response;
200
207
 
@@ -215,7 +222,7 @@ PGresult * cCommand_execute_sync(VALUE self, VALUE connection, PGconn *db, VALUE
215
222
  response = PQexec(db, str);
216
223
  }
217
224
  else {
218
- full_connect(connection, db);
225
+ do_postgres_full_connect(connection, db);
219
226
  response = PQexec(db, str);
220
227
  }
221
228
  }
@@ -229,7 +236,7 @@ PGresult * cCommand_execute_sync(VALUE self, VALUE connection, PGconn *db, VALUE
229
236
  return response;
230
237
  }
231
238
  #else
232
- PGresult * cCommand_execute_async(VALUE self, VALUE connection, PGconn *db, VALUE query) {
239
+ PGresult * do_postgres_cCommand_execute_async(VALUE self, VALUE connection, PGconn *db, VALUE query) {
233
240
  PGresult *response;
234
241
  char* str = StringValuePtr(query);
235
242
 
@@ -251,7 +258,7 @@ PGresult * cCommand_execute_async(VALUE self, VALUE connection, PGconn *db, VALU
251
258
  retval = PQsendQuery(db, str);
252
259
  }
253
260
  else {
254
- full_connect(connection, db);
261
+ do_postgres_full_connect(connection, db);
255
262
  retval = PQsendQuery(db, str);
256
263
  }
257
264
  }
@@ -291,7 +298,7 @@ PGresult * cCommand_execute_async(VALUE self, VALUE connection, PGconn *db, VALU
291
298
  }
292
299
  #endif
293
300
 
294
- VALUE cConnection_initialize(VALUE self, VALUE uri) {
301
+ VALUE do_postgres_cConnection_initialize(VALUE self, VALUE uri) {
295
302
  rb_iv_set(self, "@using_socket", Qfalse);
296
303
 
297
304
  VALUE r_host = rb_funcall(uri, rb_intern("host"), 0);
@@ -330,10 +337,10 @@ VALUE cConnection_initialize(VALUE self, VALUE uri) {
330
337
 
331
338
  rb_iv_set(self, "@query", r_query);
332
339
 
333
- const char *encoding = get_uri_option(r_query, "encoding");
340
+ const char *encoding = data_objects_get_uri_option(r_query, "encoding");
334
341
 
335
342
  if (!encoding) {
336
- encoding = get_uri_option(r_query, "charset");
343
+ encoding = data_objects_get_uri_option(r_query, "charset");
337
344
 
338
345
  if (!encoding) {
339
346
  encoding = "UTF-8";
@@ -344,12 +351,12 @@ VALUE cConnection_initialize(VALUE self, VALUE uri) {
344
351
 
345
352
  PGconn *db = NULL;
346
353
 
347
- full_connect(self, db);
354
+ do_postgres_full_connect(self, db);
348
355
  rb_iv_set(self, "@uri", uri);
349
356
  return Qtrue;
350
357
  }
351
358
 
352
- void full_connect(VALUE self, PGconn *db) {
359
+ void do_postgres_full_connect(VALUE self, PGconn *db) {
353
360
  VALUE r_host;
354
361
  char *host = NULL;
355
362
 
@@ -392,7 +399,7 @@ void full_connect(VALUE self, PGconn *db) {
392
399
  }
393
400
 
394
401
  VALUE r_query = rb_iv_get(self, "@query");
395
- const char *search_path = get_uri_option(r_query, "search_path");
402
+ const char *search_path = data_objects_get_uri_option(r_query, "search_path");
396
403
 
397
404
  db = PQsetdbLogin(
398
405
  host,
@@ -420,11 +427,11 @@ void full_connect(VALUE self, PGconn *db) {
420
427
  snprintf(search_path_query, 256, "set search_path to %s;", search_path);
421
428
 
422
429
  r_query = rb_str_new2(search_path_query);
423
- result = cCommand_execute(Qnil, self, db, r_query);
430
+ result = do_postgres_cCommand_execute(Qnil, self, db, r_query);
424
431
 
425
432
  if (PQresultStatus(result) != PGRES_COMMAND_OK) {
426
433
  free(search_path_query);
427
- raise_error(self, result, r_query);
434
+ do_postgres_raise_error(self, result, r_query);
428
435
  }
429
436
 
430
437
  free(search_path_query);
@@ -436,21 +443,21 @@ void full_connect(VALUE self, PGconn *db) {
436
443
  VALUE r_options;
437
444
 
438
445
  r_options = rb_str_new2(backslash_off);
439
- result = cCommand_execute(Qnil, self, db, r_options);
446
+ result = do_postgres_cCommand_execute(Qnil, self, db, r_options);
440
447
 
441
448
  if (PQresultStatus(result) != PGRES_COMMAND_OK) {
442
449
  rb_warn("%s", PQresultErrorMessage(result));
443
450
  }
444
451
 
445
452
  r_options = rb_str_new2(standard_strings_on);
446
- result = cCommand_execute(Qnil, self, db, r_options);
453
+ result = do_postgres_cCommand_execute(Qnil, self, db, r_options);
447
454
 
448
455
  if (PQresultStatus(result) != PGRES_COMMAND_OK) {
449
456
  rb_warn("%s", PQresultErrorMessage(result));
450
457
  }
451
458
 
452
459
  r_options = rb_str_new2(warning_messages);
453
- result = cCommand_execute(Qnil, self, db, r_options);
460
+ result = do_postgres_cCommand_execute(Qnil, self, db, r_options);
454
461
 
455
462
  if (PQresultStatus(result) != PGRES_COMMAND_OK) {
456
463
  rb_warn("%s", PQresultErrorMessage(result));
@@ -458,7 +465,7 @@ void full_connect(VALUE self, PGconn *db) {
458
465
 
459
466
  VALUE encoding = rb_iv_get(self, "@encoding");
460
467
  #ifdef HAVE_PQSETCLIENTENCODING
461
- VALUE pg_encoding = rb_hash_aref(do_const_get(mEncoding, "MAP"), encoding);
468
+ VALUE pg_encoding = rb_hash_aref(data_objects_const_get(mEncoding, "MAP"), encoding);
462
469
 
463
470
  if (pg_encoding != Qnil) {
464
471
  if (PQsetClientEncoding(db, rb_str_ptr_readonly(pg_encoding))) {
@@ -485,7 +492,7 @@ void full_connect(VALUE self, PGconn *db) {
485
492
  rb_iv_set(self, "@connection", Data_Wrap_Struct(rb_cObject, 0, 0, db));
486
493
  }
487
494
 
488
- VALUE cCommand_execute_non_query(int argc, VALUE *argv, VALUE self) {
495
+ VALUE do_postgres_cCommand_execute_non_query(int argc, VALUE *argv, VALUE self) {
489
496
  VALUE connection = rb_iv_get(self, "@connection");
490
497
  VALUE postgres_connection = rb_iv_get(connection, "@connection");
491
498
 
@@ -493,12 +500,12 @@ VALUE cCommand_execute_non_query(int argc, VALUE *argv, VALUE self) {
493
500
  rb_raise(eConnectionError, "This connection has already been closed.");
494
501
  }
495
502
 
496
- VALUE query = build_query_from_args(self, argc, argv);
503
+ VALUE query = data_objects_build_query_from_args(self, argc, argv);
497
504
  PGconn *db = DATA_PTR(postgres_connection);
498
505
  PGresult *response;
499
506
  int status;
500
507
 
501
- response = cCommand_execute(self, connection, db, query);
508
+ response = do_postgres_cCommand_execute(self, connection, db, query);
502
509
  status = PQresultStatus(response);
503
510
 
504
511
  VALUE affected_rows = Qnil;
@@ -519,14 +526,14 @@ VALUE cCommand_execute_non_query(int argc, VALUE *argv, VALUE self) {
519
526
  affected_rows = INT2NUM(atoi(PQcmdTuples(response)));
520
527
  }
521
528
  else {
522
- raise_error(self, response, query);
529
+ do_postgres_raise_error(self, response, query);
523
530
  }
524
531
 
525
532
  PQclear(response);
526
- return rb_funcall(cResult, ID_NEW, 3, self, affected_rows, insert_id);
533
+ return rb_funcall(cPostgresResult, ID_NEW, 3, self, affected_rows, insert_id);
527
534
  }
528
535
 
529
- VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
536
+ VALUE do_postgres_cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
530
537
  VALUE connection = rb_iv_get(self, "@connection");
531
538
  VALUE postgres_connection = rb_iv_get(connection, "@connection");
532
539
 
@@ -534,16 +541,16 @@ VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
534
541
  rb_raise(eConnectionError, "This connection has already been closed.");
535
542
  }
536
543
 
537
- VALUE query = build_query_from_args(self, argc, argv);
544
+ VALUE query = data_objects_build_query_from_args(self, argc, argv);
538
545
  PGconn *db = DATA_PTR(postgres_connection);
539
- PGresult *response = cCommand_execute(self, connection, db, query);
546
+ PGresult *response = do_postgres_cCommand_execute(self, connection, db, query);
540
547
 
541
548
  if (PQresultStatus(response) != PGRES_TUPLES_OK) {
542
- raise_error(self, response, query);
549
+ do_postgres_raise_error(self, response, query);
543
550
  }
544
551
 
545
552
  int field_count = PQnfields(response);
546
- VALUE reader = rb_funcall(cReader, ID_NEW, 0);
553
+ VALUE reader = rb_funcall(cPostgresReader, ID_NEW, 0);
547
554
 
548
555
  rb_iv_set(reader, "@connection", connection);
549
556
  rb_iv_set(reader, "@reader", Data_Wrap_Struct(rb_cObject, 0, 0, response));
@@ -572,7 +579,7 @@ VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
572
579
  rb_ary_push(field_names, rb_str_new2(PQfname(response, i)));
573
580
 
574
581
  if (infer_types == 1) {
575
- rb_ary_push(field_types, infer_ruby_type(PQftype(response, i)));
582
+ rb_ary_push(field_types, do_postgres_infer_ruby_type(PQftype(response, i)));
576
583
  }
577
584
  }
578
585
 
@@ -582,7 +589,7 @@ VALUE cCommand_execute_reader(int argc, VALUE *argv, VALUE self) {
582
589
  return reader;
583
590
  }
584
591
 
585
- VALUE cReader_close(VALUE self) {
592
+ VALUE do_postgres_cReader_close(VALUE self) {
586
593
  VALUE reader_container = rb_iv_get(self, "@reader");
587
594
 
588
595
  if (reader_container == Qnil) {
@@ -602,7 +609,7 @@ VALUE cReader_close(VALUE self) {
602
609
  return Qtrue;
603
610
  }
604
611
 
605
- VALUE cReader_next(VALUE self) {
612
+ VALUE do_postgres_cReader_next(VALUE self) {
606
613
  PGresult *reader = DATA_PTR(rb_iv_get(self, "@reader"));
607
614
 
608
615
  int row_count = NUM2INT(rb_iv_get(self, "@row_count"));
@@ -636,7 +643,7 @@ VALUE cReader_next(VALUE self) {
636
643
 
637
644
  // Always return nil if the value returned from Postgres is null
638
645
  if (!PQgetisnull(reader, position, i)) {
639
- value = typecast(PQgetvalue(reader, position, i), PQgetlength(reader, position, i), field_type, enc);
646
+ value = do_postgres_typecast(PQgetvalue(reader, position, i), PQgetlength(reader, position, i), field_type, enc);
640
647
  }
641
648
  else {
642
649
  value = Qnil;
@@ -651,34 +658,34 @@ VALUE cReader_next(VALUE self) {
651
658
  }
652
659
 
653
660
  void Init_do_postgres() {
654
- common_init();
661
+ data_objects_common_init();
655
662
 
656
663
  mPostgres = rb_define_module_under(mDO, "Postgres");
657
664
  mEncoding = rb_define_module_under(mPostgres, "Encoding");
658
665
 
659
- cConnection = rb_define_class_under(mPostgres, "Connection", cDO_Connection);
660
- rb_define_method(cConnection, "initialize", cConnection_initialize, 1);
661
- rb_define_method(cConnection, "dispose", cConnection_dispose, 0);
662
- rb_define_method(cConnection, "character_set", cConnection_character_set , 0);
663
- rb_define_method(cConnection, "quote_string", cConnection_quote_string, 1);
664
- rb_define_method(cConnection, "quote_byte_array", cConnection_quote_byte_array, 1);
666
+ cPostgresConnection = rb_define_class_under(mPostgres, "Connection", cDO_Connection);
667
+ rb_define_method(cPostgresConnection, "initialize", do_postgres_cConnection_initialize, 1);
668
+ rb_define_method(cPostgresConnection, "dispose", do_postgres_cConnection_dispose, 0);
669
+ rb_define_method(cPostgresConnection, "character_set", data_objects_cConnection_character_set , 0);
670
+ rb_define_method(cPostgresConnection, "quote_string", do_postgres_cConnection_quote_string, 1);
671
+ rb_define_method(cPostgresConnection, "quote_byte_array", do_postgres_cConnection_quote_byte_array, 1);
665
672
 
666
- cCommand = rb_define_class_under(mPostgres, "Command", cDO_Command);
667
- rb_define_method(cCommand, "set_types", cCommand_set_types, -1);
668
- rb_define_method(cCommand, "execute_non_query", cCommand_execute_non_query, -1);
669
- rb_define_method(cCommand, "execute_reader", cCommand_execute_reader, -1);
673
+ cPostgresCommand = rb_define_class_under(mPostgres, "Command", cDO_Command);
674
+ rb_define_method(cPostgresCommand, "set_types", data_objects_cCommand_set_types, -1);
675
+ rb_define_method(cPostgresCommand, "execute_non_query", do_postgres_cCommand_execute_non_query, -1);
676
+ rb_define_method(cPostgresCommand, "execute_reader", do_postgres_cCommand_execute_reader, -1);
670
677
 
671
- cResult = rb_define_class_under(mPostgres, "Result", cDO_Result);
678
+ cPostgresResult = rb_define_class_under(mPostgres, "Result", cDO_Result);
672
679
 
673
- cReader = rb_define_class_under(mPostgres, "Reader", cDO_Reader);
674
- rb_define_method(cReader, "close", cReader_close, 0);
675
- rb_define_method(cReader, "next!", cReader_next, 0);
676
- rb_define_method(cReader, "values", cReader_values, 0);
677
- rb_define_method(cReader, "fields", cReader_fields, 0);
678
- rb_define_method(cReader, "field_count", cReader_field_count, 0);
680
+ cPostgresReader = rb_define_class_under(mPostgres, "Reader", cDO_Reader);
681
+ rb_define_method(cPostgresReader, "close", do_postgres_cReader_close, 0);
682
+ rb_define_method(cPostgresReader, "next!", do_postgres_cReader_next, 0);
683
+ rb_define_method(cPostgresReader, "values", data_objects_cReader_values, 0);
684
+ rb_define_method(cPostgresReader, "fields", data_objects_cReader_fields, 0);
685
+ rb_define_method(cPostgresReader, "field_count", data_objects_cReader_field_count, 0);
679
686
 
680
- rb_global_variable(&cResult);
681
- rb_global_variable(&cReader);
687
+ rb_global_variable(&cPostgresResult);
688
+ rb_global_variable(&cPostgresReader);
682
689
 
683
- do_define_errors(mPostgres, errors);
690
+ data_objects_define_errors(mPostgres, do_postgres_errors);
684
691
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  #include "do_common.h"
5
5
 
6
- static struct errcodes errors[] = {
6
+ static struct errcodes do_postgres_errors[] = {
7
7
  #ifdef ERRCODE_CONNECTION_EXCEPTION
8
8
  ERRCODE(ERRCODE_CONNECTION_EXCEPTION, "ConnectionError"),
9
9
  #endif
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  module DataObjects
2
2
  module Postgres
3
- VERSION = '0.10.5'
3
+ VERSION = '0.10.6'
4
4
  end
5
5
  end
data/tasks/compile.rake CHANGED
@@ -70,7 +70,7 @@ begin
70
70
  ext.classpath = '../do_jdbc/lib/do_jdbc_internal.jar'
71
71
  ext.java_compiling do |gem|
72
72
  gem.add_dependency 'jdbc-postgres', '>=8.2'
73
- gem.add_dependency 'do_jdbc', '0.10.5'
73
+ gem.add_dependency 'do_jdbc', '0.10.6'
74
74
  end
75
75
  end
76
76
  rescue LoadError
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_postgres
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
5
- prerelease: false
4
+ hash: 59
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 5
10
- version: 0.10.5
9
+ - 6
10
+ version: 0.10.6
11
11
  platform: x86-mingw32
12
12
  authors:
13
13
  - Dirkjan Bussink
@@ -19,22 +19,23 @@ date: 2011-03-29 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
+ type: :runtime
22
23
  requirement: &id001 !ruby/object:Gem::Requirement
23
24
  none: false
24
25
  requirements:
25
26
  - - "="
26
27
  - !ruby/object:Gem::Version
27
- hash: 61
28
+ hash: 59
28
29
  segments:
29
30
  - 0
30
31
  - 10
31
- - 5
32
- version: 0.10.5
33
- type: :runtime
32
+ - 6
33
+ version: 0.10.6
34
34
  name: data_objects
35
- prerelease: false
36
35
  version_requirements: *id001
36
+ prerelease: false
37
37
  - !ruby/object:Gem::Dependency
38
+ type: :development
38
39
  requirement: &id002 !ruby/object:Gem::Requirement
39
40
  none: false
40
41
  requirements:
@@ -45,11 +46,11 @@ dependencies:
45
46
  - 2
46
47
  - 5
47
48
  version: "2.5"
48
- type: :development
49
49
  name: rspec
50
- prerelease: false
51
50
  version_requirements: *id002
51
+ prerelease: false
52
52
  - !ruby/object:Gem::Dependency
53
+ type: :development
53
54
  requirement: &id003 !ruby/object:Gem::Requirement
54
55
  none: false
55
56
  requirements:
@@ -60,10 +61,9 @@ dependencies:
60
61
  - 0
61
62
  - 7
62
63
  version: "0.7"
63
- type: :development
64
64
  name: rake-compiler
65
- prerelease: false
66
65
  version_requirements: *id003
66
+ prerelease: false
67
67
  description: Implements the DataObjects API for PostgreSQL
68
68
  email: d.bussink@gmail.com
69
69
  executables: []
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  requirements: []
175
175
 
176
176
  rubyforge_project: dorb
177
- rubygems_version: 1.3.7
177
+ rubygems_version: 1.5.2
178
178
  signing_key:
179
179
  specification_version: 3
180
180
  summary: DataObjects PostgreSQL Driver