Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use os provided bundler version #37

Merged
merged 1 commit into from
May 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions lib/kitchen/verifier/serverspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,20 @@ def install_command
def install_bundler
if config[:remote_exec]
<<-INSTALL
if [ \"$(#{sudo('gem')} list bundler -i)\" = \"true\" ]; then
echo "Bundler already installed"
if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ] || [ -f /etc/oracle-release ]; then
echo '-----> Installing os provided bundler package'
#{sudo_env('yum')} -y install rubygem-bundler
else
if [ \"$(#{sudo('gem')} list bundler -i)\" = \"false\" ]; then
#{sudo_env('gem')} install #{gem_proxy_parm} --no-ri --no-rdoc bundler
echo '-----> Installing bundler via rubygems'
if [ \"$(#{sudo('gem')} list bundler -i)\" = \"true\" ]; then
echo "Bundler already installed"
else
echo "ERROR: Ruby not installed correctly"
exit 1
if [ \"$(#{sudo('gem')} list bundler -i)\" = \"false\" ]; then
#{sudo_env('gem')} install #{gem_proxy_parm} --no-ri --no-rdoc bundler
else
echo "ERROR: Ruby not installed correctly"
exit 1
fi
fi
fi
INSTALL
Expand Down