Ruby 2.0, and a scl feature request

Ken Dreyer ktdreyer at ktdreyer.com
Sat Jul 6 01:51:10 UTC 2013


Hi folks,

Thanks a lot for providing ruby193 packages for EL-6! I plan to use in
combination with Jenkins in order to test Gitorious on this newer Ruby
version.

Is there any chance of seeing ruby200 packages?

Also, with the "scl" tool, is there any way to avoid having to quote
the additional commands? For example, it would be nice to be able to
use the following line in a shell script in Jenkins:

$SCL bundle install

If the slave is using scl, then it would set the $SCL variable to
whatever is needed. If the slave is just using the standard Ruby
config, then $SCL could remain unset, and the bundle command would
continue using the standard Ruby stack.

Currently scl doesn't allow me to run the "bundle install" without
quotes. This means I have to branch the code like so:

if [[ -z "$SCL" ]]; then
  # No alternate Ruby version. Run as normal.
  bundle install
  bundle exec rake db:test:purge
  bundle exec rake db:setup
  bundle exec rake ci:setup:minitest test:units rcov
else
  # Use the alternate Ruby version.
  $SCL "bundle install"
  $SCL "bundle exec rake db:test:purge"
  $SCL "bundle exec rake db:setup"
  $SCL "bundle exec rake ci:setup:minitest test:units rcov"
fi

The large copy-and-paste has already bitten us a couple times, as the
list of commands must be identical between both conditions. If I
didn't have to use quotes here, I could just collapse it all down to
the single version using

$SCL <command>

- Ken


More information about the softwarecollections mailing list