ruby-oci8 2.2.4.1 → 2.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +311 -1
  3. data/NEWS +278 -46
  4. data/README.md +5 -2
  5. data/dist-files +8 -4
  6. data/docs/bind-array-to-in_cond.md +1 -1
  7. data/docs/install-instant-client.md +2 -1
  8. data/docs/install-on-osx.md +29 -116
  9. data/docs/ldap-auth-and-function-interposition.md +123 -0
  10. data/docs/number-type-mapping.md +79 -0
  11. data/ext/oci8/apiwrap.c.tmpl +2 -5
  12. data/ext/oci8/apiwrap.rb +6 -1
  13. data/ext/oci8/apiwrap.yml +34 -22
  14. data/ext/oci8/attr.c +4 -2
  15. data/ext/oci8/bind.c +366 -6
  16. data/ext/oci8/connection_pool.c +3 -3
  17. data/ext/oci8/error.c +18 -33
  18. data/ext/oci8/extconf.rb +7 -4
  19. data/ext/oci8/hook_funcs.c +128 -51
  20. data/ext/oci8/lob.c +31 -75
  21. data/ext/oci8/metadata.c +2 -2
  22. data/ext/oci8/object.c +72 -27
  23. data/ext/oci8/oci8.c +27 -119
  24. data/ext/oci8/oci8.h +21 -3
  25. data/ext/oci8/oci8lib.c +50 -37
  26. data/ext/oci8/ocihandle.c +2 -2
  27. data/ext/oci8/ocinumber.c +22 -16
  28. data/ext/oci8/oraconf.rb +130 -257
  29. data/ext/oci8/oradate.c +1 -1
  30. data/ext/oci8/plthook_elf.c +384 -300
  31. data/ext/oci8/plthook_osx.c +10 -10
  32. data/ext/oci8/stmt.c +51 -16
  33. data/ext/oci8/win32.c +4 -22
  34. data/lib/oci8/bindtype.rb +1 -15
  35. data/lib/oci8/check_load_error.rb +57 -10
  36. data/lib/oci8/cursor.rb +48 -17
  37. data/lib/oci8/metadata.rb +9 -1
  38. data/lib/oci8/object.rb +10 -0
  39. data/lib/oci8/oci8.rb +26 -25
  40. data/lib/oci8/oracle_version.rb +11 -1
  41. data/lib/oci8/version.rb +1 -1
  42. data/lib/oci8.rb +11 -4
  43. data/lib/ruby-oci8.rb +0 -3
  44. data/ruby-oci8.gemspec +2 -3
  45. data/setup.rb +11 -2
  46. data/test/README.md +37 -0
  47. data/test/config.rb +1 -1
  48. data/test/setup_test_object.sql +21 -13
  49. data/test/setup_test_package.sql +59 -0
  50. data/test/test_all.rb +1 -0
  51. data/test/test_bind_boolean.rb +99 -0
  52. data/test/test_break.rb +11 -9
  53. data/test/test_clob.rb +4 -16
  54. data/test/test_datetime.rb +8 -3
  55. data/test/test_object.rb +33 -9
  56. data/test/test_oci8.rb +169 -45
  57. data/test/test_oranumber.rb +12 -6
  58. data/test/test_package_type.rb +15 -3
  59. data/test/test_properties.rb +17 -0
  60. metadata +40 -57
  61. data/docs/osx-install-dev-tools.png +0 -0
  62. data/test/README +0 -42
data/test/test_oci8.rb CHANGED
@@ -25,54 +25,142 @@ EOS
25
25
  drop_table('test_rename_table')
26
26
  end
27
27
 
