incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerome Renard <jerome.ren...@gmail.com>
Subject Re: [zeta-dev] Configuration component proposal with override mechanism
Date Wed, 11 Aug 2010 09:02:07 GMT
James,

On Wed, Aug 11, 2010 at 10:50 AM, James Pic <jamespic@gmail.com> wrote:

> On Wed, Aug 11, 2010 at 10:40 AM, Jerome Renard <jerome.renard@gmail.com>
> wrote:
> > Hi James,
> >
> > On Wed, Aug 11, 2010 at 10:33 AM, James Pic <jamespic@gmail.com> wrote:
> >
> >> Congrats for writing yet another implementation of configuration
> override
> >> ;)
> >>
> >
> > Lol I was not aware you did that ;)
> >
>
> I know ;)
>
> Actually that happens quite frequently :P
>
> Another cool thing would be to allow multiline values, although that
> could cause some minor BC breaks :S
>
> >
> >>
> >> Another cool feature is configuration section inheritance, maybe you
> >> want to implement that as well. It's actually pretty simple, i'll post
> >> my implementation if you want.
> >>
> >
> > Configuration directive inheritance is already implement AFAIR :)
> > But reading your implement can be interesting anways, maybe there is
> > a lot of good stuff in there.
> >
>
> It's pretty trivial (sources attached), consider this example section:
>
>
I did not get anything attached.


> [sec]
> bar=X
> foo=Y
>
> Inheritance allows to write:
>
> [sec2..sec]
> foo=Z
>
> Instead of:
>
> [sec2]
> bar=X
> foo=Z
>
>
In the component I proposed it does not work that way actually.

AFAIR everything inherits from the "prod" context, and you can override
configuration values for staging and dev if you want.
If you add configuration directive in a particular block it will be taken
into account as well.
Have a look at the test suite to see all use cases :)

Cheers,

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message