简体   繁体   中英

Store Rails 3 engine in different Github repository

I plan to hire a contractor to work on some modules for my Rails 3 app, without exposing the entire app to him.

I got an advise from SO that I should create an engine, mount it to my main app and let the contractor work on this engine.

How should I go about storing the engine in a different github repository? How do I tell my live (Heroku) server to load this engine from this repository, and how can my contractor make requests from my main app without accessing to the code?

Thank you.

You will want to load the engine as a submodule in your main application. Heroku supports this as noted here .

The git for this is fairly easy. Make sure that you are in the base directory of the Rails app and run these commands.

git submodule add enginerepoaddress desired_destination
git add .
git commit -m 'Add rails engine git commit message'

To update, it's simply

git submodule submodule_name git pull origin master

The git documentation for submodules is available here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM