ruby-oci8 2.2.7 → 2.2.8

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.
data/ChangeLog CHANGED
@@ -1,3 +1,93 @@
1
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
2
+ * NEWS: Add changes between 2.2.7 and 2.2.8.
3
+ * lib/oci8/version.rb: Update to 2.2.8.
4
+
5
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
6
+ * ext/oci8/bind.c: Fix warning: comparison between signed and
7
+ unsigned integer expressions
8
+
9
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
10
+ * test/README.md: Update preparation SQL statements for running tests.
11
+
12
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
13
+ * test/test_break.rb: Check Oracle server OS where tests run
14
+ using dbms_utility.port_string. Tests in test_break.rb
15
+ failed on Windows.
16
+
17
+ 2020-01-07 Kubo Takehiro <kubo@jiubao.org>
18
+ * mkpkg-win32.rb: Workarounds for compilation using ruby 2.4 and 2.6 with
19
+ latest msys2 to avoid 'undefined reference to __chk_fail'
20
+
21
+ 2020-01-06 Kubo Takehiro <kubo@jiubao.org>
22
+ * ext/oci8/win32.c: Fix warnings caused by the change of rb_ensure()'s
23
+ arguments in ruby 2.7.
24
+
25
+ 2019-12-16 Kubo Takehiro <kubo@jiubao.org>
26
+ * test/test_datetime.rb: Remove "require 'scanf'" to run tests with Ruby 2.7.
27
+ The 'scanf' library was removed. https://bugs.ruby-lang.org/issues/16170
28
+
29
+ 2019-12-15 Kubo Takehiro <kubo@jiubao.org>
30
+ * ext/oci8/oradate.c: Fix bug of OraDate.now introduced 15 years ago.
31
+
32
+ 2019-12-15 Kubo Takehiro <kubo@jiubao.org>
33
+ * ext/oci8/attr.c, ext/oci8/oci8lib.c: Fix warnings caused by the
34
+ change of rb_ensure()'s arguments in ruby 2.7.
35
+
36
+ 2019-06-19 Kubo Takehiro <kubo@jiubao.org>
37
+ * Merge pull request #217 from nathanbwright/patch-1
38
+ Fix spelling in install-instant-client.md
39
+ (GH-217)
40
+
41
+ 2019-06-18 Nathan Wright <nathanbwright@users.noreply.github.com>
42
+ * docs/install-instant-client.md: Fix spelling in install-instant-client.md
43
+ (GH-217)
44
+
45
+ 2019-04-24 Kubo Takehiro <kubo@jiubao.org>
46
+ * Merge pull request #212 from tomasjura/master
47
+ Compilation fix for Windows ( and some small cleanups )
48
+ (GH-212)
49
+
50
+ 2019-04-23 Tomas Jura <tomas.jura1@gmail.com>
51
+ * ext/oci8/oci8.h: eliminate compiler warning
52
+ (GH-212)
53
+
54
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
55
+ * ext/oci8/bind.c: compiler warning eliminated
56
+ (GH-212)
57
+
58
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
59
+ * setup.rb: use splat operator instead dummy variables
60
+ (GH-212)
61
+
62
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
63
+ * lib/oci8.rb: use fiddler instead obsolete Win32API
64
+ (GH-212)
65
+
66
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
67
+ * ext/oci8/oraconf.rb: fix typo in windows compilation
68
+ (GH-212)
69
+
70
+ 2019-03-23 Kubo Takehiro <kubo@jiubao.org>
71
+ * Merge pull request #210 from dminuoso/allow-custom
72
+ (Nix) Allow for specifying include/library paths
73
+ (GH-210)
74
+
75
+ 2019-03-23 Victor Nawothnig <Victor.Nawothnig@gmail.com>
76
+ * ext/oci8/oraconf.rb: Fix missing support for full client
77
+ (GH-210)
78
+
79
+ 2019-03-22 Victor Nawothnig <Victor.Nawothnig@gmail.com>
80
+ * ext/oci8/oraconf.rb: fixup! Allow overriding library/include paths
81
+ (GH-210)
82
+
83
+ 2019-03-21 Victor Nawothnig <Victor.Nawothnig@gmail.com>
84
+ * setup.rb: Add documentation for new flags
85
+ (GH-210)
86
+
87
+ 2019-03-21 Victor Nawothnig <Victor.Nawothnig@gmail.com>
88
+ * ext/oci8/oraconf.rb: Allow overriding library/include paths
89
+ (GH-210)
90
+
1
91
  2019-01-06 Kubo Takehiro <kubo@jiubao.org>
