ruby-oci8 2.2.8 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ChangeLog +25 -0
- data/NEWS +16 -0
- data/README.md +1 -1
- data/ext/oci8/extconf.rb +5 -2
- data/ext/oci8/hook_funcs.c +21 -1
- data/ext/oci8/ocinumber.c +2 -0
- data/ext/oci8/oraconf.rb +37 -16
- data/lib/oci8.rb +2 -0
- data/lib/oci8/version.rb +1 -1
- data/test/test_break.rb +1 -1
- metadata +16 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2c25848b0ead77aa10db38b21ed417f2ed1c698aaf62c2b48b7674b6b3062e34
|
4
|
+
data.tar.gz: 8729938e91275ed0b9c21c6d3812020efa2e1e5c6da8be7c94abd36fcf71d4ef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 07dab83e782e02de48aa1f0f1e89ed52e17a4393a29ab17ce1443b84529d0c0b8aa3fad6c2a787cdd20fde55d3a9e9458de9aca72128479612b5f067c8bac83e
|
7
|
+
data.tar.gz: 63feed97f0d6aedff09e5a283cd5c65a25091bc16c77e36971b864695a1f5ec602b278aad8bc32fc91c79f92a8e5c30c3040ae35b69c6d1e59cbc29b5beb895e
|
data/ChangeLog
CHANGED
@@ -1,3 +1,28 @@
|
|
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
|
+
|
1
26
|
2020-01-11 Kubo Takehiro <kubo@jiubao.org>
|
2
27
|
* NEWS: Add changes between 2.2.7 and 2.2.8.
|
3
28
|
* lib/oci8/version.rb: Update to 2.2.8.
|
data/NEWS
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @markup markdown
|
2
2
|
|
3
|
+
2.2.9 (2020-12-30)
|
4
|
+
==================
|
5
|
+
|
6
|
+
- Support [TruffleRuby](https://github.com/oracle/truffleruby). (GH-225)
|
7
|
+
|
8
|
+
(contributed by Brandon Fish)
|
9
|
+
|
10
|
+
- Remove extension libraries for unmaintained ruby versions from binary gems.
|
11
|
+
|
12
|
+
Fixed issue
|
13
|
+
-----------
|
14
|
+
|
15
|
+
- Allow --with-instant-client-dir along with --with-instant-client-lib/include. (GH-223)
|
16
|
+
|
17
|
+
(reported by Victor Nawothnig)
|
18
|
+
|
3
19
|
2.2.8 (2020-01-11)
|
4
20
|
==================
|
5
21
|
|
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.
|
5
|
+
[![Build Status](https://travis-ci.com/kubo/ruby-oci8.svg?branch=master)](https://travis-ci.com/kubo/ruby-oci8)
|
6
6
|
|
7
7
|
What is ruby-oci8
|
8
8
|
-----------------
|
data/ext/oci8/extconf.rb
CHANGED
@@ -139,6 +139,8 @@ when 'rbx'
|
|
139
139
|
so_basename += 'rbx'
|
140
140
|
when 'jruby'
|
141
141
|
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."
|
142
|
+
when 'truffleruby'
|
143
|
+
so_basename += 'truffleruby'
|
142
144
|
else
|
143
145
|
raise 'unsupported ruby engine: ' + RUBY_ENGINE
|
144
146
|
end
|
@@ -153,8 +155,9 @@ when /darwin/
|
|
153
155
|
else
|
154
156
|
plthook_src = "plthook_elf.c"
|
155
157
|
end
|
156
|
-
|
157
|
-
|
158
|
+
FileUtils.copy(File.dirname(__FILE__) + "/" + plthook_src, CONFTEST_C)
|
159
|
+
if xsystem(cc_command(""))
|
160
|
+
FileUtils.rm_f("#{CONFTEST}.#{$OBJEXT}")
|
158
161
|
puts plthook_src
|
159
162
|
$objs << plthook_src.gsub(/\.c$/, '.o')
|
160
163
|
$objs << "hook_funcs.o"
|
data/ext/oci8/hook_funcs.c
CHANGED
@@ -298,13 +298,28 @@ static void *ocifunc_addr(void *dlsym_handle, const char **file)
|
|
298
298
|
if (dladdr(addr, &dli) == 0) {
|
299
299
|
return NULL;
|
300
300
|
}
|
301
|
-
if (strstr(dli.dli_fname, "/libclntsh." SO_EXT) ==
|
301
|
+
if (strstr(dli.dli_fname, "/libclntsh." SO_EXT) == NULL) {
|
302
302
|
return NULL;
|
303
303
|
}
|
304
304
|
*file = dli.dli_fname;
|
305
305
|
return addr;
|
306
306
|
}
|
307
307
|
|
308
|
+
#ifdef __linux__
|
309
|
+
#include <link.h>
|
310
|
+
static void *ocifunc_addr_linux(const char **file)
|
311
|
+
{
|
312
|
+
struct link_map *lm;
|
313
|
+
for (lm = _r_debug.r_map; lm != NULL; lm = lm->l_next) {
|
314
|
+
if (strstr(lm->l_name, "/libclntsh." SO_EXT) != NULL) {
|
315
|
+
*file = lm->l_name;
|
316
|
+
return (void*)lm->l_addr;
|
317
|
+
}
|
318
|
+
}
|
319
|
+
return NULL;
|
320
|
+
}
|
321
|
+
#endif
|
322
|
+
|
308
323
|
void oci8_install_hook_functions(void)
|
309
324
|
{
|
310
325
|
static int hook_functions_installed = 0;
|
@@ -319,6 +334,11 @@ void oci8_install_hook_functions(void)
|
|
319
334
|
/* OCI symbols may be hooked by LD_PRELOAD. */
|
320
335
|
addr = ocifunc_addr(RTLD_NEXT, &file);
|
321
336
|
}
|
337
|
+
#ifdef __linux__
|
338
|
+
if (addr == NULL) {
|
339
|
+
addr = ocifunc_addr_linux(&file);
|
340
|
+
}
|
341
|
+
#endif
|
322
342
|
if (addr == NULL) {
|
323
343
|
rb_raise(rb_eRuntimeError, "No shared library is found to hook.");
|
324
344
|
}
|
data/ext/oci8/ocinumber.c
CHANGED
@@ -216,6 +216,8 @@ static int set_oci_number_from_num(OCINumber *result, VALUE num, int force, OCIE
|
|
216
216
|
num = rb_big2str(num, 10);
|
217
217
|
set_oci_number_from_str(result, num, Qnil, Qnil, errhp);
|
218
218
|
return 1;
|
219
|
+
default:
|
220
|
+
break;
|
219
221
|
}
|
220
222
|
if (RTEST(rb_obj_is_instance_of(num, cOCINumber))) {
|
221
223
|
/* OCI::Number */
|
data/ext/oci8/oraconf.rb
CHANGED
@@ -994,20 +994,22 @@ class OraConfIC < OraConf
|
|
994
994
|
def initialize(inc_dir, lib_dir)
|
995
995
|
init
|
996
996
|
|
997
|
+
# check lib_dir
|
998
|
+
lib_dirs = lib_dir.split(File::PATH_SEPARATOR)
|
997
999
|
if RUBY_PLATFORM =~ /mswin32|mswin64|cygwin|mingw32|bccwin32/ # when Windows
|
998
|
-
|
1000
|
+
ocilib = lib_dirs.find do |dir|
|
1001
|
+
File.exist?("#{dir}/sdk/lib/msvc/oci.lib")
|
1002
|
+
end
|
1003
|
+
unless ocilib
|
999
1004
|
raise <<EOS
|
1000
1005
|
Could not compile with Oracle instant client.
|
1001
|
-
|
1006
|
+
"sdk/lib/msvc/oci.lib" could not be found in: #{lib_dirs.join(' ')}
|
1007
|
+
Did you install instantclient-basic?
|
1002
1008
|
EOS
|
1003
|
-
raise 'failed'
|
1004
1009
|
end
|
1005
|
-
@
|
1006
|
-
@cflags += " -D_int64=\"long long\"" if RUBY_PLATFORM =~ /cygwin|mingw32/
|
1007
|
-
@libs = get_libs("#{lib_dir}/sdk/lib")
|
1010
|
+
@libs = get_libs("#{ocilib}/sdk/lib")
|
1008
1011
|
ld_path = nil
|
1009
1012
|
else
|
1010
|
-
@cflags = " -I#{inc_dir}"
|
1011
1013
|
# set ld_path and so_ext
|
1012
1014
|
case RUBY_PLATFORM
|
1013
1015
|
when /aix/
|
@@ -1028,34 +1030,53 @@ EOS
|
|
1028
1030
|
so_ext = 'so'
|
1029
1031
|
end
|
1030
1032
|
# check Oracle client library.
|
1031
|
-
|
1032
|
-
|
1033
|
+
ocilib = lib_dirs.find do |dir|
|
1034
|
+
File.exist?("#{dir}/libclntsh.#{so_ext}")
|
1035
|
+
end
|
1036
|
+
unless ocilib
|
1037
|
+
files = lib_dirs.map do |dir|
|
1038
|
+
Dir.glob("#{dir}/libclntsh.#{so_ext}.*")
|
1039
|
+
end.flatten
|
1033
1040
|
if files.empty?
|
1034
1041
|
raise <<EOS
|
1035
1042
|
Could not compile with Oracle instant client.
|
1036
|
-
|
1043
|
+
"libclntsh.#{so_ext}" could not be found in: #{lib_dirs.join(' ')}
|
1037
1044
|
Did you install instantclient-basic?
|
1038
1045
|
EOS
|
1039
1046
|
else
|
1040
|
-
file =
|
1047
|
+
file = files.sort[-1]
|
1041
1048
|
raise <<EOS
|
1042
1049
|
Could not compile with Oracle instant client.
|
1043
|
-
|
1050
|
+
"libclntsh.#{so_ext}" could not be found in: #{lib_dirs.join(' ')}
|
1044
1051
|
You may need to make a symbolic link.
|
1045
|
-
cd #{
|
1046
|
-
ln -s #{file} libclntsh.#{so_ext}
|
1052
|
+
cd #{File.dirname(file)}
|
1053
|
+
ln -s #{File.basename(file)} libclntsh.#{so_ext}
|
1047
1054
|
EOS
|
1048
1055
|
end
|
1049
1056
|
raise 'failed'
|
1050
1057
|
end
|
1051
1058
|
@libs = get_libs(lib_dir)
|
1052
1059
|
end
|
1053
|
-
|
1060
|
+
|
1061
|
+
# check inc_dir
|
1062
|
+
inc_dirs = inc_dir.split(File::PATH_SEPARATOR)
|
1063
|
+
ociinc = inc_dirs.find do |dir|
|
1064
|
+
File.exists?("#{dir}/oci.h")
|
1065
|
+
end
|
1066
|
+
unless ociinc
|
1054
1067
|
raise <<EOS
|
1055
|
-
|
1068
|
+
"oci.h" could not be found in: #{inc_dirs.join(' ')}
|
1056
1069
|
Install 'Instant Client SDK'.
|
1057
1070
|
EOS
|
1058
1071
|
end
|
1072
|
+
if ociinc.include?(' ')
|
1073
|
+
@cflags = " \"-I#{ociinc}\""
|
1074
|
+
else
|
1075
|
+
@cflags = " -I#{ociinc}"
|
1076
|
+
end
|
1077
|
+
@cflags += " -D_int64=\"long long\"" if RUBY_PLATFORM =~ /cygwin|mingw32/
|
1078
|
+
|
1079
|
+
# check link
|
1059
1080
|
$CFLAGS += @cflags
|
1060
1081
|
if try_link_oci()
|
1061
1082
|
major = try_constant("OCI_MAJOR_VERSION", "oci.h")
|
data/lib/oci8.rb
CHANGED
@@ -66,6 +66,8 @@ when 'rbx'
|
|
66
66
|
so_basename += 'rbx'
|
67
67
|
when 'jruby'
|
68
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'
|
69
71
|
else
|
70
72
|
raise 'unsupported ruby engine: ' + RUBY_ENGINE
|
71
73
|
end
|
data/lib/oci8/version.rb
CHANGED
data/test/test_break.rb
CHANGED
@@ -62,7 +62,7 @@ class TestBreak < Minitest::Test
|
|
62
62
|
expect = []
|
63
63
|
expect[PLSQL_DONE] = TIME_IN_PLSQL
|
64
64
|
expect[OCIBREAK] = "Invalid status"
|
65
|
-
if defined? Rubinius and Rubinius::VERSION >= "2.0"
|
65
|
+
if (defined? Rubinius and Rubinius::VERSION >= "2.0") || (defined? RUBY_ENGINE and RUBY_ENGINE == "truffleruby")
|
66
66
|
# Rubinius 2.0.0.
|
67
67
|
# DBMS_LOCK.SLEEP blocks ruby threads which try to call C-API.
|
68
68
|
expect[SEND_BREAK] = TIME_TO_BREAK
|
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-oci8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.9
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kubo Takehiro
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2020-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
13
|
+
description: 'ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available
|
15
14
|
with Oracle 10g or later including Oracle Instant Client.
|
16
15
|
|
17
16
|
'
|
@@ -22,7 +21,7 @@ extensions:
|
|
22
21
|
extra_rdoc_files:
|
23
22
|
- README.md
|
24
23
|
files:
|
25
|
-
- .yardopts
|
24
|
+
- ".yardopts"
|
26
25
|
- COPYING
|
27
26
|
- COPYING_old
|
28
27
|
- ChangeLog
|
@@ -30,10 +29,6 @@ files:
|
|
30
29
|
- NEWS
|
31
30
|
- README.md
|
32
31
|
- dist-files
|
33
|
-
- metaconfig
|
34
|
-
- pre-distclean.rb
|
35
|
-
- ruby-oci8.gemspec
|
36
|
-
- setup.rb
|
37
32
|
- docs/bind-array-to-in_cond.md
|
38
33
|
- docs/conflicts-local-connections-and-processes.md
|
39
34
|
- docs/hanging-after-inactivity.md
|
@@ -85,8 +80,8 @@ files:
|
|
85
80
|
- ext/oci8/util.c
|
86
81
|
- ext/oci8/win32.c
|
87
82
|
- lib/.document
|
88
|
-
- lib/oci8.rb
|
89
83
|
- lib/dbd/OCI8.rb
|
84
|
+
- lib/oci8.rb
|
90
85
|
- lib/oci8/.document
|
91
86
|
- lib/oci8/bindtype.rb
|
92
87
|
- lib/oci8/check_load_error.rb
|
@@ -104,6 +99,10 @@ files:
|
|
104
99
|
- lib/oci8/properties.rb
|
105
100
|
- lib/oci8/version.rb
|
106
101
|
- lib/ruby-oci8.rb
|
102
|
+
- metaconfig
|
103
|
+
- pre-distclean.rb
|
104
|
+
- ruby-oci8.gemspec
|
105
|
+
- setup.rb
|
107
106
|
- test/README.md
|
108
107
|
- test/config.rb
|
109
108
|
- test/setup_test_object.sql
|
@@ -113,18 +112,18 @@ files:
|
|
113
112
|
- test/test_array_dml.rb
|
114
113
|
- test/test_bind_array.rb
|
115
114
|
- test/test_bind_boolean.rb
|
115
|
+
- test/test_bind_integer.rb
|
116
116
|
- test/test_bind_raw.rb
|
117
117
|
- test/test_bind_string.rb
|
118
118
|
- test/test_bind_time.rb
|
119
|
-
- test/test_bind_integer.rb
|
120
119
|
- test/test_break.rb
|
121
120
|
- test/test_clob.rb
|
122
121
|
- test/test_connection_pool.rb
|
123
122
|
- test/test_connstr.rb
|
124
|
-
- test/test_encoding.rb
|
125
123
|
- test/test_datetime.rb
|
126
124
|
- test/test_dbi.rb
|
127
125
|
- test/test_dbi_clob.rb
|
126
|
+
- test/test_encoding.rb
|
128
127
|
- test/test_error.rb
|
129
128
|
- test/test_metadata.rb
|
130
129
|
- test/test_object.rb
|
@@ -138,28 +137,26 @@ files:
|
|
138
137
|
homepage: http://www.rubydoc.info/github/kubo/ruby-oci8
|
139
138
|
licenses:
|
140
139
|
- BSD-2-Clause
|
140
|
+
metadata: {}
|
141
141
|
post_install_message:
|
142
142
|
rdoc_options: []
|
143
143
|
require_paths:
|
144
144
|
- lib
|
145
145
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
146
|
requirements:
|
148
|
-
- -
|
147
|
+
- - ">="
|
149
148
|
- !ruby/object:Gem::Version
|
150
149
|
version: 1.9.1
|
151
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
-
none: false
|
153
151
|
requirements:
|
154
|
-
- -
|
152
|
+
- - ">="
|
155
153
|
- !ruby/object:Gem::Version
|
156
154
|
version: '0'
|
157
155
|
requirements: []
|
158
156
|
rubyforge_project:
|
159
|
-
rubygems_version:
|
157
|
+
rubygems_version: 2.7.3
|
160
158
|
signing_key:
|
161
|
-
specification_version:
|
159
|
+
specification_version: 4
|
162
160
|
summary: Ruby interface for Oracle using OCI8 API
|
163
161
|
test_files:
|
164
162
|
- test/test_all.rb
|
165
|
-
has_rdoc:
|