[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FR-devel] Properties now using YAML
From: |
Rich Kilmer |
Subject: |
[FR-devel] Properties now using YAML |
Date: |
Mon, 11 Nov 2002 00:53:46 -0500 |
I updated the properties class to use YAML. It took some time to get
the format down. It looks like this right now (our system properties
file):
#### Properties: Core configuration file - Version: 1.0
properties: ~
"|":
- config: ~
"|":
- log_file: "./config/freeride.log"
- log_level: "0"
- log_name: FreeRIDE
- plugin_path: "./plugins"
- product_name: FreeRIDE
- setup_file: "./config/setup.rb"
- version: ~
"|":
- major: "0"
- minor: "0"
- release: "5"
Its kind of weird, but the "|": slot is a hash key whose value is an
array of hash (slots). Anyway...its more readable and less verbose than
the xml. I am going to go through the code and see where I can simplify
it.
Oh, and I found a MAJOR bug that was causing startup time to really
suck. I had the Properties class subscribe to the properties slot, then
loaded the slots with data (from the persistent file). Every time you
set a value the damn subscription would kick off and the properties
would be rewritten. Some of our properties file are 80-90 long, so this
really bit. Sorry about that. You will notice startup times are a fair
bit faster ;-)
-rich
_______________________________
Rich Kilmer, InfoEther LLC
trap("SIGINT") { raise [104, 101, 108, 108].pack("cccc") }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FR-devel] Properties now using YAML,
Rich Kilmer <=