-
-
Save tomas-stefano/425846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOME_DIR = "/home/nelson" | |
versions = Dir[File.join('#{HOME_DIR}/.rvm/rubies', "ruby*")] | |
versions.each do |version| | |
version.match(/-([\d\.]\+)-/) | |
ruby_version_string = version.split('/').last | |
ruby_version = $1 | |
ENV['GEM_PATH'] = Dir["#{HOME_DIR}/.rvm/gems/#{ruby_version_string}*/"].join(':') | |
Dir.chdir "#{HOME_DIR}/projects/morpheus" | |
system(%&#{File.join(version, 'bin/ruby')} -r 'rubygems' -e "STDOUT.puts Gem.source_index.spec_dirs ;STDOUT.puts RUBY_VERSION; load Gem.bin_path('rspec', 'spec')" spec &) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment