Is there a way to configure bundler so that when I do rake release
it would submit the gem to my own gem server (a gem in a box instance) rather than to rubygems?
Ideally this configuration would be something I can omit from my git repository.
Is there a way to configure bundler so that when I do rake release
it would submit the gem to my own gem server (a gem in a box instance) rather than to rubygems?
Ideally this configuration would be something I can omit from my git repository.
I managed to change the task which uploads the gem to rubygems, that's less intrusive then the solution provided by JohnIV, though the concept is the same.
Add
'bundler_geminabox'
to your Gemfile:Then, in your rakefile, instead of requiring
'bundler/gem_tasks'
:You don't need to add any tasks to the rakefile; you will automatically get
rake build
,rake install
, andrake release
, the last of which uploads to the server listed in~/.gem/geminabox
. Otherwise, the behavior is the same as the equivalent tasks provided bybundler/gem_tasks
.Gem on Github: https://github.com/joshkrueger/bundler_geminabox
i made a dependency free gem for this which imitates the geminabox http post request and overwrites bundlers rake release with rake release:inabox
https://github.com/dfherr/geminabox-release
Rubygems is actually hard-coded into bundler and I've found only one way around it.
The following monkeypatch should get you what you want:
The above is for Nexus instead of Geminabox, but the concept should apply to either.
As far as omitting it from git, I'm afraid we're out of luck. However, you can share this appropriately between projects so it will only have to be checked into one place rather than many. Hope this helps!