-
Notifications
You must be signed in to change notification settings - Fork 7
Example
a common scenario is to have a couple of gems which depends on each other to be released togethre. this can easily be achieved with the nexus rubygems support:
- setup a proxy to rubygems.org so you have all the gems at hand (add proxies to other public rubygems repostories as needed)
- setup a hosted rubygems repository where you upload your released gems for staging
- setup a grouping server which aggregates the above instances
assuming that the group repository is called 'gems'
gem sources --remove http://rubygems.org/ --add http://localhost:8081/nexus/content/repositories/gems/
only works with nbundle from the nexus gem.
bundle config mirror.http://rubygems.org http://localhost:8081/nexus/content/repositories/gems
needs nexus gem installed.
gem nexus my-1.0.0.gem
add your nexus username and password and the add the nexus url for the hosted server http://localhost:8081/nexus/content/repositories/gems
now you can run your CI or all your tests against the released gems - locally !!
reconfigure the host, username and password for the nexus command add '--clear' option.
gem nexus --clear my-1.0.0.gem
finally you want to release the gems to rubygems.org - the rubygems.org is harded with the 'push' command.
gem push my-1.0.0.gem
if you configured the rubygems.org proxy to be the first on the group server then any new install of 'my-1.0.0.gem' will be served from the proxy, i.e. from rubygems.org. or with the hosted repository being first in the group you can shadow a gem via that hosted repository.