Reputation: 6477
I have a private rails mountable engine (in a private repo) that several of my projects use.
It is included with a local path in their Gemfile.
Is there a way to package the engine during deployment into each app's repo? (maybe via /vendor/cache or something).
i.e. So I wouldn't need to do these two steps which I currently have to do:
From the rails documentation, I could add the engine gem as gem 'blorgh', path: "vendor/engines/blorgh"
But how do I keep the engine code in a central place and cherry pick which app gets the update?
Upvotes: 2
Views: 369
Reputation: 6674
I would make a private repo on Github, and reference it by :git
in each app's Gemfile
and use :tag
, :branch
, or :ref
to do you cherry-pick work.
# in app1 Gemfile.rb
gem 'blorgh', :git => '[email protected]:jacob/blorgh', :tag => 'v1.1'
# in app2 Gemfile.rb
gem 'blorgh', :git => '[email protected]:jacob/blorgh', :ref => '4aded'
Hope this can help.
Upvotes: 1