Reflect login method. LDAP,MidSite connection. The Mysql connection now is build on fly.
This commit is contained in:
1 parent
59b55d1574
commit
551e1ef740
4 files changed
+55
-28
No files matched your search
@@ -1,14 +1,21 @@
|
||||
#encoding: utf-8
|
||||
|
||||
require 'mysql2'
|
||||
|
||||
$mid_site_connection
|
||||
|
||||
mid_host = {
|
||||
:host => 'mruling.nccu.edu.tw', #mruling.nccu.edu.tw or 127.0.0.1
|
||||
:port => 3306, #3306 or 8005
|
||||
:username => "root",
|
||||
:password => "a3G6yWd9",
|
||||
:database => "RSS23_NCCU_MIDDLE",
|
||||
:encoding => "UTF8"
|
||||
}
|
||||
MID_CLIENT = Mysql2::Client.new(mid_host)
|
||||
module MiddleSiteConnection
|
||||
|
||||
@mid_host = {
|
||||
:host => 'mruling.nccu.edu.tw', #mruling.nccu.edu.tw or 127.0.0.1
|
||||
:port => 3306, #3306 or 8005
|
||||
:username => "rulingcom",
|
||||
:password => "5w3iJQ9OJQMGhJibKP6YQje8",
|
||||
:database => "RSS23_NCCU_MIDDLE",
|
||||
:encoding => "UTF8"
|
||||
}
|
||||
|
||||
def self.establish
|
||||
$mid_site_connection = Mysql2::Client.new(@mid_host)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
nccu_mid_site:
|
||||
adapter: mysql2
|
||||
encoding: utf8
|
||||
reconnect: true
|
||||
database: RSS23_NCCU_MIDDLE
|
||||
pool: 5
|
||||
username: rulingcom
|
||||
password: 5w3iJQ9OJQMGhJibKP6YQje8
|
||||
socket: /tmp/mysql.sock
|
||||
Reference in new issue
Block a user