28
- # USE_DYNAMIC_FETCH doesn't work well...
29
- # This test is disabled.
30
- def _test_long_type
31
- drop_table('test_table')
32
- @conn.exec('CREATE TABLE test_table (id number(38), lng long)')
33
- test_data1 = 'a' * 70000
34
- test_data2 = 'b' * 3000
35
- test_data3 = nil
36
- test_data4 = 'c' * 70000
37
- @conn.exec('insert into test_table values (:1, :2)', 1, test_data1)
38
- @conn.exec('insert into test_table values (:1, :2)', 2, [test_data2, :long])
39
- @conn.exec('insert into test_table values (:1, :2)', 3, [nil, :long])
40
- @conn.exec('insert into test_table values (:1, :2)', 4, [test_data4, :long])
41
-
42
- [8000, 65535, 65536, 80000].each do |read_len|
43
- @conn.long_read_len = read_len
44
- cursor = @conn.parse('SELECT lng from test_table order by id')
45
- cursor.exec
46
- assert_equal(test_data1, cursor.fetch[0])
47
- assert_equal(test_data2, cursor.fetch[0])
48
- assert_equal(test_data3, cursor.fetch[0])
49
- assert_equal(test_data4, cursor.fetch[0])
50
- cursor.close
28
+ # Set `OCI8::BindType::Base.initial_chunk_size = 5` to
29
+ # use the following test data.
30
+ LONG_TEST_DATA = [
31
+ # initial chunk size: 5 (total buffer size: 5)
32
+ 'a' * 4, 'b' * 5, 'c' * 6, 'd' * 5, 'e' * 4,
33
+ # second chunk size: 10 (total buffer size: 15)
34
+ 'f' * 14, 'g' * 15, 'h' * 16, 'i' * 15, 'j' * 14,
35
+ # third chunk size: 20 (total buffer size: 35)
36
+ 'k' * 34, 'l' * 35, 'm' * 36, 'n' * 35, 'o' * 34,
37
+ # use data around initial chunk size again
38
+ 'p' * 4, 'q' * 5, 'r' * 6, 's' * 5, 't' * 4,
39
+ # special data
40
+ '', nil,
41
+ ]
42
+
43
+ def test_long_type
44
+ clob_bind_type = OCI8::BindType::Mapping[:clob]
45
+ blob_bind_type = OCI8::BindType::Mapping[:blob]
46
+ initial_cunk_size = OCI8::BindType::Base.initial_chunk_size
47
+ begin
48
+ OCI8::BindType::Base.initial_chunk_size = 5
49
+ @conn.prefetch_rows = LONG_TEST_DATA.size / 3
50
+ drop_table('test_table')
51
+ ascii_enc = Encoding.find('US-ASCII')
52
+ 0.upto(1) do |i|
53
+ if i == 0
54
+ @conn.exec("CREATE TABLE test_table (id number(38), long_column long, clob_column clob)")
55
+ cursor = @conn.parse('insert into test_table values (:1, :2, :3)')
56
+ cursor.bind_param(1, nil, Integer)
57
+ cursor.bind_param(2, nil, :long)
58
+ cursor.bind_param(3, nil, :clob)
59
+ lob = OCI8::CLOB.new(@conn, '')
60
+ enc = Encoding.default_internal || OCI8.encoding
61
+ else
62
+ @conn.exec("CREATE TABLE test_table (id number(38), long_raw_column long raw, blob_column blob)")
63
+ cursor = @conn.parse('insert into test_table values (:1, :2, :3)')
64
+ cursor.bind_param(1, nil, Integer)
65
+ cursor.bind_param(2, nil, :long_raw)
66
+ cursor.bind_param(3, nil, :blob)
67
+ lob = OCI8::BLOB.new(@conn, '')
68
+ enc = Encoding.find('ASCII-8BIT')
69
+ end
70
+
71
+ LONG_TEST_DATA.each_with_index do |data, index|
72
+ cursor[1] = index
73
+ cursor[2] = data
74
+ if data.nil?
75
+ cursor[3] = nil
76
+ else
77
+ lob.rewind
78
+ lob.write(data)
79
+ lob.size = data.size
80
+ cursor[3] = lob
81
+ end
82
+ cursor.exec
83
+ end
84
+ cursor.close
85
+
86
+ cursor = @conn.parse('SELECT * from test_table order by id')
87
+ cursor.exec
88
+ LONG_TEST_DATA.each_with_index do |data, index|
89
+ row = cursor.fetch
90
+ assert_equal(index, row[0])
91
+ if data.nil?
92
+ assert_nil(row[1])
93
+ assert_nil(row[2])
94
+ elsif data.empty?
95
+ # '' is inserted to the long or long raw column as null.
96
+ assert_nil(row[1])
97
+ # '' is inserted to the clob or blob column as an empty clob.
98
+ # It is fetched as '' when the data is read using a LOB locator.
99
+ assert_equal(data, clob_data = row[2].read)
100
+ assert_equal(ascii_enc, clob_data.encoding)
101
+ else
102
+ assert_equal(data, row[1])
103
+ assert_equal(data, clob_data = row[2].read)
104
+ assert_equal(enc, row[1].encoding)
105
+ assert_equal(enc, clob_data.encoding)
106
+ end
107
+ end
108
+ assert_nil(cursor.fetch)
109
+ cursor.close
110
+
111
+ begin
112
+ OCI8::BindType::Mapping[:clob] = OCI8::BindType::Long
113
+ OCI8::BindType::Mapping[:blob] = OCI8::BindType::LongRaw
114
+ cursor = @conn.parse('SELECT * from test_table order by id')
115
+ cursor.exec
116
+ LONG_TEST_DATA.each_with_index do |data, index|
117
+ row = cursor.fetch
118
+ assert_equal(index, row[0])
119
+ if data.nil?
120
+ assert_nil(row[1])
121
+ assert_nil(row[2])
122
+ elsif data.empty?
123
+ # '' is inserted to the long or long raw column as null.
124
+ assert_nil(row[1])
125
+ # '' is inserted to the clob or blob column as an empty clob.
126
+ # However it is fetched as nil.
127
+ assert_nil(row[2])
128
+ else
129
+ assert_equal(data, row[1])
130
+ assert_equal(data, row[2])
131
+ assert_equal(enc, row[1].encoding)
132
+ assert_equal(enc, row[2].encoding)
133
+ end
134
+ end
135
+ assert_nil(cursor.fetch)
136
+ cursor.close
137
+ ensure
138
+ OCI8::BindType::Mapping[:clob] = clob_bind_type
139
+ OCI8::BindType::Mapping[:blob] = blob_bind_type
140
+ end
141
+ drop_table('test_table')
142
+ end
143
+ ensure
144
+ OCI8::BindType::Base.initial_chunk_size = initial_cunk_size
51
145
  end
