ruby-oci8 2.2.7-x86-mingw32 → 2.2.11-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f5f1a5ff7457f215658d7a19230515f74981e103a24c0177f44c37e7e07c2320
4
+ data.tar.gz: 1329a361da85b4de8afc67bf3eed9325855f79c0a84abefbc6406ca5c8a0e29a
5
+ SHA512:
6
+ metadata.gz: 7bbc81339871add8889563ff8d9bdfbc2d7cf77c4270125cea31a9dea75c4f504946a5fd98180119d573dc8480fcc1f12a2cc25dbc68b33bc5c79cf2383f0a05
7
+ data.tar.gz: b46c78cc1474f325a990e14ac9151aea442f0aad4df5cfadb4877d7a8463f3df7689a729ffc6e2788607309bb97a3190e1be8439d7f9de3bc4fda0944833c786
data/ChangeLog CHANGED
@@ -1,3 +1,118 @@
1
+ 2020-12-30 Kubo Takehiro <kubo@jiubao.org>
2
+ * NEWS: Add changes between 2.2.8 and 2.2.9.
3
+ * lib/oci8/version.rb: Update to 2.2.9.
4
+ * mkpkg-win32.rb: remove unmaintained ruby versions from binary gems.
5
+
6
+ 2020-12-29 Kubo Takehiro <kubo@jiubao.org>
7
+ * ext/oci8/oraconf.rb: Support --with-instant-client-dir along with --with-instant-client-lib/include.
8
+ (GH-223)
9
+
10
+ 2020-12-29 Kubo Takehiro <kubo@jiubao.org>
11
+ * ext/oci8/hook_funcs.c: Fix hooking failure with truffleruby.
12
+ * test/test_break.rb: Fix to pass tests with truffleruby.
13
+
14
+ 2020-12-28 Kubo Takehiro <kubo@jiubao.org>
15
+ * mkpkg-win32.rb: Build binary gems for ruby 3.0 on Windows.
16
+
17
+ 2020-12-28 Kubo Takehiro <kubo@jiubao.org>
18
+ * ext/oci8/ocinumber.c: Suppress C compiler warning: enumeration value ‘RUBY_T_NONE’ not handled in switch
19
+
20
+ 2020-09-10 Kubo Takehiro <kubo@jiubao.org>
21
+ * ext/oci8/extconf.rb: Fix for TruffleRuby 20.2 or before.
22
+
23
+ 2020-09-08 Brandon Fish <brandon.j.fish@oracle.com>
24
+ * ext/oci8/extconf.rb, lib/oci8.rb: Handle truffleruby RUBY_ENGINE in case statements
25
+
26
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
27
+ * NEWS: Add changes between 2.2.7 and 2.2.8.
28
+ * lib/oci8/version.rb: Update to 2.2.8.
29
+
30
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
31
+ * ext/oci8/bind.c: Fix warning: comparison between signed and
32
+ unsigned integer expressions
33
+
34
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
35
+ * test/README.md: Update preparation SQL statements for running tests.
36
+
37
+ 2020-01-11 Kubo Takehiro <kubo@jiubao.org>
38
+ * test/test_break.rb: Check Oracle server OS where tests run
39
+ using dbms_utility.port_string. Tests in test_break.rb
40
+ failed on Windows.
41
+
42
+ 2020-01-07 Kubo Takehiro <kubo@jiubao.org>
43
+ * mkpkg-win32.rb: Workarounds for compilation using ruby 2.4 and 2.6 with
44
+ latest msys2 to avoid 'undefined reference to __chk_fail'
45
+
46
+ 2020-01-06 Kubo Takehiro <kubo@jiubao.org>
47
+ * ext/oci8/win32.c: Fix warnings caused by the change of rb_ensure()'s
48
+ arguments in ruby 2.7.
49
+
50
+ 2019-12-16 Kubo Takehiro <kubo@jiubao.org>
51
+ * test/test_datetime.rb: Remove "require 'scanf'" to run tests with Ruby 2.7.
52
+ The 'scanf' library was removed. https://bugs.ruby-lang.org/issues/16170
53
+
54
+ 2019-12-15 Kubo Takehiro <kubo@jiubao.org>
55
+ * ext/oci8/oradate.c: Fix bug of OraDate.now introduced 15 years ago.
56
+
57
+ 2019-12-15 Kubo Takehiro <kubo@jiubao.org>
58
+ * ext/oci8/attr.c, ext/oci8/oci8lib.c: Fix warnings caused by the
59
+ change of rb_ensure()'s arguments in ruby 2.7.
60
+
61
+ 2019-06-19 Kubo Takehiro <kubo@jiubao.org>
62
+ * Merge pull request #217 from nathanbwright/patch-1
63
+ Fix spelling in install-instant-client.md
64
+ (GH-217)
65
+
66
+ 2019-06-18 Nathan Wright <nathanbwright@users.noreply.github.com>
67
+ * docs/install-instant-client.md: Fix spelling in install-instant-client.md
68
+ (GH-217)
69
+
70
+ 2019-04-24 Kubo Takehiro <kubo@jiubao.org>
71
+ * Merge pull request #212 from tomasjura/master
72
+ Compilation fix for Windows ( and some small cleanups )
73
+ (GH-212)
74
+
75
+ 2019-04-23 Tomas Jura <tomas.jura1@gmail.com>
76
+ * ext/oci8/oci8.h: eliminate compiler warning
77
+ (GH-212)
78
+
79
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
80
+ * ext/oci8/bind.c: compiler warning eliminated
81
+ (GH-212)
82
+
83
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
84
+ * setup.rb: use splat operator instead dummy variables
85
+ (GH-212)
86
+
87
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
88
+ * lib/oci8.rb: use fiddler instead obsolete Win32API
89
+ (GH-212)
90
+
91
+ 2019-04-20 Tomas Jura <tomas.jura1@gmail.com>
92
+ * ext/oci8/oraconf.rb: fix typo in windows compilation
93
+ (GH-212)
94
+
95
+ 2019-03-23 Kubo Takehiro <kubo@jiubao.org>
96
+ * Merge pull request #210 from dminuoso/allow-custom
97
+ (Nix) Allow for specifying include/library paths
98
+ (GH-210)
99
+
100
+ 2019-03-23 Victor Nawothnig <Victor.Nawothnig@gmail.com>
101
+ * ext/oci8/oraconf.rb: Fix missing support for full client
102
+ (GH-210)
103
+
104
+ 2019-03-22 Victor Nawothnig <Victor.Nawothnig@gmail.com>
105
+ * ext/oci8/oraconf.rb: fixup! Allow overriding library/include paths
106
+ (GH-210)
107
+
108
+ 2019-03-21 Victor Nawothnig <Victor.Nawothnig@gmail.com>
109
+ * setup.rb: Add documentation for new flags
110
+ (GH-210)
111
+
112
+ 2019-03-21 Victor Nawothnig <Victor.Nawothnig@gmail.com>
113
+ * ext/oci8/oraconf.rb: Allow overriding library/include paths
114
+ (GH-210)
115
+
1
116
  2019-01-06 Kubo Takehiro <kubo@jiubao.org>
