public
Description: Composite Primary Keys support for Active Record
Homepage: http://compositekeys.rubyforge.org
Clone URL: git://github.com/drnic/composite_primary_keys.git
Updated oracle connection.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/compositekeys/trunk@115 
c9d88e0a-f118-0410-93d6-eb14a717986d
nicwilliams (author)
Thu Sep 27 14:42:16 -0700 2007
commit  bcc08ad4cd80ccd33eb22f767ffbd2c70befd1dd
tree    6402789dfbde13a139575f31a1b7fba83fdc9cd8
parent  fc87e6d69be61f64f54fe2f8c68dcd2c2157c7c7
...
1
2
 
...
1
 
2
0
@@ -1,2 +1,2 @@
0
 # location of folder containing activerecord, railties, etc folders for each Rails gem
0
-EDGE_RAILS_DIR="/path/to/copy/of/edge/rails"
0
+ENV['EDGE_RAILS_DIR'] ||= "/path/to/copy/of/edge/rails"
...
1
 
2
 
3
4
 
 
 
 
5
6
7
8
9
10
11
12
13
14
15
 
 
16
...
1
2
3
4
5
 
6
7
8
9
10
 
 
 
 
 
 
 
 
 
 
11
12
13
0
@@ -1,16 +1,13 @@
0
 print "Using native Oracle\n"
0
+require 'fileutils'
0
 require 'logger'
0
+require 'adapter_helper/oracle'
0
 
0
-ActiveRecord::Base.logger = Logger.new("debug.log")
0
+log_path = File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. .. log]))
0
+FileUtils.mkdir_p log_path
0
+puts "Logging to #{log_path}/debug.log"
0
+ActiveRecord::Base.logger = Logger.new("#{log_path}/debug.log")
0
 
0
-db1 = 'composite_primary_keys_unittest'
0
-
0
-connection_options = {
0
- :adapter => 'oci',
0
- :username => 'holstdl',
0
- :password => 'holstdl',
0
- :host => 'test'
0
-}
0
-
0
-ActiveRecord::Base.configurations = { db1 => connection_options }
0
+# Adapter config setup in locals/database_connections.rb
0
+connection_options = AdapterHelper::MySQL.load_connection_from_env
0
 ActiveRecord::Base.establish_connection(connection_options)

Comments

    No one has commented yet.