2
92
  * NEWS: Add changes between 2.2.6.1 and 2.2.7.
3
93
  * lib/oci8/version.rb: Update to 2.2.7
data/NEWS CHANGED
@@ -1,5 +1,30 @@
1
1
  # @markup markdown
2
2
 
3
+ 2.2.8 (2020-01-11)
4
+ ==================
5
+
6
+ New features
7
+ ------------
8
+
9
+ * Add support to specify include and lib directories of Oracle library on installation. (GH-210)
10
+
11
+ The following three flags are added.
12
+
13
+ * --with-instant-client-dir
14
+ * --with-instant-client-include
15
+ * --with-instant-client-lib
16
+
17
+ Fixed issue
18
+ -----------
19
+
20
+ - Suppress warnings compiling oci8lib.so (GH-212 and others)
21
+
22
+ - Fix compilation and tests on Windows.
23
+
24
+ - Fix spelling in install-instant-client.md (GH-217)
25
+
26
+ - Use fiddler instead obsolete Win32API on Windows (GH-212)
27
+
3
28
  2.2.7 (2019-01-06)
4
29
  ==================
5
30
 
@@ -18,7 +18,7 @@ Look at {file:docs/install-on-osx.md} for OS X.
18
18
  Install Oracle Instant Client Packages
19
19
  --------------------------------------
20
20
 
21
- ### Donwload Instant Client Packages
21
+ ### Download Instant Client Packages
22
22
 
23
23
  Download the following packages from [Oracle Technology Network](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html).
24
24
 
@@ -15,8 +15,9 @@ typedef struct {
15
15
  OCIRowid *ridp;
16
16
  } rowid_arg_t;
17
17
 
18
- static VALUE get_rowid_attr(rowid_arg_t *arg)
18
+ static VALUE get_rowid_attr(VALUE varg)
19
19
  {
20
+ rowid_arg_t *arg = (rowid_arg_t *)varg;
20
21
  oci8_base_t *base = arg->base;
21
22
  ub4 attrtype = arg->attrtype;
22
23
  char buf[MAX_ROWID_LEN];
@@ -36,8 +37,9 @@ static VALUE get_rowid_attr(rowid_arg_t *arg)
36
37
  return rb_external_str_new_with_enc(buf, buflen, rb_usascii_encoding());
37
38
  }
38
39
 
