Age | Commit message (Collapse) | Author |
|
Empty value was variably considered "" or nil, now it will always be ""
string.
Now "nil", "false", "true" strings are converted to their respective
types nil, false and true.
This also means we cannot have verbatim strings by that name, like if
your password was "false", you're shit out of luck. If this is the case,
we can add some __false__ hack or consider other similar solutions.
Fixes #500
Fixes #534
May break stuff with ""/nil changing now, but as it was not consistent
to begin with, I find it acceptable. Users now may need to manually
enter nil in some fields to regain old behaviour.
|
|
|
|
We needed this, because use of 'def inherited' not idempotent, in
Oxidized::Script use case we may need to restart Oxidized, even though
it's already loaded, and we won't get class names populated via 'def
inherited' anymore.
There are quite many optiosn to do this
a) filename == class name
+ no discovery/mapping, very clean
- user 'source' must give us model name in exactly right
capitalization
b) add 'self' at end of files, so eval will return class name
+ deterministic with arbitrary name
- DSL cruft, DSL being light is our main value
(can we do this via parent class? I couldn't find way)
c) load in new module via Module.module_eval X
+ module will contain only consts we just created
- but which one is the one we want?
- if we use eval, load errors won't tell line error
But at least now we got rid of 'inherited' methods and not adding too
much cruft, hope it's better than before.
|
|
|
|
Main benefits
a) we get support for system wide configs
b) we don't use symbols in config file, they're confusing to
non-rubyist
|
|
Silly for shit-and-giggles attempt at rancid
|