I've just about "completed" a fairly large Rails project for a customer. He then sold the idea to someone else, so he's come back and said, "We want practically the same program except for a different logo. And with a change to this feature, and a change to that feature, etc..."
If I believed that the two websites were actually going to be practically the same I'd just implement them both in the same codebase, but I think the two programs are going to drift significantly.
I think the best way to handle this is to just fork the project and let them vary. The advantages are that we don't have to do any retesting of project #1 as project #2 is being developed, and I won't have a bunch of conditionals scattered around making the code hard to read. The disadvantages are that fixing a bug in one program has to be manually fixed in the other. And the same functionality is likely to be implemented slightly differently in the two programs over time.
I was also thinking about extracting the really common, unlikely to change part to a gem so that at least some of the code is in common. The trick is to figure out what code gets put in the common area.
I also considered breaking the project into a bunch of small projects so that they can be mixed-and-matched. That seems like a nightmare to keep straight, though.
Any thoughts?