Topic: Where do custom config data live?
So, I've totally disregarded the helpful, friendly advice from ryanb & am pressing on with writing my own Ruby code to integrate my Rails app (running the Login Engine) with phpBB. Ryan may pout, but I'm sure the cartoon foxes would approve :-)
To my pleasant surprise, it's working nicely. I've modified user_control.rb to modify the phpBB session table on login and logout, and mimic the cookie writing behaviour in phpBB's session.php code. I can log in to my Rails app, navigate to my forum index and I'm logged in there too. Nice. And when I log out from my Rails app, the cookies are overwritten and the session table cleaned up. Also nice.
However, I'm currently using hardcoded strings for the phpBB settings I need to know:
# TODO: get these from a configuration file?
cookie_path = '/'
cookie_domain = ''
cookie_secure = false
phpbb_db_name = "phpbb"
phpbb_db_username = "mydbusername"
phpbb_db_password = "mydbpassword"
phpbb_db_hostname = "localhost"
I'm sure there must be some Rails-ish way of putting those settings in a configuration file somewhere, where they can be cleanly accessed. I've had a hunt around the documentation & forum, but can't find a best practice for this.
Anyone have any suggestions?