Shared rails app, svn, and local config? design question

None of my questions seem to get any bits here, but let’s try another.
:slight_smile:

I am working on a Rails app which we plan to distribute to lots of
people. There will be a community of users. Many of these users will
also be co-developers of this open source project. Others will not be,
they’ll just take the app and install it.

Let’s consider the developer first. He checks my app, which we’ll call
U, out of our shared svn.

But now he has lots of local config to do. Not only actual local config
in the config/ directory, but he’s going to possibly add a few of his
own models and his own controllers and own views too. (Pointed to by
reference in some config, of course). This app we all share acts sort of
like a ‘framework’, to the extent that local implementors can customize
it by adding their own classes without actually changing the shared
source code. They add local classes by writing their own local class,
and then naming their local classes to be used in the config files. This
is particularly clear in the case of ‘views’, maybe he adds a view to
app/views/local/my_layout.rhtml, and in environment.rb maybe it says
"app_config.use_layout = ‘local/my_layout’. (I’m using the AppConfig
package for app-specific config).

So far so good. I have this all set up. But he checked the overall app
out of SVN, and he’d like to leave it as an SVN working copy so he can
continue getting updates and such. Meanwhile, he has all his own local
implementatation stuff that he’d like to keep in his own svn. And he’d
like to be able to check all of his own local stuff out too in one (or
few) svn commands. But his local stuff might be scattered all about, in
models/, views/, controllers/, config/, etc.

I can think of a number of ways to do this, none satisfying me (and some
only working on edge rails, which is undesirable to me). I’m curious if
any other developers have similar projects, and how they’ve dealt with
this issue.

Thanks for any ideas and especially for reports of how you are dealing
with this.

Random thought

master_app:/
app:/
models
controllers
views

local_app :confused:
app:/
models
controllers
views

In the configuration for master_app you add local_app/app/models to
config.load_paths and you set template_root in the controllers from
local_app to point at local_app/app/views. I think there’s an equivalent
setting so that rails will look for controllers in extra locations as
well. You still have to edit environment.rb on master_app but at least
you can leave the other stuff alone.

Can’t say I’ve tried this but it might work.

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs