I’m developing a Rails app. Cool.
I’m also having to develop a component as a Gem.
Basically, the Rails app use Omniauth to allow authentication from an OAuth2 service provider. However, NO strategy exist for this particular service provider, so I am writing one, and using my app to test it (they kind of need to be tested together). Unfortunately, Omniauth now REQUIRES strategies to be packaged as gems, and put into the Gemfile along with the omniauth gem.
So basically I’m wanting to put /my-new-strategy-gem with the strategy contents, IN my /myrailsapp folder, and then do gem “mystrategy” :as => “/myrailsapp”, where inside /my-new-strategy-gem there is an actual gem, with gemfile, readme, etc.
The reason I’m asking here is that I tried this before, and Git would not recognize the /my-new-strategy-gem folder inside my main app folder, since it contains its own .git file and other info.
I’ve heard of making it a submodule, or ways that use the vender folder, and other things, so I’m wondering which approach works best in this situation.
Edit: The reason I wanted to do it this way, too, is so my coding partner who is helping with both, could clone a repo with both, all at once, and we could repackage the standalone strategy gem later.
You can use the
:gitattribute to point to the git repository for your gem.http://gembundler.com/git.html
I believe you could also do this locally instead of on github.