52
146
  drop_table('test_table')
53
147
  end
54
148
 
55
- def test_long_type
56
- @conn.long_read_len = 80000
57
- drop_table('test_table')
58
- @conn.exec('CREATE TABLE test_table (id number(38), lng long)')
59
- test_data1 = 'a' * 70000
60
- test_data2 = 'b' * 3000
61
- test_data3 = nil
62
- test_data4 = 'c' * 70000
63
- @conn.exec('insert into test_table values (:1, :2)', 1, test_data1)
64
- @conn.exec('insert into test_table values (:1, :2)', 2, [test_data2, :long])
65
- @conn.exec('insert into test_table values (:1, :2)', 3, [nil, :long])
66
- @conn.exec('insert into test_table values (:1, :2)', 4, [test_data4, :long])
67
-
68
- cursor = @conn.parse('SELECT lng from test_table order by id')
69
- cursor.exec
70
- assert_equal(test_data1, cursor.fetch[0])
71
- assert_equal(test_data2, cursor.fetch[0])
72
- assert_nil(cursor.fetch[0])
73
- assert_equal(test_data4, cursor.fetch[0])
74
- cursor.close
75
- drop_table('test_table')
149
+ def test_bind_long_data
150
+ initial_cunk_size = OCI8::BindType::Base.initial_chunk_size
151
+ begin
152
+ OCI8::BindType::Base.initial_chunk_size = 5
153
+ cursor = @conn.parse("begin :1 := '<' || :2 || '>'; end;")
154
+ cursor.bind_param(1, nil, :long)
155
+ cursor.bind_param(2, nil, :long)
156
+ (LONG_TEST_DATA + ['z' * 4000]).each do |data|
157
+ cursor[2] = data
158
+ cursor.exec
159
+ assert_equal("<#{data}>", cursor[1])
160
+ end
161
+ ensure
162
+ OCI8::BindType::Base.initial_chunk_size = initial_cunk_size
163
+ end
76
164
  end
