ruby-oci8 2.2.3 → 2.2.12

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.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +427 -0
  3. data/NEWS +335 -42
  4. data/README.md +20 -9
  5. data/dist-files +9 -3
  6. data/docs/bind-array-to-in_cond.md +2 -2
  7. data/docs/conflicts-local-connections-and-processes.md +7 -4
  8. data/docs/hanging-after-inactivity.md +63 -0
  9. data/docs/install-binary-package.md +15 -11
  10. data/docs/install-full-client.md +18 -21
  11. data/docs/install-instant-client.md +45 -27
  12. data/docs/install-on-osx.md +31 -120
  13. data/docs/ldap-auth-and-function-interposition.md +123 -0
  14. data/docs/number-type-mapping.md +79 -0
  15. data/docs/platform-specific-issues.md +17 -50
  16. data/docs/report-installation-issue.md +3 -0
  17. data/docs/timeout-parameters.md +3 -0
  18. data/ext/oci8/apiwrap.c.tmpl +2 -5
  19. data/ext/oci8/apiwrap.rb +6 -1
  20. data/ext/oci8/apiwrap.yml +34 -22
  21. data/ext/oci8/attr.c +4 -2
  22. data/ext/oci8/bind.c +366 -6
  23. data/ext/oci8/connection_pool.c +3 -3
  24. data/ext/oci8/encoding.c +5 -5
  25. data/ext/oci8/env.c +8 -2
  26. data/ext/oci8/error.c +24 -16
  27. data/ext/oci8/extconf.rb +8 -4
  28. data/ext/oci8/hook_funcs.c +274 -61
  29. data/ext/oci8/lob.c +31 -75
  30. data/ext/oci8/metadata.c +2 -2
  31. data/ext/oci8/object.c +72 -27
  32. data/ext/oci8/oci8.c +45 -132
  33. data/ext/oci8/oci8.h +32 -88
  34. data/ext/oci8/oci8lib.c +178 -38
  35. data/ext/oci8/ocihandle.c +37 -37
  36. data/ext/oci8/ocinumber.c +23 -18
  37. data/ext/oci8/oraconf.rb +158 -339
  38. data/ext/oci8/oradate.c +19 -19
  39. data/ext/oci8/plthook.h +10 -0
  40. data/ext/oci8/plthook_elf.c +433 -268
  41. data/ext/oci8/plthook_osx.c +40 -9
  42. data/ext/oci8/plthook_win32.c +9 -0
  43. data/ext/oci8/stmt.c +52 -17
  44. data/ext/oci8/win32.c +4 -22
  45. data/lib/oci8/bindtype.rb +1 -15
  46. data/lib/oci8/check_load_error.rb +57 -10
  47. data/lib/oci8/cursor.rb +57 -25
  48. data/lib/oci8/metadata.rb +9 -1
  49. data/lib/oci8/object.rb +10 -0
  50. data/lib/oci8/oci8.rb +33 -28
  51. data/lib/oci8/oracle_version.rb +11 -1
  52. data/lib/oci8/properties.rb +22 -0
  53. data/lib/oci8/version.rb +1 -1
  54. data/lib/oci8.rb +48 -4
  55. data/lib/ruby-oci8.rb +0 -3
  56. data/pre-distclean.rb +1 -3
  57. data/ruby-oci8.gemspec +3 -8
  58. data/setup.rb +11 -2
  59. data/test/README.md +37 -0
  60. data/test/config.rb +1 -1
  61. data/test/setup_test_object.sql +21 -13
  62. data/test/setup_test_package.sql +59 -0
  63. data/test/test_all.rb +2 -0
  64. data/test/test_bind_boolean.rb +99 -0
  65. data/test/test_bind_integer.rb +47 -0
  66. data/test/test_break.rb +11 -9
  67. data/test/test_clob.rb +4 -16
  68. data/test/test_connstr.rb +29 -13
  69. data/test/test_datetime.rb +8 -3
  70. data/test/test_object.rb +27 -9
  71. data/test/test_oci8.rb +170 -46
  72. data/test/test_oranumber.rb +12 -6
  73. data/test/test_package_type.rb +15 -3
  74. data/test/test_properties.rb +17 -0
  75. metadata +40 -54
  76. data/docs/osx-install-dev-tools.png +0 -0
  77. data/test/README +0 -42
@@ -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
 
@@ -702,12 +708,12 @@ EOS
702
708
  def test_new_from_bigdecimal
703
709
  ["+Infinity", "-Infinity", "NaN"].each do |n|
704
710
  assert_raises TypeError do
705
- OraNumber.new(BigDecimal.new(n))
711
+ OraNumber.new(BigDecimal(n))
706
712
  end
707
713
  end
708
714
 
709
715
  LARGE_RANGE_VALUES.each do |val|
710
- assert_equal(val, OraNumber.new(BigDecimal.new(val)).to_s)
716
+ assert_equal(val, OraNumber.new(BigDecimal(val)).to_s)
711
717
  end
712
718
  end
713
719
 
@@ -738,9 +744,9 @@ EOS
738
744
  LARGE_RANGE_VALUES
739
745
  end
740
746
 
741
- def test_has_decimal_part
742
- assert_equal(false, OraNumber(10.0).has_decimal_part?)
743
- assert_equal(true, OraNumber(10.1).has_decimal_part?)
747
+ def test_has_fractional_part
748
+ assert_equal(false, OraNumber(10.0).has_fractional_part?)
749
+ assert_equal(true, OraNumber(10.1).has_fractional_part?)
744
750
  end
745
751
 
746
752
  def test_float_conversion_type_ruby
@@ -639,7 +639,11 @@ class TestPackageType < Minitest::Test
639
639
  :sub_name => "TABLE_OF_PLS_INTEGER",
640
640
  :link => "",
641
641
  #:type_metadata => nil,
642
- :arguments => {
642
+ :arguments => ($oracle_server_version >= OCI8::ORAVER_18) ?
643
+ {
644
+ :class => Array,
645
+ :size => 0,
646
+ } : {
643
647
  :class => Array,
644
648
  :size => 1,
645
649
  [0] => {
@@ -729,7 +733,11 @@ class TestPackageType < Minitest::Test
729
733
  :sub_name => "TABLE_OF_REC1",
730
734
  :link => "",
731
735
  #:type_metadata => nil,
732
- :arguments => {
736
+ :arguments => ($oracle_server_version >= OCI8::ORAVER_18) ?
737
+ {
738
+ :class => Array,
739
+ :size => 0,
740
+ } : {
733
741
  :class => Array,
734
742
  :size => 1,
735
743
  [0] => {
@@ -846,7 +854,11 @@ class TestPackageType < Minitest::Test
846
854
  :sub_name => "TABLE_OF_REC1",
847
855
  :link => "",
848
856
  #:type_metadata => nil,
849
- :arguments => {
857
+ :arguments => ($oracle_server_version >= OCI8::ORAVER_18) ?
858
+ {
859
+ :class => Array,
860
+ :size => 0,
861
+ } : {
850
862
  :class => Array,
851
863
  :size => 1,
852
864
  [0] => {
@@ -0,0 +1,17 @@
1
+ require 'oci8'
2
+ require File.dirname(__FILE__) + '/config'
3
+
4
+ class TestProperties < Minitest::Test
5
+ def test_tcp_keepalive_time
6
+ begin
7
+ oldval = OCI8.properties[:tcp_keepalive_time]
8
+ begin
9
+ OCI8.properties[:tcp_keepalive_time] = 600
10
+ assert(true)
11
+ ensure
12
+ OCI8.properties[:tcp_keepalive_time] = oldval
13
+ end
14
+ rescue NotImplementedError
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,35 +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
- - 3
9
- version: 2.2.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.12
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Kubo Takehiro
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2016-12-27 00:00:00 +09:00
18
- default_executable:
11
+ date: 2022-12-30 00:00:00.000000000 Z
19
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.
20
15
 
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
-
16
+ '
24
17
  email: kubo@jiubao.org
25
18
  executables: []
26
-
27
- extensions:
19
+ extensions:
28
20
  - ext/oci8/extconf.rb
29
- extra_rdoc_files:
21
+ extra_rdoc_files:
30
22
  - README.md
31
- files:
32
- - .yardopts
23
+ files:
24
+ - ".yardopts"
33
25
  - COPYING
34
26
  - COPYING_old
35
27
  - ChangeLog
@@ -37,17 +29,15 @@ files:
37
29
  - NEWS
38
30
  - README.md
39
31
  - dist-files
40
- - metaconfig
41
- - pre-distclean.rb
42
- - ruby-oci8.gemspec
43
- - setup.rb
44
32
  - docs/bind-array-to-in_cond.md
33
+ - docs/conflicts-local-connections-and-processes.md
34
+ - docs/hanging-after-inactivity.md
45
35
  - docs/install-binary-package.md
46
36
  - docs/install-full-client.md
47
37
  - docs/install-instant-client.md
48
38
  - docs/install-on-osx.md
49
- - docs/conflicts-local-connections-and-processes.md
50
- - docs/osx-install-dev-tools.png
39
+ - docs/ldap-auth-and-function-interposition.md
40
+ - docs/number-type-mapping.md
51
41
  - docs/platform-specific-issues.md
52
42
  - docs/report-installation-issue.md
53
43
  - docs/timeout-parameters.md
@@ -89,8 +79,8 @@ files:
89
79
  - ext/oci8/util.c
90
80
  - ext/oci8/win32.c
91
81
  - lib/.document
92
- - lib/oci8.rb
93
82
  - lib/dbd/OCI8.rb
83
+ - lib/oci8.rb
94
84
  - lib/oci8/.document
95
85
  - lib/oci8/bindtype.rb
96
86
  - lib/oci8/check_load_error.rb
@@ -108,13 +98,20 @@ files:
108
98
  - lib/oci8/properties.rb
109
99
  - lib/oci8/version.rb
110
100
  - lib/ruby-oci8.rb
111
- - test/README
101
+ - metaconfig
102
+ - pre-distclean.rb
103
+ - ruby-oci8.gemspec
104
+ - setup.rb
105
+ - test/README.md
112
106
  - test/config.rb
113
107
  - test/setup_test_object.sql
108
+ - test/setup_test_package.sql
114
109
  - test/test_all.rb
115
110
  - test/test_appinfo.rb
116
111
  - test/test_array_dml.rb
117
112
  - test/test_bind_array.rb
113
+ - test/test_bind_boolean.rb
114
+ - test/test_bind_integer.rb
118
115
  - test/test_bind_raw.rb
119
116
  - test/test_bind_string.rb
120
117
  - test/test_bind_time.rb
@@ -122,10 +119,10 @@ files:
122
119
  - test/test_clob.rb
123
120
  - test/test_connection_pool.rb
124
121
  - test/test_connstr.rb
125
- - test/test_encoding.rb
126
122
  - test/test_datetime.rb
127
123
  - test/test_dbi.rb
128
124
  - test/test_dbi_clob.rb
125
+ - test/test_encoding.rb
129
126
  - test/test_error.rb
130
127
  - test/test_metadata.rb
131
128
  - test/test_object.rb
@@ -134,41 +131,30 @@ files:
134
131
  - test/test_oradate.rb
135
132
  - test/test_oranumber.rb
136
133
  - test/test_package_type.rb
134
+ - test/test_properties.rb
137
135
  - test/test_rowid.rb
138
- has_rdoc: true
139
136
  homepage: http://www.rubydoc.info/github/kubo/ruby-oci8
140
- licenses:
137
+ licenses:
141
138
  - BSD-2-Clause
139
+ metadata: {}
142
140
  post_install_message:
143
141
  rdoc_options: []
144
-
145
- require_paths:
142
+ require_paths:
146
143
  - lib
147
- - ext/oci8
148
- required_ruby_version: !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
151
146
  - - ">="
152
- - !ruby/object:Gem::Version
153
- segments:
154
- - 1
155
- - 9
156
- - 1
147
+ - !ruby/object:Gem::Version
157
148
  version: 1.9.1
158
- required_rubygems_version: !ruby/object:Gem::Requirement
159
- none: false
160
- requirements:
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
161
151
  - - ">="
162
- - !ruby/object:Gem::Version
163
- segments:
164
- - 0
165
- version: "0"
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
166
154
  requirements: []
167
-
168
- rubyforge_project:
169
- rubygems_version: 1.3.7
155
+ rubygems_version: 3.4.1
170
156
  signing_key:
171
- specification_version: 3
157
+ specification_version: 4
172
158
  summary: Ruby interface for Oracle using OCI8 API
173
- test_files:
159
+ test_files:
174
160
  - test/test_all.rb
Binary file
data/test/README DELETED
@@ -1,42 +0,0 @@
1
- Before runing unit test:
2
-
3
- 1. connect to Oracle as system:
4
-
5
- $ sqlplus system/<password_of_system>
6
-
7
- 2. create user ruby:
8
-
9
- SQL> CREATE USER ruby IDENTIFIED BY oci8;
10
-
11
- or
12
-
13
- SQL> CREATE USER ruby IDENTIFIED BY oci8
14
- 2 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
15
-
16
- 3. grant the privilege to connect and execute.
17
-
18
- SQL> GRANT connect, resource, create view TO ruby;
19
-
20
- 4. connect to Oracle as sys
21
-
22
- $ sqlplus 'sys/<password_of_sys> as sysdba'
23
-
24
- 5. grant privileges
25
-
26
- SQL> GRANT EXECUTE ON dbms_lock TO ruby;
27
- SQL> GRANT CREATE VIEW TO ruby;
28
-
29
- 6. connect as ruby user.
30
-
31
- $ sqlplus ruby/oci8
32
-
33
- 7. Create object types
34
-
35
- SQL> @test/setup_test_object.sql
36
-
37
- 8. change $dbname if the database
38
-
39
- Then you can run:
40
- $ make check
41
- or
42
- $ nmake check (If your compiler is MS Visual C++.)