Hostname patterns are back!
- From:
- Zed A. Shaw
- Date:
- 2010-08-31 @ 00:44
Alright, this is idiotic, but I wasn't actually doing any pattern
matching on hostnames. It looked like I was, but due to odd decisions
early on I really wasn't. Now I'm matching patterns properly, and I've
just gotta make a special case for the "(.*)" any pattern and we're set.
Here's how it'll work:
http://dpaste.de/a7Fv/
The Server.default_host and Host.name need to match up like normal, but
notice there's a Server.name setting. The default_host is sort of
deprecated but I kept it around since it is handy. I actually use
name="prod" or name="test" to start my servers:
m2sh start -db config.sqlite -name test
That way it always works even if you're doing a pattern or what-not.
Next up, we will actually be matching these patterns, so they should
work in 1.0beta6 which I'll push out shortly. You can do patterns like
([a-z]+).sub.com or (.*).com and I'll have a special case for "(.*)"
which will try to match other host names first, and then if not match
that one as the last catch-all "any" host.
Thanks Carlo for trying this. It was really busted.
--
Zed A. Shaw
http://zedshaw.com/