ruby-oci8 1.0.7-x86-mswin32-60 → 2.0.1-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/ChangeLog +1289 -383
  2. data/Makefile +48 -12
  3. data/NEWS +5 -419
  4. data/README +56 -385
  5. data/VERSION +1 -1
  6. data/dist-files +27 -27
  7. data/lib/.document +2 -0
  8. data/lib/dbd/OCI8.rb +2 -17
  9. data/lib/oci8.rb +48 -1622
  10. data/lib/oci8.rb.in +48 -1622
  11. data/lib/oci8/.document +5 -0
  12. data/lib/oci8/compat.rb +108 -0
  13. data/lib/oci8/datetime.rb +491 -0
  14. data/lib/oci8/encoding-init.rb +40 -0
  15. data/lib/oci8/encoding.yml +537 -0
  16. data/lib/oci8/metadata.rb +2077 -0
  17. data/lib/oci8/object.rb +548 -0
  18. data/lib/oci8/oci8.rb +798 -0
  19. data/lib/oci8/oracle_version.rb +144 -0
  20. data/lib/oci8lib_18.so +0 -0
  21. data/lib/oci8lib_191.so +0 -0
  22. data/metaconfig +3 -3
  23. data/ruby-oci8.gemspec +24 -15
  24. data/setup.rb +4 -4
  25. data/test/config.rb +64 -84
  26. data/test/test_all.rb +14 -21
  27. data/test/test_array_dml.rb +333 -0
  28. data/test/test_bind_raw.rb +18 -25
  29. data/test/test_bind_time.rb +78 -91
  30. data/test/test_break.rb +37 -35
  31. data/test/test_clob.rb +33 -89
  32. data/test/test_connstr.rb +5 -4
  33. data/test/test_datetime.rb +469 -0
  34. data/test/test_dbi.rb +99 -60
  35. data/test/test_dbi_clob.rb +3 -8
  36. data/test/test_metadata.rb +65 -51
  37. data/test/test_oci8.rb +151 -55
  38. data/test/test_oracle_version.rb +70 -0
  39. data/test/test_oradate.rb +76 -83
  40. data/test/test_oranumber.rb +405 -71
  41. data/test/test_rowid.rb +6 -11
  42. metadata +21 -25
  43. data/ext/oci8/oci8lib.so +0 -0
  44. data/ruby-oci8.spec +0 -62
  45. data/support/README +0 -4
  46. data/support/runit/assert.rb +0 -281
  47. data/support/runit/cui/testrunner.rb +0 -101
  48. data/support/runit/error.rb +0 -4
  49. data/support/runit/method_mappable.rb +0 -20
  50. data/support/runit/robserver.rb +0 -25
  51. data/support/runit/setuppable.rb +0 -15
  52. data/support/runit/teardownable.rb +0 -16
  53. data/support/runit/testcase.rb +0 -113
  54. data/support/runit/testfailure.rb +0 -25
  55. data/support/runit/testresult.rb +0 -121
  56. data/support/runit/testsuite.rb +0 -43
  57. data/support/runit/version.rb +0 -3
  58. data/test/test_describe.rb +0 -137
@@ -1,16 +1,11 @@
1
1
  require 'oci8'
2
- require 'runit/testcase'
3
- require 'runit/cui/testrunner'
2
+ require 'test/unit'
4
3
  require File.dirname(__FILE__) + '/config'
5
4
 
6
- class TestRowid < RUNIT::TestCase
5
+ class TestRowid < Test::Unit::TestCase
7
6
 
8
7
  def setup
9
- @conn = get_oci_connection()
10
- end
11
-
12
- def teardown
13
- @conn.logoff
8
+ @conn = get_oci8_connection
14
9
  end
15
10
 
16
11
  def test_rowid
@@ -31,8 +26,8 @@ EOS
31
26
  assert_equal(rid2, rid1)
32
27
  drop_table('test_table')
33
28
  end
34
- end # TestRowid
35
29
 
36
- if $0 == __FILE__
37
- RUNIT::CUI::TestRunner.run(TestRowid.suite())
30
+ def teardown
31
+ @conn.logoff
32
+ end
38
33
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-oci8
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 2.0.1
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - KUBO Takehiro
8
- autorequire: oci8
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-21 00:00:00 +09:00
12
+ date: 2009-03-18 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,15 +22,14 @@ extensions: []
22
22
  extra_rdoc_files:
23
23
  - README
24
24
  files:
25
- - NEWS
26
25
  - ChangeLog
27
26
  - Makefile
27
+ - NEWS
28
28
  - README
29
29
  - VERSION
30
30
  - dist-files
31
31
  - metaconfig
32
32
  - pre-distclean.rb
33
- - ruby-oci8.spec
34
33
  - ruby-oci8.gemspec
35
34
  - setup.rb
36
35
  - doc/api.en.html
@@ -38,38 +37,38 @@ files:
38
37
  - doc/api.ja.html
39
38
  - doc/api.ja.rd
40
39
  - doc/manual.css
40
+ - lib/.document
41
41
  - lib/oci8.rb.in
42
42
  - lib/dbd/OCI8.rb
43
- - support/README
44
- - support/runit/assert.rb
45
- - support/runit/cui/testrunner.rb
46
- - support/runit/error.rb
47
- - support/runit/method_mappable.rb
48
- - support/runit/robserver.rb
49
- - support/runit/setuppable.rb
50
- - support/runit/teardownable.rb
51
- - support/runit/testcase.rb
52
- - support/runit/testfailure.rb
53
- - support/runit/testresult.rb
54
- - support/runit/testsuite.rb
55
- - support/runit/version.rb
43
+ - lib/oci8/.document
44
+ - lib/oci8/compat.rb
45
+ - lib/oci8/datetime.rb
46
+ - lib/oci8/encoding-init.rb
47
+ - lib/oci8/encoding.yml
48
+ - lib/oci8/metadata.rb
49
+ - lib/oci8/object.rb
50
+ - lib/oci8/oci8.rb
51
+ - lib/oci8/oracle_version.rb
56
52
  - test/README
57
53
  - test/config.rb
58
54
  - test/test_all.rb
55
+ - test/test_array_dml.rb
59
56
  - test/test_bind_raw.rb
60
57
  - test/test_bind_time.rb
61
58
  - test/test_break.rb
62
59
  - test/test_clob.rb
63
60
  - test/test_connstr.rb
61
+ - test/test_datetime.rb
64
62
  - test/test_dbi.rb
65
63
  - test/test_dbi_clob.rb
66
- - test/test_describe.rb
64
+ - test/test_metadata.rb
67
65
  - test/test_oci8.rb
66
+ - test/test_oracle_version.rb
68
67
  - test/test_oradate.rb
69
68
  - test/test_oranumber.rb
70
- - test/test_metadata.rb
71
69
  - test/test_rowid.rb
72
- - ext/oci8/oci8lib.so
70
+ - lib/oci8lib_18.so
71
+ - lib/oci8lib_191.so
73
72
  - lib/oci8.rb
74
73
  has_rdoc: true
75
74
  homepage: http://ruby-oci8.rubyforge.org
@@ -77,14 +76,11 @@ post_install_message:
77
76
  rdoc_options:
78
77
  - --main
79
78
  - README
80
- - --exclude
81
- - ext/*
82
79
  require_paths:
83
80
  - lib
84
- - ext/oci8
85
81
  required_ruby_version: !ruby/object:Gem::Requirement
86
82
  requirements:
87
- - - ~>
83
+ - - ">="
88
84
  - !ruby/object:Gem::Version
89
85
  version: 1.8.0
90
86
  version:
Binary file
@@ -1,62 +0,0 @@
1
- %define ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
2
- %define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
3
-
4
- Summary: ruby interface for Oracle using OCI8 API
5
- Name: ruby-oci8
6
- Version: 1.0.7
7
- Release: 1%{?dist}
8
- Group: Development/Libraries
9
- License: Ruby License
10
- URL: http://rubyforge.org/projects/ruby-oci8/
11
- Source0: %{name}-%{version}.tar.gz
12
- BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
13
- Requires: ruby
14
- Requires: oracle-instantclient-basic
15
- BuildRequires: ruby
16
- BuildRequires: ruby-devel
17
- BuildRequires: oracle-instantclient-basic
18
- BuildRequires: oracle-instantclient-devel
19
-
20
- # Note: the oracle-instanclient-basic package should say
21
- # Provides: libclntsh.so.10.1
22
- # but it doesn't. So we have to turn off dependency checking in the
23
- # finished package. (Or else we could manually patch the package
24
- # using rpmrebuild)
25
- AutoReqProv: no
26
-
27
- %description
28
- Ruby/OCI8 is a ruby interface for Oracle using OCI8 API. It also provides
29
- a DBD driver for use with ruby-dbi, and is used by the ActiveRecord Oracle
30
- connection adapter.
31
-
32
- %prep
33
- %setup -q -n %{name}-%{Version}
34
-
35
- %build
36
- CFLAGS="$RPM_OPT_FLAGS" \
37
- LD_LIBRARY_PATH="$(echo /usr/lib/oracle/*/client/lib | sed 's/^.* //')" \
38
- ruby setup.rb config -- --with-instant-client
39
- make
40
-
41
- %install
42
- rm -rf $RPM_BUILD_ROOT
43
- ruby setup.rb --verbose install --prefix=$RPM_BUILD_ROOT
44
-
45
- %clean
46
- rm -rf $RPM_BUILD_ROOT
47
-
48
- %files
49
- %defattr(-, root, root, -)
50
- %doc ChangeLog NEWS README
51
- %doc doc/api.en.html doc/manual.css
52
-
53
- %{ruby_sitelib}/oci8.rb
54
- %{ruby_sitelib}/DBD/OCI8/OCI8.rb
55
- %{ruby_sitearch}/oci8lib.so
56
-
57
- %changelog
58
- * Thu Jun 26 2008 KUBO Takehiro <kubo@jiubao.org>
59
- - Thie file is made from ruby-oci8.spec.in by erb.
60
-
61
- * Fri Mar 23 2007 Brian Candler <brian.candler@inspiredbroadcast.net> - 1.0.0_rc1-1
62
- - First cut
@@ -1,4 +0,0 @@
1
- This directory includes support files to run unit test.
2
-
3
- runit : minimum files which are copyed from RubyUnit 0.5.2.
4
- http://homepage1.nifty.com/markey/ruby/rubyunit/index_e.html
@@ -1,281 +0,0 @@
1
- require 'runit/version'
2
- require 'runit/error'
3
-
4
- module RUNIT
5
- module Assert
6
- @@run_asserts = 0
7
- @@skip_failure = false
8
-
9
- def Assert.skip_failure=(arg)
10
- @@skip_failure = arg
11
- end
12
-
13
- def Assert.skip_failure?
14
- @@skip_failure
15
- end
16
-
17
- def Assert.run_asserts
18
- @@run_asserts
19
- end
20
-
21
- def edit_message(msg)
22
- (msg != "")? msg + " " : msg
23
- end
24
- private :edit_message
25
-
26
- def build_message(msg, *args, &proc)
27
- str_args = args.collect {|arg|
28
- to_string(arg)
29
- }
30
- if block_given?
31
- edit_message(msg).concat proc.call(*str_args)
32
- else
33
- msg
34
- end
35
- end
36
- private :build_message
37
-
38
- def to_string(obj)
39
- case obj
40
- when Symbol
41
- obj.id2name
42
- when String
43
- obj
44
- else
45
- obj.inspect
46
- end
47
- end
48
- private :to_string
49
-
50
- def float_to_str(f, e)
51
- return f.to_s if e == 0
52
- i = 0
53
- while 1 > e
54
- i += 1
55
- e *= 10
56
- end
57
- i += 1
58
- sprintf("%.#{i}f", f)
59
- end
60
- private :float_to_str
61
-
62
- def raise_assertion_error(message)
63
- if Assert.skip_failure?
64
- changed
65
- err = AssertionFailedError.new(message)
66
- err.set_backtrace(caller)
67
- notify_observers(RObserver::ADD_FAILURE, caller, err, type)
68
- else
69
- raise AssertionFailedError, message
70
- end
71
- end
72
- private :raise_assertion_error
73
-
74
- def setup_assert
75
- @@run_asserts += 1
76
- end
77
-
78
- def assert(condition, message="")
79
- setup_assert
80
- if !condition.instance_of?(TrueClass) && !condition.instance_of?(FalseClass)
81
- raise TypeError, "1st argument <#{condition}> type should be TrueClass or FalseClass."
82
- end
83
- if !condition
84
- msg = build_message(message, condition) {|arg|
85
- "The condition is <#{arg}:#{condition.type.inspect}>"
86
- }
87
- raise_assertion_error(msg)
88
- end
89
- end
90
-
91
- def assert_equal(expected, actual, message="")
92
- setup_assert
93
- if expected != actual
94
- msg = build_message(message, expected, actual) {|arg1, arg2|
95
- "expected:<#{arg1}> but was:<#{arg2}>"
96
- }
97
- raise_assertion_error(msg)
98
- end
99
- end
100
- alias assert_equals assert_equal
101
-
102
- def assert_operator(obj1, op, obj2, message="")
103
- setup_assert
104
- if !obj1.send(op, obj2)
105
- msg = build_message(message, obj1, obj2) {|arg1, arg2|
106
- "The condition is not satisfied: #{arg1} #{op.to_s} #{arg2}"
107
- }
108
- raise_assertion_error(msg)
109
- end
110
- end
111
-
112
- def assert_equal_float(expected, actual, e, message="")
113
- setup_assert
114
- if e < 0.0
115
- raise ArgumentError, "#{e}: 3rd argument should be 0 or greater than 0."
116
- end
117
- if (expected - actual).abs > e
118
- msg = build_message(message) {
119
- "expected:<#{float_to_str(expected, e)}> but was:<#{float_to_str(actual, e)}>"
120
- }
121
- raise_assertion_error(msg)
122
- end
123
- end
124
-
125
- def assert_same(expected, actual, message="")
126
- setup_assert
127
- if !actual.equal?(expected)
128
- msg = build_message(message, actual, expected) {|arg1, arg2|
129
- "<#{arg1}:#{actual.type.inspect}> is not same object: <#{arg2}:#{expected.type.inspect}>"
130
- }
131
- raise_assertion_error(msg)
132
- end
133
- end
134
-
135
- def assert_send(obj, method, *args)
136
- setup_assert
137
- if !obj.send(method, *args)
138
- msg = "Assertion failed: #{obj.type.inspect}(#{obj.inspect})##{to_string(method)}"
139
- if args.size > 0
140
- strargs = args.collect {|arg|
141
- "<#{to_string(arg).inspect}:#{arg.type.inspect}>"
142
- }.join(", ")
143
- msg.concat "(#{strargs})"
144
- end
145
- raise_assertion_error(msg)
146
- end
147
- end
148
-
149
- def assert_nil(obj, message="")
150
- setup_assert
151
- if !obj.nil?
152
- msg = build_message(message, obj) {|arg|
153
- "<#{arg}:#{obj.type.inspect}> is not nil"
154
- }
155
- raise_assertion_error(msg)
156
- end
157
- end
158
-
159
- def assert_not_nil(obj, message="")
160
- setup_assert
161
- if obj.nil?
162
- msg = build_message(message) {
163
- "object is nil"
164
- }
165
- raise_assertion_error(msg)
166
- end
167
- end
168
-
169
- def assert_respond_to(method, obj, message="")
170
- setup_assert
171
- if !obj.respond_to?(method)
172
- msg = build_message(message, obj, method) {|arg1, arg2|
173
- "<#{arg1}:#{obj.type.inspect}> does not respond to <#{arg2}>"
174
- }
175
- raise_assertion_error(msg)
176
- end
177
- end
178
-
179
- def assert_kind_of(c, obj, message="")
180
- setup_assert
181
- if !obj.kind_of?(c)
182
- msg = build_message(message, obj, c) {|arg1, arg2|
183
- "<#{arg1}:#{obj.type.inspect}> is not kind of <#{arg2}>"
184
- }
185
- raise_assertion_error(msg)
186
- end
187
- end
188
-
189
- def assert_instance_of(c, obj, message="")
190
- setup_assert
191
- if !obj.instance_of?(c)
192
- msg = build_message(message, obj, c) {|arg1, arg2|
193
- "<#{arg1}:#{obj.type.inspect}> is not instance of <#{arg2}>"
194
- }
195
- raise_assertion_error(msg)
196
- end
197
- end
198
-
199
- def assert_match(str, re, message="")
200
- setup_assert
201
- if re !~ str
202
- msg = build_message(message, re, str) {|arg1, arg2|
203
- "<#{arg1}> not match <#{arg2}>"
204
- }
205
- raise_assertion_error(msg)
206
- end
207
- return Regexp.last_match
208
- end
209
- alias assert_matches assert_match
210
-
211
- def assert_not_match(str, re, message="")
212
- setup_assert
213
- if re =~ str
214
- match = Regexp.last_match
215
- msg = build_message(message, re, str) {|arg1, arg2|
216
- "<#{arg1}> matches '#{match[0]}' of <#{arg2}>"
217
- }
218
- raise_assertion_error(msg)
219
- end
220
- end
221
-
222
- def assert_exception(exception, message="")
223
- setup_assert
224
- exception_raised = true
225
- err = ""
226
- ret = nil
227
- begin
228
- yield
229
- exception_raised = false
230
- err = 'NO EXCEPTION RAISED'
231
- rescue Exception
232
- if $!.instance_of?(exception)
233
- exception_raised = true
234
- ret = $!
235
- else
236
- exception_raised = false
237
- err = $!.type
238
- end
239
- end
240
- if !exception_raised
241
- msg = build_message(message, exception, err) {|arg1, arg2|
242
- "expected:<#{arg1}> but was:<#{arg2}>"
243
- }
244
- raise_assertion_error(msg)
245
- end
246
- ret
247
- end
248
-
249
- def assert_no_exception(*arg)
250
- setup_assert
251
- message = ""
252
- if arg[arg.size-1].instance_of?(String)
253
- message = arg.pop
254
- end
255
- err = nil
256
- exception_raised = false
257
- begin
258
- yield
259
- rescue Exception
260
- if arg.include?($!.type) || arg.size == 0
261
- exception_raised = true
262
- err = $!
263
- else
264
- raise $!.type, $!.message, $!.backtrace
265
- end
266
- end
267
- if exception_raised
268
- msg = build_message(message, err) {|arg|
269
- "Exception raised:#{arg}"
270
- }
271
- raise_assertion_error(msg)
272
- end
273
- end
274
-
275
- def assert_fail(message)
276
- setup_assert
277
- raise_assertion_error message
278
- end
279
-
280
- end
281
- end