public
Description: friendly extension management for radiant cms using git or http.
Home | Edit | New

Advanced usage

Download preference setup

The most important of Ray’s setup tasks, rake ray:setup:download, will be run for you automatically the first time you try to install an extension. However you might not have had git installed when you initially installed Ray. If that’s the case you can change your preference by running:

rake ray:setup:download

Server restart preference setup

Ray’s other setup task, rake ray:setup:restart, can be used to have Ray automatically restart your server whenever necessary, such as after you install a new extension. Currently, Ray supports restarting a single Mongrel, a Mongrel cluster, Phusion Passenger, Thin or Unicorn; note: single Mongrels, Thin and Unicorn need to be running in daemon mode.

rake ray:setup:restart server=mongrel_cluster
rake ray:setup:restart server=mongrel
rake ray:setup:restart server=passenger
rake ray:setup:restart server=thin
rake ray:setup:restart server=unicorn

Adding extension remotes

Before you get going with remote branches in Ray you’ll need to make sure you’ve setup at least your GitHub username in your global git configuration file.

git config --global github.user your_github_username

That will add a bit of code to your ~/.gitconfig file. Ray can then use that information to determine when you’re installing your own extensions. Now when you install from your own repositories Ray will use your private URL instead of the public one; which means you can push your local changes back to your GitHub repository.

Now you can install your extensions as you normally would with Ray. Then tell Ray which other users you want to track.

rake ray:extension:install name=extension
rake ray:extension:remote name=extension hub=other_user

As you add remotes Ray will setup tracking branches named like “other_user/branch_name” for each branch the remote user has in their repository. Nothing is merged by Ray and you’ll be returned to your current branch after the remote is setup. Just like when you’re using git directly you’ll want to make sure your current branch is clean (commit or stash) before adding remotes; and afterward use your normal git workflow to inspect and merge changes.

Pulling extension remotes

Once you’ve setup a remote repository on an extension you’ll want to pull down the changes occasionally. You can pull in the remote repositories for either a specific extension or all extensions with remotes setup.

# pull remotes on a single extension
rake ray:extension:pull name=extension_name

# pull remotes on all extensions
rake ray:extension:pull

Ray does not merge anything into your master branch, after pulling in changes use your normal git workflow to inspect and merge these changes.

Last edited by johnmuhl, Thu Aug 20 16:11:01 -0700 2009
Home | Edit | New
Versions: