backport change for ruby-plugin on master to Nexus 2.7.x

not sure if there is another 2.7.x release but in case than it would be great to include those backport for the nexus-ruby-plugin to work again.