77
165
 
78
166
  def test_select
@@ -451,6 +539,7 @@ EOS
451
539
  assert_nil(@conn.last_error)
452
540
  @conn.last_error = 'dummy'
453
541
  cursor = @conn.parse('select col1, max(col2) from (select 1 as col1, null as col2 from dual) group by col1')
542
+ cursor.prefetch_rows = 1
454
543
  assert_nil(@conn.last_error)
455
544
 
456
545
  # When an OCI function returns OCI_SUCCESS_WITH_INFO, OCI8#last_error is set.
@@ -492,9 +581,44 @@ EOS
492
581
  else
493
582
  raise "Unknown column size #{column_size}"
494
583
  end
495
- driver_name = cursor.fetch[0]
584
+ driver_name = cursor.fetch[0].strip
496
585
  cursor.close
497
586
  assert_equal(expected_value, driver_name)
498
587
  end
499
588
  end
589
+
590
+ def test_server_version
591
+ cursor = @conn.exec("select * from product_component_version where product like 'Oracle Database %'")
592
+ row = cursor.fetch_hash
593
+ cursor.close
594
+ ver = if OCI8::oracle_client_version >= OCI8::ORAVER_18
595
+ row['VERSION_FULL'] || row['VERSION']
596
+ else
597
+ # OCI8#oracle_server_version could not get infomation corresponding
598
+ # to VERSION_FULL when the Oracle client version is below 18.1.
599
+ row['VERSION']
600
+ end
601
+ assert_equal(ver, @conn.oracle_server_version.to_s)
602
+ end
603
+
604
+ def test_array_fetch
605
+ drop_table('test_table')
606
+ @conn.exec("CREATE TABLE test_table (id number, val clob)")
607
+ cursor = @conn.parse("INSERT INTO test_table VALUES (:1, :2)")
608
+ 1.upto(10) do |i|
609
+ cursor.exec(i, ('a'.ord + i).chr * i)
610
+ end
611
+ cursor.close
612
+ cursor = @conn.parse("select * from test_table where id <= :1 order by id")
613
+ cursor.prefetch_rows = 4
614
+ [1, 6, 2, 7, 3, 8, 4, 9, 5, 10].each do |i|
615
+ cursor.exec(i)
616
+ 1.upto(i) do |j|
617
+ row = cursor.fetch
618
+ assert_equal(j, row[0])
619
+ assert_equal(('a'.ord + j).chr * j, row[1].read)
620
+ end
621
+ assert_nil(cursor.fetch)
622
+ end
623
+ end
500
624
  end # TestOCI8
@@ -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,36 +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
- - 4
9
- - 1
10
- version: 2.2.4.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.11
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Kubo Takehiro
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2017-06-17 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
- extensions:
19
+ extensions:
29
20
  - ext/oci8/extconf.rb
30
- extra_rdoc_files:
21
+ extra_rdoc_files:
31
22
  - README.md
32
- files:
33
- - .yardopts
23
+ files:
24
+ - ".yardopts"
34
25
  - COPYING
35
26
  - COPYING_old
36
27
  - ChangeLog
@@ -38,18 +29,15 @@ files:
38
29
  - NEWS
39
30
  - README.md
40
31
  - dist-files
41
- - metaconfig
42
- - pre-distclean.rb
43
- - ruby-oci8.gemspec
44
- - setup.rb
45
32
  - docs/bind-array-to-in_cond.md
33
+ - docs/conflicts-local-connections-and-processes.md
34
+ - docs/hanging-after-inactivity.md
46
35
  - docs/install-binary-package.md
47
36
  - docs/install-full-client.md
