Hi Thibaut
What you're suggesting makes a lot of sense. If you want to get a
generic patch for it working, please, go ahead. My one suggested
change is make app_env_task accept strings or symbols indicating the
task name - Thinking Sphinx should be able to translate it to the
relevant call by itself (and if you want to make the setting accept
lambdas *as well* as strings and symbols, that'd be pretty cool too).
Cheers
--
Pat
On 11/01/2009, at 8:01 PM, Thibaut Barrère wrote:
>
> Hi Pat,
>
> toughts after a night: it would be much better not to rely on
> RAMAZE_ROOT (some thing that do not actually exist in Ramaze), but
> instead to provide extensions point. It would cover Ramaze and any
> other framework, too.
>
> From what I've seen, the two extension points required today seem to
> be:
> 1/ app_root setting
> 2/ rake env task calling on app_env, if useful
>
> (there is another question on how paths are build inside .conf file,
> but I'll noddle around it before suggesting something).
>
> What about transforming TS so that it can let the caller configure
> itself (inversion of control) ?:
>
> ThinkingSphinx::Configuration.configure do |config|
> config.app_root = my_ramaze_root
> config.app_env_task = lambda { Rake::Task[:environment].invoke }
> end
>
> That would require some bits of refactoring, but would leave the
> ability to customize things for the end-user. The Rails/Merb default
> would be invoked, unless a config is provided to override it.
>
> What do you think ?
>
> regards,
>
> -- Thibaut
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---