Set --no-user-install in gem install

Since --user-install was enabled by default in gem[1], we need to set
--no-user-install to make "gem install" refer GEM_HOME.

Closes-Bug: #1866176
[1] https://github.com/rubygems/rubygems/pull/2847

Change-Id: Id640ec2cb1012e99826cb990fb4995945183521d
This commit is contained in:
Takashi Kajinami 2020-03-06 00:18:42 +09:00
parent 867f939bd6
commit 3b266e9a36
5 changed files with 14 additions and 14 deletions

View File

@ -36,7 +36,7 @@
shell:
cmd: |
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --no-user-install'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end

View File

@ -50,7 +50,7 @@
export GEM_HOME=`pwd`/.bundled_gems
if [ -f Gemfile ]; then
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --no-user-install'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end
@ -59,10 +59,10 @@
$GEM_HOME/bin/bundle install --without system_tests --retry 3
$GEM_HOME/bin/bundle exec rspec spec/acceptance
else
gem install rake -n ./.bundled_gems/
gem install beaker-rspec
gem install puppetlabs_spec_helper
./.bundled_gems/rake acceptance 2>&1
gem install rake -n ./.bundled_gems/ --no-user-instal
gem install beaker-rspec --no-user-install
gem install puppetlabs_spec_helper --no-user-install
./.bundled_gems/rake acceptance 2>&1 --no-user-install
fi
chdir: '{{ ansible_user_dir }}/workspace'
executable: /bin/bash

View File

@ -21,7 +21,7 @@
export GEM_HOME=`pwd`/.bundled_gems
if [ -f Gemfile ]; then
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --no-user-install'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end
@ -33,11 +33,11 @@
$GEM_HOME/bin/bundle exec rake metadata_lint 2>&1
fi
else
gem install rake -n ./.bundled_gems/ --no-ri --no-rdoc
gem install puppet-lint -n ./.bundled_gems/ --no-ri --no-rdoc
gem install metadata-json-lint -n ./.bundled_gems/ --no-ri --no-rdoc
gem install puppetlabs_spec_helper -n ./.bundled_gems/ --no-ri --no-rdoc
gem install puppet -n ./.bundled_gems/ --no-ri --no-rdoc
gem install rake -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install
gem install puppet-lint -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install
gem install metadata-json-lint -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install
gem install puppetlabs_spec_helper -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install
gem install puppet -n ./.bundled_gems/ --no-ri --no-rdoc --no-user-install
./.bundled_gems/rake lint 2>&1
if [ -f metadata.json ]; then
./.bundled_gems/metadata-json-lint

View File

@ -6,7 +6,7 @@
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --no-user-install'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end

View File

@ -18,7 +18,7 @@
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
ruby <<EOF
cmd = 'gem install bundler --no-rdoc --no-ri --verbose'
cmd = 'gem install bundler --no-rdoc --no-ri --verbose --no-user-install'
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0') then
cmd += ' -v 1.17.3'
end