48
37
  - docs/install-instant-client.md
49
38
  - docs/install-on-osx.md
50
- - docs/conflicts-local-connections-and-processes.md
51
- - docs/hanging-after-inactivity.md
52
- - docs/osx-install-dev-tools.png
39
+ - docs/ldap-auth-and-function-interposition.md
40
+ - docs/number-type-mapping.md
53
41
  - docs/platform-specific-issues.md
54
42
  - docs/report-installation-issue.md
55
43
  - docs/timeout-parameters.md
@@ -91,8 +79,8 @@ files:
91
79
  - ext/oci8/util.c
92
80
  - ext/oci8/win32.c
93
81
  - lib/.document
94
- - lib/oci8.rb
95
82
  - lib/dbd/OCI8.rb
83
+ - lib/oci8.rb
96
84
  - lib/oci8/.document
97
85
  - lib/oci8/bindtype.rb
98
86
  - lib/oci8/check_load_error.rb
@@ -110,25 +98,31 @@ files:
110
98
  - lib/oci8/properties.rb
111
99
  - lib/oci8/version.rb
112
100
  - lib/ruby-oci8.rb
113
- - test/README
101
+ - metaconfig
102
+ - pre-distclean.rb
103
+ - ruby-oci8.gemspec
104
+ - setup.rb
105
+ - test/README.md
114
106
  - test/config.rb
115
107
  - test/setup_test_object.sql
108
+ - test/setup_test_package.sql
116
109
  - test/test_all.rb
117
110
  - test/test_appinfo.rb
118
111
  - test/test_array_dml.rb
119
112
  - test/test_bind_array.rb
113
+ - test/test_bind_boolean.rb
114
+ - test/test_bind_integer.rb
120
115
  - test/test_bind_raw.rb
121
116
  - test/test_bind_string.rb
122
117
  - test/test_bind_time.rb
123
- - test/test_bind_integer.rb
124
118
  - test/test_break.rb
125
119
  - test/test_clob.rb
126
120
  - test/test_connection_pool.rb
127
121
  - test/test_connstr.rb
128
- - test/test_encoding.rb
129
122
  - test/test_datetime.rb
130
123
  - test/test_dbi.rb
131
124
  - test/test_dbi_clob.rb
125
+ - test/test_encoding.rb
132
126
  - test/test_error.rb
133
127
  - test/test_metadata.rb
134
128
  - test/test_object.rb
@@ -137,41 +131,30 @@ files:
137
131
  - test/test_oradate.rb
138
132
  - test/test_oranumber.rb
139
133
  - test/test_package_type.rb
134
+ - test/test_properties.rb
140
135
  - test/test_rowid.rb
141
- has_rdoc: true
142
136
  homepage: http://www.rubydoc.info/github/kubo/ruby-oci8
143
- licenses:
137
+ licenses:
144
138
  - BSD-2-Clause
139
+ metadata: {}
145
140
  post_install_message:
146
141
  rdoc_options: []
147
-
148
- require_paths:
142
+ require_paths:
149
143
  - lib
150
- - ext/oci8
151
- required_ruby_version: !ruby/object:Gem::Requirement
152
- none: false
153
- requirements:
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
154
146
  - - ">="
155
- - !ruby/object:Gem::Version
156
- segments:
157
- - 1
158
- - 9
159
- - 1
147
+ - !ruby/object:Gem::Version
160
148
  version: 1.9.1
161
- required_rubygems_version: !ruby/object:Gem::Requirement
162
- none: false
163
- requirements:
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
164
151
  - - ">="
165
- - !ruby/object:Gem::Version
166
- segments:
167
- - 0
168
- version: "0"
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
169
154
  requirements: []
170
-
171
- rubyforge_project:
172
- rubygems_version: 1.3.7
155
+ rubygems_version: 3.1.2
173
156
  signing_key:
174
- specification_version: 3
157
+ specification_version: 4
175
158
  summary: Ruby interface for Oracle using OCI8 API
176
- test_files:
159
+ test_files:
177
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++.)