Changeset eb450c826099602e236f2f25e3bcd12cca2e42f7
- Timestamp:
- 12/14/09 19:33:44 (9 months ago)
- Author:
- Stephen Bennett <spb@…>
- Parents:
- 31bf8409057e2901b16a35810545682a2fbf8c31
- Children:
- 5927ceb6d488166b983d722df19194b526266439
- git-committer:
- Stephen Bennett <spb@exherbo.org> / 2009-12-14T19:33:44Z+0000
- Message:
-
Make GMS::Config read config from gms_web.conf, instead of duplicating settings. Patch by Khisanth
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rc59673c
|
reb450c8
|
|
| 24 | 24 | requires 'DBIx::Class'; |
| 25 | 25 | requires 'String::Random'; |
| | 26 | requires 'Dir::Self'; |
| | 27 | requires 'Config::JFDI'; |
| 26 | 28 | |
| 27 | 29 | catalyst; |
-
|
r457755d
|
reb450c8
|
|
| 4 | 4 | |
| 5 | 5 | <Model::DB> |
| 6 | | connect_info dbi:Pg:dbname=gms;host=localhost |
| | 6 | <connect_info> |
| | 7 | dsn dbi:Pg:dbname=gms;host=localhost |
| | 8 | </connect_info> |
| 7 | 9 | </Model::DB> |
| 8 | 10 | |
-
|
rd95c422
|
reb450c8
|
|
| 3 | 3 | use strict; |
| 4 | 4 | use warnings; |
| 5 | | |
| | 5 | use Config::JFDI; |
| | 6 | use Dir::Self; |
| 6 | 7 | use vars qw($dbstring $dbuser $dbpass |
| 7 | 8 | $atheme_host $atheme_port $service |
| 8 | 9 | $atheme_master_login $atheme_master_pass); |
| 9 | 10 | |
| 10 | | $dbstring = 'dbi:Pg:dbname=gms'; |
| 11 | | $dbuser = ''; |
| 12 | | $dbpass = ''; |
| 13 | | $atheme_host = 'localhost'; |
| 14 | | $atheme_port = '8080'; |
| | 11 | my $config_loader = Config::JFDI->new( |
| | 12 | name => "gms_web", |
| | 13 | path => __DIR__ . "/../..", |
| | 14 | ); |
| | 15 | my $config = $config_loader->get; |
| | 16 | |
| | 17 | $dbstring = $config->{"Model::DB"}{connect_info}{dsn}; |
| | 18 | $dbuser = $config->{"Model::DB"}{connect_info}{user}; |
| | 19 | $dbpass = $config->{"Model::DB"}{connect_info}{password}; |
| | 20 | $atheme_host = $config->{"Model::Atheme"}{atheme_host}; |
| | 21 | $atheme_port = $config->{"Model::Atheme"}{atheme_port}; |
| 15 | 22 | $service = 'GroupServ'; |
| 16 | | $atheme_master_login = 'GMS'; |
| 17 | | $atheme_master_pass = 'goat'; |
| | 23 | $atheme_master_login = $config->{"Model::Atheme"}{master_account}; |
| | 24 | $atheme_master_pass = $config->{"Model::Atheme"}{master_password}; |
| | 25 | |
| | 26 | 1; |