do_oracle 0.10.1-x86-mswin32-60
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.
- data/ChangeLog.markdown +3 -0
- data/INSTALL.markdown +5 -0
- data/LICENSE +20 -0
- data/README.markdown +106 -0
- data/Rakefile +65 -0
- data/ext/do_oracle/do_oracle.c +903 -0
- data/ext/do_oracle/extconf.rb +36 -0
- data/lib/do_oracle/1.8/do_oracle.so +0 -0
- data/lib/do_oracle/1.9/do_oracle.so +0 -0
- data/lib/do_oracle/transaction.rb +36 -0
- data/lib/do_oracle/version.rb +5 -0
- data/lib/do_oracle.rb +133 -0
- data/spec/command_spec.rb +53 -0
- data/spec/connection_spec.rb +21 -0
- data/spec/encoding_spec.rb +12 -0
- data/spec/reader_spec.rb +8 -0
- data/spec/result_spec.rb +95 -0
- data/spec/spec_helper.rb +190 -0
- data/spec/typecast/array_spec.rb +8 -0
- data/spec/typecast/bigdecimal_spec.rb +9 -0
- data/spec/typecast/boolean_spec.rb +9 -0
- data/spec/typecast/byte_array_spec.rb +89 -0
- data/spec/typecast/class_spec.rb +64 -0
- data/spec/typecast/date_spec.rb +11 -0
- data/spec/typecast/datetime_spec.rb +9 -0
- data/spec/typecast/float_spec.rb +51 -0
- data/spec/typecast/integer_spec.rb +8 -0
- data/spec/typecast/nil_spec.rb +10 -0
- data/spec/typecast/other_spec.rb +8 -0
- data/spec/typecast/range_spec.rb +8 -0
- data/spec/typecast/string_spec.rb +170 -0
- data/spec/typecast/time_spec.rb +85 -0
- data/tasks/compile.rake +42 -0
- data/tasks/release.rake +16 -0
- data/tasks/retrieve.rake +67 -0
- data/tasks/spec.rake +23 -0
- metadata +151 -0
data/ChangeLog.markdown
ADDED
data/INSTALL.markdown
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2007 - 2010 Yehuda Katz, Dirkjan Bussink, Raimonds Simanovskis
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
# do_oracle
|
2
|
+
|
3
|
+
* <http://dataobjects.info>
|
4
|
+
|
5
|
+
## Description
|
6
|
+
|
7
|
+
An Oracle driver for DataObjects.
|
8
|
+
|
9
|
+
## Features/Problems
|
10
|
+
|
11
|
+
This driver implements the DataObjects API for the Oracle relational database.
|
12
|
+
|
13
|
+
## Synopsis
|
14
|
+
|
15
|
+
An example of usage:
|
16
|
+
|
17
|
+
@connection = DataObjects::Connection.new("oracle://employees")
|
18
|
+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
|
19
|
+
@reader.next!
|
20
|
+
|
21
|
+
In the future, the `Connection` constructor will be able to be passed either a
|
22
|
+
DataObjects-style URL or JDBC style URL, when using do\_oracle on JRuby. However,
|
23
|
+
this feature is not currently working reliably and is a known issue.
|
24
|
+
|
25
|
+
## Requirements
|
26
|
+
|
27
|
+
This driver is provided for the following platforms:
|
28
|
+
* Ruby MRI (1.8.6/7), 1.9: tested on Linux, Mac OS X and Windows platforms.
|
29
|
+
* JRuby 1.3.1 + (1.4+ recommended).
|
30
|
+
* Rubinius (experimental).
|
31
|
+
|
32
|
+
Additionally you should have the following prerequisites:
|
33
|
+
* `data_objects` gem
|
34
|
+
* `do_jdbc` gem (shared library), if running on JRuby.
|
35
|
+
|
36
|
+
## Install
|
37
|
+
|
38
|
+
To install the gem:
|
39
|
+
|
40
|
+
gem install do_oracle
|
41
|
+
|
42
|
+
To compile and install from source:
|
43
|
+
|
44
|
+
* For MRI/Rubinius extensions:
|
45
|
+
* Install the `gcc` compiler. On OS X, you should install XCode tools. On
|
46
|
+
Ubuntu, run `apt-get install build-essential`.
|
47
|
+
* THESE INSTRUCTIONS ARE CURRENTLY INCOMPLETE!
|
48
|
+
|
49
|
+
* For JRuby extensions:
|
50
|
+
* Install the Java Development Kit (provided if you are
|
51
|
+
on a recent version of Mac OS X) from <http://java.sun.com>.
|
52
|
+
* Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
|
53
|
+
you have configured the `JRUBY_HOME` environment variable to point to your
|
54
|
+
JRuby installation.
|
55
|
+
* Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
|
56
|
+
|
57
|
+
* Then, install this driver with `(jruby -S) rake install`.
|
58
|
+
|
59
|
+
For more information, see the Oracle driver wiki page:
|
60
|
+
<http://wiki.github.com/datamapper/do/oracle>.
|
61
|
+
|
62
|
+
## Developers
|
63
|
+
|
64
|
+
Follow the above installation instructions. Additionally, you'll need:
|
65
|
+
* `bacon` gem for running specs.
|
66
|
+
* `YARD` gem for generating documentation.
|
67
|
+
|
68
|
+
See the DataObjects wiki for more comprehensive information on installing and
|
69
|
+
contributing to the JRuby-variant of this driver:
|
70
|
+
<http://wiki.github.com/datamapper/do/jruby>.
|
71
|
+
|
72
|
+
### install oracle jdbc driver in maven
|
73
|
+
|
74
|
+
$ mvn install
|
75
|
+
will produce an error and give you message like (maybe with a different version). please follow these instructions to install the
|
76
|
+
|
77
|
+
Try downloading the file manually from:
|
78
|
+
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
|
79
|
+
|
80
|
+
Then, install it using the command:
|
81
|
+
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=/path/to/file
|
82
|
+
|
83
|
+
Alternatively, if you host your own repository you can deploy the file there:
|
84
|
+
mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
|
85
|
+
|
86
|
+
### Specs
|
87
|
+
|
88
|
+
To run specs:
|
89
|
+
|
90
|
+
rake spec
|
91
|
+
|
92
|
+
To run specs without compiling extensions first:
|
93
|
+
|
94
|
+
rake spec_no_compile
|
95
|
+
|
96
|
+
To run individual specs:
|
97
|
+
|
98
|
+
rake spec TEST=spec/connection_spec.rb
|
99
|
+
|
100
|
+
(Note that the `rake` task uses a `TEST` parameter, not `SPEC`. This is because
|
101
|
+
the `Rake::TestTask` is used for executing the Bacon specs).
|
102
|
+
|
103
|
+
## License
|
104
|
+
|
105
|
+
This code is licensed under an **MIT (X11) License**. Please see the
|
106
|
+
accompanying `LICENSE` file.
|
data/Rakefile
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'rubygems'
|
3
|
+
require 'rake'
|
4
|
+
require 'rake/clean'
|
5
|
+
|
6
|
+
ROOT = Pathname(__FILE__).dirname.expand_path
|
7
|
+
|
8
|
+
require ROOT + 'lib/do_oracle/version'
|
9
|
+
|
10
|
+
JRUBY = RUBY_PLATFORM =~ /java/
|
11
|
+
IRONRUBY = defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby'
|
12
|
+
WINDOWS = Gem.win_platform? || (JRUBY && ENV_JAVA['os.name'] =~ /windows/i)
|
13
|
+
SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
|
14
|
+
BINARY_VERSION = '10.2.0.4.0'
|
15
|
+
|
16
|
+
CLEAN.include(%w[ {tmp,pkg}/ **/*.{o,so,bundle,jar,log,a,gem,dSYM,obj,pdb,exp,DS_Store,rbc,db} ext/do_oracle/Makefile ext-java/target ])
|
17
|
+
|
18
|
+
begin
|
19
|
+
gem 'jeweler', '~> 1.4'
|
20
|
+
require 'jeweler'
|
21
|
+
|
22
|
+
Jeweler::Tasks.new do |gem|
|
23
|
+
gem.name = 'do_oracle'
|
24
|
+
gem.version = DataObjects::Oracle::VERSION
|
25
|
+
gem.summary = 'DataObjects Oracle Driver'
|
26
|
+
gem.description = 'Implements the DataObjects API for Oracle'
|
27
|
+
gem.platform = Gem::Platform::RUBY
|
28
|
+
gem.files = Dir['lib/**/*.rb', 'spec/**/*.rb', 'tasks/**/*.rake',
|
29
|
+
'ext/**/*.{rb,c,h}', 'LICENSE', 'Rakefile',
|
30
|
+
'*.{markdown,rdoc,txt,yml}']
|
31
|
+
gem.extra_rdoc_files = FileList['README*', 'ChangeLog*', 'INSTALL.markdown',
|
32
|
+
'LICENSE']
|
33
|
+
gem.test_files = FileList['spec/**/*.rb']
|
34
|
+
|
35
|
+
# rake-compiler should generate gemspecs for other platforms (e.g. 'java')
|
36
|
+
# and modify dependencies and extensions appropriately
|
37
|
+
gem.extensions << 'ext/do_oracle/extconf.rb'
|
38
|
+
|
39
|
+
gem.add_dependency 'data_objects', DataObjects::Oracle::VERSION
|
40
|
+
gem.add_dependency 'ruby-oci8', '~>2.0'
|
41
|
+
|
42
|
+
gem.add_development_dependency 'bacon', '~>1.1'
|
43
|
+
gem.add_development_dependency 'rake-compiler', '~>0.7'
|
44
|
+
|
45
|
+
gem.has_rdoc = false
|
46
|
+
gem.rubyforge_project = 'dorb'
|
47
|
+
gem.authors = [ 'Raimonds Simanovskis' ]
|
48
|
+
gem.email = 'raimonds.simanovskis@gmail.com'
|
49
|
+
end
|
50
|
+
|
51
|
+
if JRUBY
|
52
|
+
Rake::Task['build'].clear_actions if Rake::Task.task_defined?('build')
|
53
|
+
Rake::Task['install'].clear_actions if Rake::Task.task_defined?('install')
|
54
|
+
task :build => [ :java, :gem ]
|
55
|
+
task :install do
|
56
|
+
sh "#{Config::CONFIG['RUBY_INSTALL_NAME']} -S gem install pkg/do_oracle-#{DataObjects::Oracle::VERSION}-java.gem"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
Jeweler::GemcutterTasks.new
|
61
|
+
|
62
|
+
FileList['tasks/**/*.rake'].each { |task| import task }
|
63
|
+
rescue LoadError
|
64
|
+
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
65
|
+
end
|