Prev | Current Page 466 | Next

Brad Ediger

"Advanced Rails"

When you commit code into the
applications??™ model directories, Subversion will push the code into shared_models.
Figure 10-5. Directory structure of a large Rails project
314 | Chapter 10: Large Projects
There is one caveat to this approach. Subversion will not commit to two repositories
at once, and it sees an external as a separate repository. So, if you make changes to
both the models and some other part of an application at the same time, you must
check those changes in separately. This can take some getting used to, but it quickly
becomes second nature.
Depending on your situation, you may want to keep any or all of these shared
between two or more Rails applications:
Rails codebase
Usually, you want all of the applications within a project to be locked to the
same version of Rails. With a project maintained under Subversion, using Piston
to source the vendor code offers an advantage; you can maintain local changes to
the Rails tree independently of what happens upstream. Using Piston, you can
lock Rails to a certain branch (stable or edge) and update when you feel like it.
You can pull changes from the upstream Rails repository and sync them
throughout trunk with the following commands:
$ cd project/trunk
$ piston update rails
$ svn up
Plugins
Like the Rails source, plugins usually come in from an upstream repository.
Often you will need them synchronized across projects.


Pages:
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478