Permalink
Browse files

changed default connection to localhost orcl database

  • Loading branch information...
1 parent ed76316 commit 9633ad88e415fd5fb3975ae3a713104d57ae6223 @rsim rsim committed May 2, 2009
Showing with 17 additions and 10 deletions.
  1. +17 −10 spec/spec_helper.rb
View
@@ -58,28 +58,35 @@ def log_to(stream)
end
end
+DATABASE_NAME = ENV['DATABASE_NAME'] || 'orcl'
+DATABASE_HOST = ENV['DATABASE_HOST'] || 'localhost'
+DATABASE_PORT = ENV['DATABASE_PORT'] || 1521
+DATABASE_USER = ENV['DATABASE_USER'] || 'hr'
+DATABASE_PASSWORD = ENV['DATABASE_PASSWORD'] || 'hr'
+DATABASE_SYS_PASSWORD = ENV['DATABASE_SYS_PASSWORD'] || 'admin'
+
CONNECTION_PARAMS = {
:adapter => "oracle_enhanced",
- :database => "xe",
- :host => "ubuntu810",
- :username => "hr",
- :password => "hr"
+ :database => DATABASE_NAME,
+ :host => DATABASE_HOST,
+ :username => DATABASE_USER,
+ :password => DATABASE_PASSWORD
}
JDBC_CONNECTION_PARAMS = {
:adapter => "jdbc",
:driver => "oracle.jdbc.driver.OracleDriver",
- :url => "jdbc:oracle:thin:@ubuntu810:1521:XE",
- :username => "hr",
- :password => "hr"
+ :url => "jdbc:oracle:thin:@#{DATABASE_HOST}:#{DATABASE_PORT}:#{DATABASE_NAME}",
+ :username => DATABASE_USER,
+ :password => DATABASE_PASSWORD
}
SYS_CONNECTION_PARAMS = {
:adapter => "oracle_enhanced",
- :database => "xe",
- :host => "ubuntu810",
+ :database => DATABASE_NAME,
+ :host => DATABASE_HOST,
:username => "sys",
- :password => "manager",
+ :password => DATABASE_SYS_PASSWORD,
:privilege => "SYSDBA"
}

0 comments on commit 9633ad8

Please sign in to comment.