2
117
  * NEWS: Add changes between 2.2.6.1 and 2.2.7.
3
118
  * lib/oci8/version.rb: Update to 2.2.7
data/NEWS CHANGED
@@ -1,5 +1,70 @@
1
1
  # @markup markdown
2
2
 
3
+ 2.2.11 (2022-02-22)
4
+ ===================
5
+
6
+ - Fix "No DLL is not foud to hook" when `OCI8.properties[:tcp_keepalive_time]` is set and Oracle client is 21c on Windows.
7
+
8
+ (reported at rsim/oracle-enhanced#2262)
9
+
10
+ - Fix "OCI8.properties[:tcp_keepalive_time] isn't available" error when ruby version is 3.1 on Windows.
11
+
12
+ 2.2.10 (2022-01-12)
13
+ ===================
14
+
15
+ - Use `File.exist?` instead of removed `File.exists?` in Ruby 3.2 (GH-242)
16
+
17
+ (contributed by Yasuo Honda)
18
+
19
+ - Support ruby 3.1 distributed by rubyinstaller.org
20
+
21
+ - Remove code for obsolete platforms
22
+ - Ruby compiled by Borland C++
23
+ - macOS released several years ago
24
+
25
+ - Detect arm64 macOS shared library in oraconf.rb in preparation for Instant Client for Apple Silicon release.
26
+
27
+ 2.2.9 (2020-12-30)
28
+ ==================
29
+
30
+ - Support [TruffleRuby](https://github.com/oracle/truffleruby). (GH-225)
31
+
32
+ (contributed by Brandon Fish)
33
+
34
+ - Remove extension libraries for unmaintained ruby versions from binary gems.
35
+
36
+ Fixed issue
37
+ -----------
38
+
39
+ - Allow --with-instant-client-dir along with --with-instant-client-lib/include. (GH-223)
40
+
41
+ (reported by Victor Nawothnig)
42
+
43
+ 2.2.8 (2020-01-11)
44
+ ==================
45
+
46
+ New features
47
+ ------------
48
+
49
+ * Add support to specify include and lib directories of Oracle library on installation. (GH-210)
50
+
51
+ The following three flags are added.
52
+
53
+ * --with-instant-client-dir
54
+ * --with-instant-client-include
55
+ * --with-instant-client-lib
56
+
57
+ Fixed issue
58
+ -----------
59
+
60
+ - Suppress warnings compiling oci8lib.so (GH-212 and others)
61
+
62
+ - Fix compilation and tests on Windows.
63
+
64
+ - Fix spelling in install-instant-client.md (GH-217)
65
+
66
+ - Use fiddler instead obsolete Win32API on Windows (GH-212)
67
+
3
68
  2.2.7 (2019-01-06)
4
69
  ==================
5
70
 
data/README.md CHANGED
@@ -2,7 +2,7 @@ Ruby-oci8
2
2
  =========
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/ruby-oci8.svg)](http://badge.fury.io/rb/ruby-oci8)
5
- [![Build Status](https://travis-ci.org/kubo/ruby-oci8.svg?branch=master)](https://travis-ci.org/kubo/ruby-oci8)
5
+ [![Tests](https://github.com/kubo/ruby-oci8/actions/workflows/tests.yml/badge.svg)](https://github.com/kubo/ruby-oci8/actions/workflows/tests.yml)
6
6
 
7
7
  What is ruby-oci8
8
8
  -----------------
data/dist-files CHANGED
@@ -19,7 +19,6 @@ docs/install-instant-client.md
19
19
  docs/install-on-osx.md
20
20
  docs/ldap-auth-and-function-interposition.md
21
21
  docs/number-type-mapping.md
22
- docs/osx-install-dev-tools.png
23
22
  docs/platform-specific-issues.md
24
23
  docs/report-installation-issue.md
25
24
  docs/timeout-parameters.md
@@ -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
 
@@ -1,133 +1,46 @@
1
- # @title Install ruby-oci8 on OS X
1
+ # @title Install ruby-oci8 on macOS
2
2
 
3
- Install ruby-oci8 on OS X
3
+ Install ruby-oci8 on macOS
4
4
  =========================
5
5
 
6
- This page explains the way to install ruby-oci8 os OS X.
6
+ **Note: Ruby-oci8 doesn't run on Apple Silicon because Oracle instant client
7
+ for Apple Silicon has not been released yet.**
7
8
 
8
- Look at {file:docs/install-full-client.md}, {file:docs/install-instant-client.md}
9
- or {file:docs/install-binary-package.md} for other platforms.
10
-
11
- Install C compiler
12
- ------------------
13
-
14
- You need to install the command line developer tools or the Xcode.
15
- (The latter includes the former.)
16
-
17
- Run `"cc --version"` in a terminal to check whether they are installed.
18
-
19
- If the cc version is printed, the tools are installed.
20
-
21
- If the follwoing dialog is displayed, click its Install button to
22
- install the tools.
23
- You have no need to install the Xcode to compile ruby-oci8.
24
- It requires command line tools, not an IDE such as the Xcode.
25
-
26
- ![dialog](osx-install-dev-tools.png)
9
+ Prerequisite
10
+ ------------
27
11
 
28
- If `"Agreeing to the Xcode/iOS license requires admin privileges,
29
- please re-run as root via sudo."` is printed, you need to run
30
- `"sudo cc --version"`, enter your password, look at the license
31
- and type `"agree"`.
12
+ * Command line tools for Xcode or Xcode (by executing `xcode-select --install`) or [Xcode]
32
13
 
33
14
  Install Oracle Instant Client Packages
34
15
  --------------------------------------
35
16
 
36
- ### Download Oracle Instant Client Packages
37
-
38
- Download the following packages from [Oracle Technology Network][]
39
-
40
- * Instant Client Package - Basic (`instantclient-basic-macos.x64-12.1.0.2.0.zip`) or Basic Lite (`instantclient-basiclite-macos.x64-12.1.0.2.0.zip`)
41
- * Instant Client Package - SDK (`instantclient-sdk-macos.x64-12.1.0.2.0.zip`)
42
- * Instant Client Package - SQL*Plus (`instantclient-sqlplus-macos.x64-12.1.0.2.0.zip`) (optionally)
43
-
44
- ### Install Oracle Instant Client Packages via Homebrew
45
-
46
- To install `Oracle Instant Client Basic` via [Homebrew][]
47
-
48
- * Copy downloaded zip files to `/Library/Caches/Homebrew`
49
- (if the environment variable `HOMEBREW_CACHE`
50
- is not set and `$HOME/Library/Caches/Homebrew` doesn't exist.)
51
-
52
- * Run the followining commands:
53
-
54
- brew tap InstantClientTap/instantclient
55
- brew install instantclient-basic
56
- brew install instantclient-sdk
57
- brew install instantclient-sqlplus # (optionally)
58
-
59
- * Set the environment variable `OCI_DIR` while performing the following installation steps
60
- if Homebrew is installed outside `/usr/local`.
61
-
62
- export OCI_DIR=$(brew --prefix)/lib
63
-
64
- To install `Oracle Instant Client Basic Lite` via [Homebrew][]
65
-
66
- * Copy downloaded zip files to `/Library/Caches/Homebrew`
67
- (if the environment variable `HOMEBREW_CACHE`
68
- is not set and `$HOME/Library/Caches/Homebrew` doesn't exist.)
69
-
70
- * Run the followining commands:
71
-
72
- brew tap InstantClientTap/instantclient
73
- brew install instantclient-basiclite
74
- brew install instantclient-sdk
75
- brew install instantclient-sqlplus --with-basiclite # (optionally)
76
-
77
- * Set the environment variable `OCI_DIR` while performing the following installation steps
78
- if Homebrew is installed outside `/usr/local`.
79
-
80
- export OCI_DIR=$(brew --prefix)/lib
81
-
82
- ### Install Oracle Instant Client Manually
83
-
84
- If you don't use [Homebrew][], do the following:
85
-
86
- Unzip the packages as follows:
87
-
88
- mkdir -p /opt/oracle
89
- cd /opt/oracle
90
-
91
- Copy downloaded files to /opt/oracle before running the following commands.
92
-
93
- unzip instantclient-basic-macos.x64-12.1.0.2.0.zip
94
- unzip instantclient-sdk-macos.x64-12.1.0.2.0.zip
95
- unzip instantclient-sqlplus-macos.x64-12.1.0.2.0.zip
96
-
97
- Make a symbolic link to link the library.
98
-
99
- cd /opt/oracle/instantclient_12_1
100
- ln -s libclntsh.dylib.12.1 libclntsh.dylib
101
-
102
- Set the environment variable OCI_DIR while performing the following installation steps.
103
-
104
- export OCI_DIR=/opt/oracle/instantclient_12_1
105
-
106
- Installation
107
- ------------
108
-
109
- If you get a problem in the following steps, look at {file:docs/report-installation-issue.md}.
110
-
111
- ### gem package
112
-
113
- Run the following command.
17
+ If you have installed [Homebrew], use the following command:
114
18
 
115
- gem install ruby-oci8
19
+ ```shell
20
+ $ brew tap InstantClientTap/instantclient
21
+ $ brew install instantclient-basic # or instantclient-basiclite
22
+ $ brew install instantclient-sdk
23
+ $ brew install instantclient-sqlplus # (optionally)
24
+ ```
116
25
 
117
- ### tar.gz package
26
+ Otherwise, look at this [page][OTN] and set the environment variable
27
+ `OCI_DIR` to point the the directory where instant client is installed.
28
+ Ruby-oci8 installation script checks the directory.
118
29
 
119
- #### Download the source code
30
+ ```shell
31
+ export OCI_DIR=$HOME/Downloads/instantclient_19_8 # for example
32
+ ```
120
33
 
121
- Download the latest tar.gz package from [download page][].
34
+ Install ruby-oci8
35
+ -----------------
122
36
 
123
- #### Run make and install
37
+ Note that `/usr/bin/ruby` isn't available. You need to use [`rbenv`] or so.
124
38
 
125
- tar xvfz ruby-oci8-VERSION.tar.gz
126
- cd ruby-oci8-VERSION
127
- make
128
- make install
39
+ ```shell
40
+ $ gem install ruby-oci8
41
+ ```
129
42
 
130
- [download page]: https://bintray.com/kubo/generic/ruby-oci8
131
43
  [Homebrew]: http://brew.sh/
132
- [fix_oralib]: https://github.com/kubo/fix_oralib_osx
133
- [Oracle Technology Network]: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
44
+ [OTN]: https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html#ic_osx_inst
45
+ [Xcode]: https://apps.apple.com/us/app/xcode/id497799835
46
+ [`rbenv`]: https://github.com/rbenv/rbenv
@@ -4,7 +4,7 @@ class OCI8
4
4
  module Util
5
5
 
6
6
  case RUBY_PLATFORM
7
- when /mswin32|cygwin|mingw32|bccwin32/
7
+ when /mswin32|cygwin|mingw/
8
8
 
9
9
  require 'fiddle/import'
10
10
  require 'fiddle/types'
data/lib/oci8/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class OCI8
2
- VERSION = "2.2.7"
2
+ VERSION = "2.2.11"
3
3
  end
data/lib/oci8.rb CHANGED
@@ -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)
@@ -63,6 +66,8 @@ when 'rbx'
63
66
  so_basename += 'rbx'
64
67
  when 'jruby'
65
68
  raise "Ruby-oci8 doesn't support jruby because its C extension support is in development in jruby 1.6 and deprecated in jruby 1.7."
69
+ when 'truffleruby'
70
+ so_basename += 'truffleruby'
66
71
  else
67
72
  raise 'unsupported ruby engine: ' + RUBY_ENGINE
68
73
  end
@@ -105,7 +110,7 @@ end
105
110
 
106
111
  begin
107
112
  require so_basename
108
- rescue LoadError, OCIError
113
+ rescue LoadError
109
114
  require 'oci8/check_load_error'
110
115
  OCI8::Util::check_load_error($!)
111
116
  raise
data/lib/oci8lib_250.so CHANGED
Binary file
data/lib/oci8lib_260.so CHANGED
Binary file
Binary file
Binary file
Binary file
data/ruby-oci8.gemspec CHANGED
@@ -50,7 +50,7 @@ EOS
50
50
  # add map files to analyze a core (minidump) file.
51
51
  so_vers.each do |ver|
52
52
  map_file = 'ext/oci8/oci8lib_#{ver}.map'
53
- so_files << map_file if File.exists? map_file
53
+ so_files << map_file if File.exist? map_file
54
54
  end
55
55
 
56
56
  # least version in so_vers
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
data/test/README.md CHANGED
@@ -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
 
data/test/test_break.rb CHANGED
@@ -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
@@ -63,7 +62,7 @@ class TestBreak < Minitest::Test
63
62
  expect = []
64
63
  expect[PLSQL_DONE] = TIME_IN_PLSQL
65
64
  expect[OCIBREAK] = "Invalid status"
66
- if defined? Rubinius and Rubinius::VERSION >= "2.0"
65
+ if (defined? Rubinius and Rubinius::VERSION >= "2.0") || (defined? RUBY_ENGINE and RUBY_ENGINE == "truffleruby")
67
66
  # Rubinius 2.0.0.
68
67
  # DBMS_LOCK.SLEEP blocks ruby threads which try to call C-API.
69
68
  expect[SEND_BREAK] = TIME_TO_BREAK
@@ -100,6 +99,11 @@ class TestBreak < Minitest::Test
100
99
  def test_timeout
101
100
  @conn.non_blocking = true
102
101
  start_time = Time.now
102
+ if server_is_runing_on_windows?
103
+ end_time = start_time + 5
104
+ else
105
+ end_time = start_time + 1
106
+ end
103
107
 
104
108
  if defined? Rubinius and Rubinius::VERSION < "2.0"
105
109
  # Rubinius 1.2.4
@@ -113,12 +117,8 @@ class TestBreak < Minitest::Test
113
117
  @conn.exec("BEGIN DBMS_LOCK.SLEEP(5); END;")
114
118
  end
115
119
  end
116
- if server_is_runing_on_windows?
117
- end_time = start_time + 5
118
- else
119
- end_time = start_time + 1
120
- end
121
120
  assert_in_delta(Time.now, end_time, 1)
121
+ sleep(0.01) # for truffleruby. Is truffleruby too fast?
122
122
  @conn.exec("BEGIN NULL; END;")
123
123
  assert_in_delta(Time.now, end_time, 1)
124
124
  end
@@ -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
@@ -215,9 +215,15 @@ EOS
215
215
  end
216
216
 
217
217
  def test_yaml
218
+ # Use the permitted_classes keyword parameter if it is supported by YAML.load
219
+ keyword_params = if YAML.method(:load).parameters.any? { |key, value| value == :permitted_symbols }
220
+ {permitted_classes: [OraNumber]}
221
+ else
222
+ {}
223
+ end
218
224
  (LARGE_RANGE_VALUES + ['~', '-~']).each do |x|
219
225
  n = OraNumber.new(x)
220
- assert_equal(n, YAML.load(YAML.dump(n)))
226
+ assert_equal(n, YAML.load(YAML.dump(n), **keyword_params))
221
227
  end
222
228
  end
223
229
 
metadata CHANGED
@@ -1,36 +1,26 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-oci8
3
- version: !ruby/object:Gem::Version
4
- hash: 9
5
- prerelease: false
6
- segments:
7
- - 2
8
- - 2
9
- - 7
10
- version: 2.2.7
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.11
11
5
  platform: x86-mingw32
12
- authors:
6
+ authors:
13
7
  - Kubo Takehiro
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2019-01-06 00:00:00 +09:00
19
- default_executable:
11
+ date: 2022-02-22 00:00:00.000000000 Z
20
12
  dependencies: []
13
+ description: 'ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available
14
+ with Oracle 10g or later including Oracle Instant Client.
21
15
 
22
- description: |
23
- ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available with Oracle 10g or later including Oracle Instant Client.
24
-
16
+ '
25
17
  email: kubo@jiubao.org
26
18
  executables: []
27
-
28
19
  extensions: []
29
-
30
- extra_rdoc_files:
20
+ extra_rdoc_files:
31
21
  - README.md
32
- files:
33
- - .yardopts
22
+ files:
23
+ - ".yardopts"
34
24
  - COPYING
35
25
  - COPYING_old
36
26
  - ChangeLog
@@ -38,10 +28,6 @@ files:
38
28
  - NEWS
39
29
  - README.md
40
30
  - dist-files
41
- - metaconfig
42
- - pre-distclean.rb
43
- - ruby-oci8.gemspec
44
- - setup.rb
45
31
  - docs/bind-array-to-in_cond.md
46
32
  - docs/conflicts-local-connections-and-processes.md
47
33
  - docs/hanging-after-inactivity.md
@@ -51,13 +37,12 @@ files:
51
37
  - docs/install-on-osx.md
52
38
  - docs/ldap-auth-and-function-interposition.md
53
39
  - docs/number-type-mapping.md
54
- - docs/osx-install-dev-tools.png
55
40
  - docs/platform-specific-issues.md
56
41
  - docs/report-installation-issue.md
57
42
  - docs/timeout-parameters.md
58
43
  - lib/.document
59
- - lib/oci8.rb
60
44
  - lib/dbd/OCI8.rb
45
+ - lib/oci8.rb
61
46
  - lib/oci8/.document
62
47
  - lib/oci8/bindtype.rb
63
48
  - lib/oci8/check_load_error.rb
@@ -74,7 +59,16 @@ files:
74
59
  - lib/oci8/oracle_version.rb
75
60
  - lib/oci8/properties.rb
76
61
  - lib/oci8/version.rb
62
+ - lib/oci8lib_250.so
63
+ - lib/oci8lib_260.so
64
+ - lib/oci8lib_270.so
65
+ - lib/oci8lib_300.so
66
+ - lib/oci8lib_310.so
77
67
  - lib/ruby-oci8.rb
68
+ - metaconfig
69
+ - pre-distclean.rb
70
+ - ruby-oci8.gemspec
71
+ - setup.rb
78
72
  - test/README.md
79
73
  - test/config.rb
80
74
  - test/setup_test_object.sql
@@ -84,18 +78,18 @@ files:
84
78
  - test/test_array_dml.rb
85
79
  - test/test_bind_array.rb
86
80
  - test/test_bind_boolean.rb
81
+ - test/test_bind_integer.rb
87
82
  - test/test_bind_raw.rb
88
83
  - test/test_bind_string.rb
89
84
  - test/test_bind_time.rb
90
- - test/test_bind_integer.rb
91
85
  - test/test_break.rb
92
86
  - test/test_clob.rb
93
87
  - test/test_connection_pool.rb
94
88
  - test/test_connstr.rb
95
- - test/test_encoding.rb
96
89
  - test/test_datetime.rb
97
90
  - test/test_dbi.rb
98
91
  - test/test_dbi_clob.rb
92
+ - test/test_encoding.rb
99
93
  - test/test_error.rb
100
94
  - test/test_metadata.rb
101
95
  - test/test_object.rb
@@ -106,49 +100,29 @@ files:
106
100
  - test/test_package_type.rb
107
101
  - test/test_properties.rb
108
102
  - test/test_rowid.rb
109
- - lib/oci8lib_191.so
110
- - lib/oci8lib_200.so
111
- - lib/oci8lib_210.so
112
- - lib/oci8lib_220.so
113
- - lib/oci8lib_230.so
114
- - lib/oci8lib_240.so
115
- - lib/oci8lib_250.so
116
- - lib/oci8lib_260.so
117
- has_rdoc: true
118
103
  homepage: http://www.rubydoc.info/github/kubo/ruby-oci8
119
- licenses:
104
+ licenses:
120
105
  - BSD-2-Clause
106
+ metadata: {}
121
107
  post_install_message:
122
108
  rdoc_options: []
123
-
124
- require_paths:
109
+ require_paths:
125
110
  - lib
126
- required_ruby_version: !ruby/object:Gem::Requirement
127
- none: false
128
- requirements:
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
129
113
  - - ">="
130
- - !ruby/object:Gem::Version
131
- hash: 49
132
- segments:
133
- - 1
134
- - 9
135
- - 1
136
- version: 1.9.1
137
- required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
114
+ - !ruby/object:Gem::Version
115
+ version: 2.5.0
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
140
118
  - - ">="
141
- - !ruby/object:Gem::Version
142
- hash: 3
143
- segments:
144
- - 0
145
- version: "0"
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
146
121
  requirements: []
147
-
148
122
  rubyforge_project:
149
- rubygems_version: 1.3.7
123
+ rubygems_version: 2.7.3
150
124
  signing_key:
151
- specification_version: 3
125
+ specification_version: 4
152
126
  summary: Ruby interface for Oracle using OCI8 API
153
- test_files:
127
+ test_files:
154
128
  - test/test_all.rb
Binary file
data/lib/oci8lib_191.so DELETED
Binary file
data/lib/oci8lib_200.so DELETED
Binary file
data/lib/oci8lib_210.so DELETED
Binary file
data/lib/oci8lib_220.so DELETED
Binary file
data/lib/oci8lib_230.so DELETED
Binary file
data/lib/oci8lib_240.so DELETED
Binary file