Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Example

Christian Meier edited this page Jul 1, 2013 · 2 revisions

staging server

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

rubygems config

assuming that the group repository is called 'gems'

gem sources --remove http://rubygems.org/ --add http://localhost:8081/nexus/content/repositories/gems/

bundler config

only works with nbundle from the nexus gem.

bundle config mirror.http://rubygems.org http://localhost:8081/nexus/content/repositories/gems

uploading gem for staging

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

releasing the gem to rubygems.org

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.

Clone this wiki locally