39
- static VALUE rowid_ensure(rowid_arg_t *arg)
40
+ static VALUE rowid_ensure(VALUE varg)
40
41
  {
42
+ rowid_arg_t *arg = (rowid_arg_t *)varg;
41
43
  if (arg->ridp != NULL) {
42
44
  OCIDescriptorFree(arg->ridp, OCI_DTYPE_ROWID);
43
45
  }
@@ -383,7 +383,7 @@ static sb4 in_bind_callback(void *ictxp, OCIBind *bindp, ub4 iter, ub4 index, vo
383
383
 
384
384
  if (cb->tail == &cb->head) {
385
385
  /* empty string */
386
- *bufpp = "";
386
+ *bufpp = (void *)"";
387
387
  *alenp = 0;
388
388
  *piecep = OCI_ONE_PIECE;
389
389
  } else {
@@ -477,7 +477,7 @@ static VALUE bind_long_get(oci8_bind_t *obind, void *data, void *null_struct)
477
477
  static void bind_long_set(oci8_bind_t *obind, void *data, void **null_structp, VALUE val)
478
478
  {
479
479
  chunk_buf_t *cb = (chunk_buf_t *)data;
480
- long len;
480
+ ub4 len;
481
481
  const char *buf;
482
482
 
483
483
  if (IS_BIND_LONG(obind)) {
@@ -485,7 +485,7 @@ static void bind_long_set(oci8_bind_t *obind, void *data, void **null_structp, V
485
485
  } else {
486
486
  StringValue(val);
487
487
  }
488
- len = RSTRING_LEN(val);
488
+ len = (ub4)RSTRING_LEN(val);
489
489
  buf = RSTRING_PTR(val);
490
490
  cb->tail = &cb->head;
491
491
  while (1) {
@@ -424,6 +424,7 @@ void *oci8_check_typeddata(VALUE obj, const oci8_handle_data_type_t *data_type,
424
424
  extern VALUE eOCIException;
425
425
  extern VALUE eOCIBreak;
426
426
  void Init_oci8_error(void);
427
+ NORETURN(void oci8_do_raise(OCIError *errhp, sword status, OCIStmt *stmthp, const char *file, int line));
427
428
  NORETURN(void oci8_do_env_raise(OCIEnv *envhp, sword status, int free_envhp, const char *file, int line));
428
429
  NORETURN(void oci8_do_raise_init_error(const char *file, int line));
429
430
  sb4 oci8_get_error_code(OCIError *errhp);
@@ -481,8 +481,8 @@ typedef struct {
481
481
  OCIStmt *stmtp;
482
482
  } cb_arg_t;
483
483
 
484
- static VALUE exec_sql(cb_arg_t *arg);
485
- static VALUE ensure_func(cb_arg_t *arg);
484
+ static VALUE exec_sql(VALUE varg);
485
+ static VALUE ensure_func(VALUE varg);
486
486
 
487
487
  /*
488
488
  * utility function to execute a single SQL statement
@@ -503,8 +503,9 @@ sword oci8_exec_sql(oci8_svcctx_t *svcctx, const char *sql_text, ub4 num_define_
503
503
  return (sword)rb_ensure(exec_sql, (VALUE)&arg, ensure_func, (VALUE)&arg);
504
504
  }
505
505
 
506
- static VALUE exec_sql(cb_arg_t *arg)
506
+ static VALUE exec_sql(VALUE varg)
507
507
  {
508
+ cb_arg_t *arg = (cb_arg_t *)varg;
508
509
  ub4 pos;
509
510
  sword rv;
510
511
 
@@ -546,8 +547,9 @@ static VALUE exec_sql(cb_arg_t *arg)
546
547
  return (VALUE)rv;
547
548
  }
548
549
 
549
- static VALUE ensure_func(cb_arg_t *arg)
550
+ static VALUE ensure_func(VALUE varg)
550
551
  {
552
+ cb_arg_t *arg = (cb_arg_t *)varg;
551
553
  if (arg->stmtp != NULL) {
552
554
  OCIStmtRelease(arg->stmtp, oci8_errhp, NULL, 0, OCI_DEFAULT);
553
555
  }
@@ -250,7 +250,6 @@ class OraConf
250
250
  def self.get
251
251
  original_CFLAGS = $CFLAGS
252
252
  original_defs = $defs
253
- ic_dir = nil
254
253
  begin
255
254
  # check Oracle instant client
256
255
  if with_config('instant-client')
@@ -262,11 +261,17 @@ class OraConf
262
261
  =======================================================
263
262
  EOS
264
263
  end
265
- ic_dir = check_ic_dir
266
- if ic_dir
267
- OraConfIC.new(ic_dir)
264
+ inc, lib = dir_config('instant-client')
265
+ if inc && lib
266
+ OraConfIC.new(inc, lib)
268
267
  else
269
- OraConfFC.new()
268
+ base = guess_ic_dir
269
+ if base
270
+ inc, lib = guess_dirs_from_ic_base(base)
271
+ OraConfIC.new(inc, lib)
272
+ else
273
+ OraConfFC.new
274
+ end
270
275
  end
271
276
  rescue
272
277
  case ENV['LANG']
@@ -298,6 +303,44 @@ EOS
298
303
  end
299
304
  end
300
305
 
306
+ # Guess the include and directory paths from
307
+ def self.guess_dirs_from_ic_base(ic_dir)
308
+ if ic_dir =~ /^\/usr\/lib(?:64)?\/oracle\/(\d+(?:\.\d+)*)\/client(64)?\/lib(?:64)?/
309
+ # rpm package
310
+ # x86 rpms after 11.1.0.7.0:
311
+ # library: /usr/lib/oracle/X.X/client/lib/
312
+ # include: /usr/include/oracle/X.X/client/
313
+ #
314
+ # x86_64 rpms after 11.1.0.7.0:
315
+ # library: /usr/lib/oracle/X.X/client64/lib/
316
+ # include: /usr/include/oracle/X.X/client64/
317
+ #
318
+ # x86 rpms before 11.1.0.6.0:
319
+ # library: /usr/lib/oracle/X.X.X.X/client/lib/
320
+ # include: /usr/include/oracle/X.X.X.X/client/
321
+ #
322
+ # x86_64 rpms before 11.1.0.6.0:
323
+ # library: /usr/lib/oracle/X.X.X.X/client64/lib/
324
+ # include: /usr/include/oracle/X.X.X.X/client64/
325
+ #
326
+ # third-party x86_64 rpms(*1):
327
+ # library: /usr/lib64/oracle/X.X.X.X/client/lib/
328
+ # or /usr/lib64/oracle/X.X.X.X/client/lib64/
329
+ # include: /usr/include/oracle/X.X.X.X/client/
330
+ #
331
+ # *1 These had been used before Oracle released official x86_64 rpms.
332
+ #
333
+ lib_dir = ic_dir
334
+ inc_dir = "/usr/include/oracle/#{$1}/client#{$2}"
335
+ else
336
+ # zip package
337
+ lib_dir = ic_dir
338
+ inc_dir = "#{ic_dir}/sdk/include"
339
+ end
340
+
341
+ [inc_dir, lib_dir]
342
+ end
343
+
301
344
  def self.ld_envs
302
345
  @@ld_envs
303
346
  end
@@ -316,8 +359,9 @@ EOS
316
359
  end
317
360
  end
318
361
 
319
- def self.check_ic_dir
320
- puts "checking for load library path... "
362
+ def self.guess_ic_dir
363
+ puts "attempting to locate oracle-instantclient..."
364
+ puts "checking load library path... "
321
365
  STDOUT.flush
322
366
 
323
367
  # get library load path names
@@ -947,53 +991,20 @@ end
947
991
 
948
992
  # OraConf for Instant Client
949
993
  class OraConfIC < OraConf
950
- def initialize(ic_dir)
994
+ def initialize(inc_dir, lib_dir)
951
995
  init
952
996
 
953
- if ic_dir =~ /^\/usr\/lib(?:64)?\/oracle\/(\d+(?:\.\d+)*)\/client(64)?\/lib(?:64)?/
954
- # rpm package
955
- # x86 rpms after 11.1.0.7.0:
956
- # library: /usr/lib/oracle/X.X/client/lib/
957
- # include: /usr/include/oracle/X.X/client/
958
- #
959
- # x86_64 rpms after 11.1.0.7.0:
960
- # library: /usr/lib/oracle/X.X/client64/lib/
961
- # include: /usr/include/oracle/X.X/client64/
962
- #
963
- # x86 rpms before 11.1.0.6.0:
964
- # library: /usr/lib/oracle/X.X.X.X/client/lib/
965
- # include: /usr/include/oracle/X.X.X.X/client/
966
- #
967
- # x86_64 rpms before 11.1.0.6.0:
968
- # library: /usr/lib/oracle/X.X.X.X/client64/lib/
969
- # include: /usr/include/oracle/X.X.X.X/client64/
970
- #
971
- # third-party x86_64 rpms(*1):
972
- # library: /usr/lib64/oracle/X.X.X.X/client/lib/
973
- # or /usr/lib64/oracle/X.X.X.X/client/lib64/
974
- # include: /usr/include/oracle/X.X.X.X/client/
975
- #
976
- # *1 These had been used before Oracle released official x86_64 rpms.
977
- #
978
- lib_dir = ic_dir
979
- inc_dir = "/usr/include/oracle/#{$1}/client#{$2}"
980
- else
981
- # zip package
982
- lib_dir = ic_dir
983
- inc_dir = "#{ic_dir}/sdk/include"
984
- end
985
-
986
997
  if RUBY_PLATFORM =~ /mswin32|mswin64|cygwin|mingw32|bccwin32/ # when Windows
987
- unless File.exist?("#{ic_dir}/sdk/lib/msvc/oci.lib")
998
+ unless File.exist?("#{lib_dir}/sdk/lib/msvc/oci.lib")
988
999
  raise <<EOS
989
1000
  Could not compile with Oracle instant client.
990
- #{ic_dir}/sdk/lib/msvc/oci.lib could not be found.
1001
+ #{lib_dir}/sdk/lib/msvc/oci.lib could not be found.
991
1002
  EOS
992
1003
  raise 'failed'
993
1004
  end
994
1005
  @cflags = " \"-I#{inc_dir}\""
995
1006
  @cflags += " -D_int64=\"long long\"" if RUBY_PLATFORM =~ /cygwin|mingw32/
996
- @libs = get_libs("#{ic_dir}/sdk/lib")
1007
+ @libs = get_libs("#{lib_dir}/sdk/lib")
997
1008
  ld_path = nil
998
1009
  else
999
1010
  @cflags = " -I#{inc_dir}"
@@ -198,7 +198,7 @@ static VALUE ora_date_initialize_copy(VALUE lhs, VALUE rhs)
198
198
  *
199
199
  * @return [OraDate]
200
200
  */
201
- static VALUE ora_date_s_now(int argc, VALUE *argv, VALUE klass)
201
+ static VALUE ora_date_s_now(VALUE klass)
202
202
  {
203
203
  VALUE obj = ora_date_s_allocate(klass);
204
204
  ora_date_t *od = check_oradate(obj);
@@ -26,8 +26,9 @@ typedef struct {
26
26
  HKEY hSubKey;
27
27
  } enum_homes_arg_t;
28
28
 
29
- static VALUE enum_homes_real(enum_homes_arg_t *arg)
29
+ static VALUE enum_homes_real(VALUE varg)
30
30
  {
31
+ enum_homes_arg_t *arg = (enum_homes_arg_t *)varg;
31
32
  LONG rv;
32
33
  DWORD type;
33
34
  DWORD idx;
@@ -77,8 +78,9 @@ static VALUE enum_homes_real(enum_homes_arg_t *arg)
77
78
  return Qnil;
78
79
  }
79
80
 
80
- static VALUE enum_homes_ensure(enum_homes_arg_t *arg)
81
+ static VALUE enum_homes_ensure(VALUE varg)
81
82
  {
83
+ enum_homes_arg_t *arg = (enum_homes_arg_t *)varg;
82
84
  if (arg->hKey != NULL) {
83
85
  RegCloseKey(arg->hKey);
84
86
  arg->hKey = NULL;
@@ -11,8 +11,11 @@ if RUBY_PLATFORM =~ /cygwin/
11
11
  # Cygwin manages environment variables by itself.
12
12
  # They don't synchroize with Win32's ones.
13
13
  # This set some Oracle's environment variables to win32's enviroment.
14
- require 'Win32API'
15
- win32setenv = Win32API.new('Kernel32.dll', 'SetEnvironmentVariableA', 'PP', 'I')
14
+ require 'fiddle'
15
+ win32setenv = Fiddle::Function.new( Fiddle.dlopen('Kernel32.dll')['SetEnvironmentVariableA'],
16
+ [Fiddle::TYPE_VOIDP,Fiddle::TYPE_VOIDP],
17
+ Fiddle::TYPE_INT )
18
+
16
19
  ['NLS_LANG', 'TNS_ADMIN', 'LOCAL'].each do |name|
17
20
  val = ENV[name]
18
21
  win32setenv.call(name, val && val.dup)
@@ -1,3 +1,3 @@
1
1
  class OCI8
2
- VERSION = "2.2.7"
2
+ VERSION = "2.2.8"
3
3
  end
data/setup.rb CHANGED
@@ -189,7 +189,16 @@ class ConfigTable
189
189
  'the make program to compile ruby extentions' ] ],
190
190
  [ 'without-ext', [ 'no',
191
191
  'yes/no',
192
- 'does not compile/install ruby extentions' ] ]
192
+ 'does not compile/install ruby extentions' ] ],
193
+ [ 'with-instant-client-dir', ['',
194
+ 'path',
195
+ 'path to the Oracle instant client directory'] ],
196
+ [ 'with-instant-client-lib', ['',
197
+ 'path',
198
+ 'path to the Oracle instant client libraries'] ],
199
+ [ 'with-instant-client-include', ['',
200
+ 'path',
201
+ 'path to the Oracle instant client header files'] ]
193
202
  ]
194
203
  multipackage_descripters = [
195
204
  [ 'with', [ '',
@@ -277,7 +286,7 @@ class ConfigTable
277
286
 
278
287
  def initialize_from_table
279
288
  @table = {}
280
- DESCRIPTER.each do |k, (default, vname, desc, default2)|
289
+ DESCRIPTER.each do |k, (default, *)|
281
290
  @table[k] = default
282
291
  end
283
292
  end
@@ -7,12 +7,8 @@ Before running unit test:
7
7
  ```
8
8
  2. Create user ruby
9
9
  ```sql
10
- SQL> CREATE USER ruby IDENTIFIED BY oci8;
11
- ```
12
- or
13
- ```sql
14
- SQL> CREATE USER ruby IDENTIFIED BY oci8
15
- 2 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
10
+ SQL> CREATE USER ruby IDENTIFIED BY oci8 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
11
+ SQL> alter user ruby quota unlimited on users;
16
12
  ```
17
13
  3. Grant the privilege to connect and execute.
18
14
  ```sql
@@ -27,6 +23,7 @@ Before running unit test:
27
23
  5. Create object types
28
24
  ```sql
29
25
  SQL> @test/setup_test_object.sql
26
+ SQL> @test/setup_test_package.sql
30
27
  ```
31
28
  6. change $dbname in test/config.rb.
32
29
 
@@ -22,9 +22,8 @@ class TestBreak < Minitest::Test
22
22
  @@server_is_runing_on_windows = nil
23
23
  def server_is_runing_on_windows?
24
24
  if @@server_is_runing_on_windows.nil?
25
- @@server_is_runing_on_windows = false
26
- @conn.exec('select banner from v$version') do |row|
27
- @@server_is_runing_on_windows = true if row[0].include? 'Windows'
25
+ @conn.exec('select dbms_utility.port_string from dual') do |row|
26
+ @@server_is_runing_on_windows = row[0].include? '/WIN'
28
27
  end
29
28
  end
30
29
  @@server_is_runing_on_windows
@@ -1,6 +1,5 @@
1
1
  require 'oci8'
2
2
  require File.dirname(__FILE__) + '/config'
3
- require 'scanf'
4
3
 
5
4
  class TestDateTime < Minitest::Test
6
5
 
@@ -28,6 +27,12 @@ class TestDateTime < Minitest::Test
28
27
  convert_to_datetime($1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i, subsec, $8)
29
28
  end
30
29
 
30
+ # 'YYYY-MM-DD HH24:MI:SS' or 'YYYY-MM-DD HH24:MI:SS.FF6' to array
31
+ def string_to_array(str)
32
+ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)(?:\.(\d+))?/ =~ str
33
+ [$1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i, $7 ? $7.to_i / 1000 : 0]
34
+ end
35
+
31
36
  def setup
32
37
  @conn = get_oci8_connection
33
38
  end
@@ -43,7 +48,7 @@ class TestDateTime < Minitest::Test
43
48
  @conn.exec(<<-EOS) do |row|
44
49
  SELECT TO_DATE('#{date}', 'YYYY-MM-DD HH24:MI:SS') FROM dual
45
50
  EOS
46
- assert_equal(Time.local(*date.scanf("%d-%d-%d %d:%d:%d.%06d")), row[0])
51
+ assert_equal(Time.local(*string_to_array(date)), row[0])
47
52
  end
48
53
  end
49
54
  end
@@ -94,7 +99,7 @@ EOS
94
99
  @conn.exec(<<-EOS) do |row|
95
100
  SELECT TO_TIMESTAMP('#{date}', 'YYYY-MM-DD HH24:MI:SS.FF') FROM dual
96
101
  EOS
97
- assert_equal(Time.local(*date.scanf("%d-%d-%d %d:%d:%d.%06d")), row[0])
102
+ assert_equal(Time.local(*string_to_array(date)), row[0])
98
103
  end
99
104
  end
100
105
  end
metadata CHANGED
@@ -1,34 +1,27 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-oci8
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 2
7
- - 2
8
- - 7
9
- version: 2.2.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.8
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Kubo Takehiro
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2019-01-06 00:00:00 +09:00
18
- default_executable:
12
+ date: 2020-01-11 00:00:00.000000000 Z
19
13
  dependencies: []
14
+ description: ! 'ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available
15
+ with Oracle 10g or later including Oracle Instant Client.
20
16
 
21
- description: |
22
- ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available with Oracle 10g or later including Oracle Instant Client.
23
-
17
+ '
24
18
  email: kubo@jiubao.org
25
19
  executables: []
26
-
27
- extensions:
20
+ extensions:
28
21
  - ext/oci8/extconf.rb
29
- extra_rdoc_files:
22
+ extra_rdoc_files:
30
23
  - README.md
31
- files:
24
+ files:
32
25
  - .yardopts
33
26
  - COPYING
34
27
  - COPYING_old
@@ -142,39 +135,31 @@ files:
142
135
  - test/test_package_type.rb
143
136
  - test/test_properties.rb
144
137
  - test/test_rowid.rb
145
- has_rdoc: true
146
138
  homepage: http://www.rubydoc.info/github/kubo/ruby-oci8
147
- licenses:
139
+ licenses:
148
140
  - BSD-2-Clause
149
141
  post_install_message:
150
142
  rdoc_options: []
151
-
152
- require_paths:
143
+ require_paths:
153
144
  - lib
154
- required_ruby_version: !ruby/object:Gem::Requirement
145
+ required_ruby_version: !ruby/object:Gem::Requirement
155
146
  none: false
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- segments:
160
- - 1
161
- - 9
162
- - 1
147
+ requirements:
148
+ - - ! '>='
149
+ - !ruby/object:Gem::Version
163
150
  version: 1.9.1
164
- required_rubygems_version: !ruby/object:Gem::Requirement
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
152
  none: false
166
- requirements:
167
- - - ">="
168
- - !ruby/object:Gem::Version
169
- segments:
170
- - 0
171
- version: "0"
153
+ requirements:
154
+ - - ! '>='
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
172
157
  requirements: []
173
-
174
158
  rubyforge_project:
175
- rubygems_version: 1.3.7
159
+ rubygems_version: 1.8.11
176
160
  signing_key:
177
161
  specification_version: 3
178
162
  summary: Ruby interface for Oracle using OCI8 API
179
- test_files:
163
+ test_files:
180
164
  - test/test_all.rb
165
+ has_rdoc: