Fix the included Vagrantfile for running rspec tests #12295
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In attempting to get a development environment set up to run the rspec
tests for a forthcoming PR I noticed that the Vagrantfile doesn't appear
to actually set up a functioning environment. I'm not sure when this
changed or how it's been missed but I figured I'd contribute a patch to
fix it up for my benefit and others.
In summary:
current provisioning script expects it be. Namely it requires users to
be added to the
rvm
group rather than thesudo
group and alsorequires a log out and then back in to finish setting up. In light of
that I broke apart the provisioning into two separate shell scripts to
get that 'log out and back in' behavior.
idempotent, using
sudo -u vagrant -i
rather than thesu
incantation, removing apparentyl unnecessary dependencies like
build-essential
and the GPG key, etc. I suspect there's somesignificant unnecessary complexity in the ruby version extraction but
that could be tacked on later. This change is already big enough.
What do you think? I'm happy to cleanup the commits if there's interest in
the patch.
Pre Change:
Post Change: