
See https://github.com/bundler/bundler/issues/6870 Bundler 2.x dropped support for Ruby < 2.3 so now we detect ruby version and install last known to work version. This means that newer OS will get newer versions of bundler. Change-Id: I521affb16d8d2312be3ff507a014adddacd6cb8b Closes-Bug: #1810401
24 lines
586 B
Bash
24 lines
586 B
Bash
#!/bin/bash
|
|
#
|
|
# functions - puppet-openstack_spec_helper specific functions
|
|
#
|
|
|
|
prepare_environment() {
|
|
rm -rf puppet-whazz default-config.yaml
|
|
mkdir -p .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
ruby <<EOF
|
|
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
|
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
|
|
cmd += ' -v 1.17.3'
|
|
end
|
|
system(cmd)
|
|
EOF
|
|
|
|
# Build fake module
|
|
OS_NEW_MODULE_TEST=yes bash -x ./contrib/bootstrap.sh whazz dummy
|
|
cd puppet-whazz/openstack/puppet-modulesync-configs/modules/puppet-whazz
|
|
|
|
$GEM_HOME/bin/bundle install
|
|
}
|