unclebilly-activerecord-oracle_enhanced-adapter 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +165 -0
- data/License.txt +20 -0
- data/Manifest.txt +32 -0
- data/README.rdoc +75 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/lib/active_record/connection_adapters/emulation/oracle_adapter.rb +5 -0
- data/lib/active_record/connection_adapters/oracle_enhanced.rake +51 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +1723 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_connection.rb +121 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb +64 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_cpk.rb +21 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_dirty.rb +39 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_jdbc_connection.rb +369 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb +396 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_procedures.rb +164 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_reserved_words.rb +126 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_schema_definitions.rb +177 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_schema_dumper.rb +214 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_schema_statements_ext.rb +224 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_tasks.rb +11 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_version.rb +1 -0
- data/lib/active_record/connection_adapters/oracle_enhanced_virtual_column.rb +35 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb +610 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_adapter_structure_dumper_spec.rb +266 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_connection_spec.rb +206 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_core_ext_spec.rb +40 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_cpk_spec.rb +107 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb +984 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_dbms_output_spec.rb +67 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_dirty_spec.rb +93 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb +25 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_procedures_spec.rb +370 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_schema_dump_spec.rb +268 -0
- data/spec/active_record/connection_adapters/oracle_enhanced_schema_spec.rb +761 -0
- data/spec/spec.opts +6 -0
- data/spec/spec_helper.rb +130 -0
- metadata +149 -0
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
gem 'rspec'
|
3
|
+
require 'spec'
|
4
|
+
|
5
|
+
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
6
|
+
|
7
|
+
if ENV['RAILS_GEM_VERSION'] =~ /^2.0/
|
8
|
+
gem 'activerecord', '=2.0.2'
|
9
|
+
gem 'actionpack', '=2.0.2'
|
10
|
+
gem 'activesupport', '=2.0.2'
|
11
|
+
gem 'composite_primary_keys', '=0.9.93'
|
12
|
+
elsif ENV['RAILS_GEM_VERSION'] =~ /^2.1/
|
13
|
+
gem 'activerecord', '=2.1.2'
|
14
|
+
gem 'actionpack', '=2.1.2'
|
15
|
+
gem 'activesupport', '=2.1.2'
|
16
|
+
gem 'composite_primary_keys', '=1.0.8'
|
17
|
+
elsif ENV['RAILS_GEM_VERSION'] =~ /^2.2/
|
18
|
+
gem 'activerecord', '=2.2.2'
|
19
|
+
gem 'actionpack', '=2.2.2'
|
20
|
+
gem 'activesupport', '=2.2.2'
|
21
|
+
gem 'composite_primary_keys', '=2.2.2'
|
22
|
+
elsif ENV['RAILS_GEM_VERSION'] =~ /^2.3.3/
|
23
|
+
gem 'activerecord', '=2.3.3'
|
24
|
+
gem 'actionpack', '=2.3.3'
|
25
|
+
gem 'activesupport', '=2.3.3'
|
26
|
+
gem 'composite_primary_keys', '=2.3.2'
|
27
|
+
else
|
28
|
+
ENV['RAILS_GEM_VERSION'] ||= '2.3.5'
|
29
|
+
gem 'activerecord', '=2.3.5'
|
30
|
+
gem 'actionpack', '=2.3.5'
|
31
|
+
gem 'activesupport', '=2.3.5'
|
32
|
+
NO_COMPOSITE_PRIMARY_KEYS = true
|
33
|
+
end
|
34
|
+
|
35
|
+
require 'active_record'
|
36
|
+
require 'action_pack'
|
37
|
+
if ENV['RAILS_GEM_VERSION'] >= '2.3'
|
38
|
+
require 'action_controller/session/abstract_store'
|
39
|
+
require 'active_record/session_store'
|
40
|
+
else
|
41
|
+
require 'action_controller/session/active_record_store'
|
42
|
+
end
|
43
|
+
if !defined?(RUBY_ENGINE)
|
44
|
+
# change version to 1.0.6 to test with old oracle_adapter
|
45
|
+
gem 'ruby-oci8', '>=2.0.3'
|
46
|
+
require 'oci8'
|
47
|
+
if OCI8::VERSION =~ /^1\./
|
48
|
+
gem "activerecord-oracle-adapter"
|
49
|
+
require 'active_record/connection_adapters/oracle_adapter'
|
50
|
+
end
|
51
|
+
elsif RUBY_ENGINE == 'ruby'
|
52
|
+
gem 'ruby-oci8', '>=2.0.3'
|
53
|
+
require 'oci8'
|
54
|
+
elsif RUBY_ENGINE == 'jruby'
|
55
|
+
gem "activerecord-jdbc-adapter"
|
56
|
+
require 'active_record/connection_adapters/jdbc_adapter'
|
57
|
+
end
|
58
|
+
|
59
|
+
require 'active_record/connection_adapters/oracle_enhanced_adapter'
|
60
|
+
|
61
|
+
module LoggerSpecHelper
|
62
|
+
def log_to(stream)
|
63
|
+
ActiveRecord::Base.logger = Logger.new(stream)
|
64
|
+
if ActiveRecord::Base.respond_to?(:connection_pool)
|
65
|
+
ActiveRecord::Base.connection_pool.clear_reloadable_connections!
|
66
|
+
else
|
67
|
+
ActiveRecord::Base.clear_active_connections!
|
68
|
+
end
|
69
|
+
ActiveRecord::Base.colorize_logging = false
|
70
|
+
ActiveRecord::Base.logger.level = Logger::DEBUG
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
module SchemaSpecHelper
|
75
|
+
def schema_define(&block)
|
76
|
+
ActiveRecord::Schema.define do
|
77
|
+
suppress_messages do
|
78
|
+
instance_eval(&block)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
DATABASE_NAME = ENV['DATABASE_NAME'] || 'orcl'
|
85
|
+
DATABASE_HOST = ENV['DATABASE_HOST'] || 'localhost'
|
86
|
+
DATABASE_PORT = ENV['DATABASE_PORT'] || 1521
|
87
|
+
DATABASE_USER = ENV['DATABASE_USER'] || 'hr'
|
88
|
+
DATABASE_PASSWORD = ENV['DATABASE_PASSWORD'] || 'hr'
|
89
|
+
DATABASE_SYS_PASSWORD = ENV['DATABASE_SYS_PASSWORD'] || 'admin'
|
90
|
+
DATABASE_NON_DEFAULT_TABLESPACE = ENV['DATABASE_NON_DEFAULT_TABLESPACE'] || "SYSTEM"
|
91
|
+
|
92
|
+
CONNECTION_PARAMS = {
|
93
|
+
:adapter => "oracle_enhanced",
|
94
|
+
:database => DATABASE_NAME,
|
95
|
+
:host => DATABASE_HOST,
|
96
|
+
:username => DATABASE_USER,
|
97
|
+
:password => DATABASE_PASSWORD
|
98
|
+
}
|
99
|
+
|
100
|
+
JDBC_CONNECTION_PARAMS = {
|
101
|
+
:adapter => "jdbc",
|
102
|
+
:driver => "oracle.jdbc.driver.OracleDriver",
|
103
|
+
:url => "jdbc:oracle:thin:@#{DATABASE_HOST}:#{DATABASE_PORT}:#{DATABASE_NAME}",
|
104
|
+
:username => DATABASE_USER,
|
105
|
+
:password => DATABASE_PASSWORD
|
106
|
+
}
|
107
|
+
|
108
|
+
SYS_CONNECTION_PARAMS = {
|
109
|
+
:adapter => "oracle_enhanced",
|
110
|
+
:database => DATABASE_NAME,
|
111
|
+
:host => DATABASE_HOST,
|
112
|
+
:username => "sys",
|
113
|
+
:password => DATABASE_SYS_PASSWORD,
|
114
|
+
:privilege => "SYSDBA"
|
115
|
+
}
|
116
|
+
|
117
|
+
SYSTEM_CONNECTION_PARAMS = {
|
118
|
+
:adapter => "oracle_enhanced",
|
119
|
+
:database => DATABASE_NAME,
|
120
|
+
:host => DATABASE_HOST,
|
121
|
+
:username => "system",
|
122
|
+
:password => DATABASE_SYS_PASSWORD
|
123
|
+
}
|
124
|
+
|
125
|
+
# For JRuby Set default $KCODE to UTF8
|
126
|
+
$KCODE = "UTF8" if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
|
127
|
+
|
128
|
+
# set default time zone in TZ environment variable
|
129
|
+
# which will be used to set session time zone
|
130
|
+
ENV['TZ'] ||= 'Europe/Riga'
|
metadata
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: unclebilly-activerecord-oracle_enhanced-adapter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 4
|
10
|
+
version: 1.2.4
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Raimonds Simanovskis
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-05-31 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: activerecord
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 0
|
33
|
+
- 0
|
34
|
+
version: 2.0.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rspec
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 13
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 2
|
49
|
+
- 9
|
50
|
+
version: 1.2.9
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
description: |
|
54
|
+
Oracle "enhanced" ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases.
|
55
|
+
This adapter is superset of original ActiveRecord Oracle adapter.
|
56
|
+
|
57
|
+
email: raimonds.simanovskis@gmail.com
|
58
|
+
executables: []
|
59
|
+
|
60
|
+
extensions: []
|
61
|
+
|
62
|
+
extra_rdoc_files:
|
63
|
+
- README.rdoc
|
64
|
+
files:
|
65
|
+
- History.txt
|
66
|
+
- License.txt
|
67
|
+
- Manifest.txt
|
68
|
+
- README.rdoc
|
69
|
+
- Rakefile
|
70
|
+
- VERSION
|
71
|
+
- lib/active_record/connection_adapters/emulation/oracle_adapter.rb
|
72
|
+
- lib/active_record/connection_adapters/oracle_enhanced.rake
|
73
|
+
- lib/active_record/connection_adapters/oracle_enhanced_adapter.rb
|
74
|
+
- lib/active_record/connection_adapters/oracle_enhanced_connection.rb
|
75
|
+
- lib/active_record/connection_adapters/oracle_enhanced_core_ext.rb
|
76
|
+
- lib/active_record/connection_adapters/oracle_enhanced_cpk.rb
|
77
|
+
- lib/active_record/connection_adapters/oracle_enhanced_dirty.rb
|
78
|
+
- lib/active_record/connection_adapters/oracle_enhanced_jdbc_connection.rb
|
79
|
+
- lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb
|
80
|
+
- lib/active_record/connection_adapters/oracle_enhanced_procedures.rb
|
81
|
+
- lib/active_record/connection_adapters/oracle_enhanced_reserved_words.rb
|
82
|
+
- lib/active_record/connection_adapters/oracle_enhanced_schema_definitions.rb
|
83
|
+
- lib/active_record/connection_adapters/oracle_enhanced_schema_dumper.rb
|
84
|
+
- lib/active_record/connection_adapters/oracle_enhanced_schema_statements_ext.rb
|
85
|
+
- lib/active_record/connection_adapters/oracle_enhanced_tasks.rb
|
86
|
+
- lib/active_record/connection_adapters/oracle_enhanced_version.rb
|
87
|
+
- lib/active_record/connection_adapters/oracle_enhanced_virtual_column.rb
|
88
|
+
- spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
|
89
|
+
- spec/active_record/connection_adapters/oracle_enhanced_adapter_structure_dumper_spec.rb
|
90
|
+
- spec/active_record/connection_adapters/oracle_enhanced_connection_spec.rb
|
91
|
+
- spec/active_record/connection_adapters/oracle_enhanced_core_ext_spec.rb
|
92
|
+
- spec/active_record/connection_adapters/oracle_enhanced_cpk_spec.rb
|
93
|
+
- spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
|
94
|
+
- spec/active_record/connection_adapters/oracle_enhanced_dbms_output_spec.rb
|
95
|
+
- spec/active_record/connection_adapters/oracle_enhanced_dirty_spec.rb
|
96
|
+
- spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb
|
97
|
+
- spec/active_record/connection_adapters/oracle_enhanced_procedures_spec.rb
|
98
|
+
- spec/active_record/connection_adapters/oracle_enhanced_schema_dump_spec.rb
|
99
|
+
- spec/active_record/connection_adapters/oracle_enhanced_schema_spec.rb
|
100
|
+
- spec/spec.opts
|
101
|
+
- spec/spec_helper.rb
|
102
|
+
has_rdoc: true
|
103
|
+
homepage: http://github.com/rsim/oracle-enhanced
|
104
|
+
licenses: []
|
105
|
+
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 3
|
117
|
+
segments:
|
118
|
+
- 0
|
119
|
+
version: "0"
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
hash: 3
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
version: "0"
|
129
|
+
requirements: []
|
130
|
+
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 1.5.2
|
133
|
+
signing_key:
|
134
|
+
specification_version: 3
|
135
|
+
summary: Oracle enhanced adapter for ActiveRecord
|
136
|
+
test_files:
|
137
|
+
- spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
|
138
|
+
- spec/active_record/connection_adapters/oracle_enhanced_adapter_structure_dumper_spec.rb
|
139
|
+
- spec/active_record/connection_adapters/oracle_enhanced_connection_spec.rb
|
140
|
+
- spec/active_record/connection_adapters/oracle_enhanced_core_ext_spec.rb
|
141
|
+
- spec/active_record/connection_adapters/oracle_enhanced_cpk_spec.rb
|
142
|
+
- spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
|
143
|
+
- spec/active_record/connection_adapters/oracle_enhanced_dbms_output_spec.rb
|
144
|
+
- spec/active_record/connection_adapters/oracle_enhanced_dirty_spec.rb
|
145
|
+
- spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb
|
146
|
+
- spec/active_record/connection_adapters/oracle_enhanced_procedures_spec.rb
|
147
|
+
- spec/active_record/connection_adapters/oracle_enhanced_schema_dump_spec.rb
|
148
|
+
- spec/active_record/connection_adapters/oracle_enhanced_schema_spec.rb
|
149
|
+
- spec/spec_helper.rb
|