Directly execute gem command

... instead of executing it via ruby, which is redundant.

Change-Id: If9f4dba1f892b6de46957fd63e73402f5c3d1460
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-08-24 02:44:25 +09:00
parent 4495b0fbe9
commit d91e8f1871
6 changed files with 6 additions and 24 deletions

View File

@@ -68,10 +68,7 @@ fi
print_header 'Install Bundler'
mkdir -p .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
ruby <<EOF
cmd = 'gem install --no-user-install bundler --no-document --verbose'
system(cmd)
EOF
gem install --no-user-install bundler --no-document --verbose
set -e
./run_tests.sh

View File

@@ -42,9 +42,6 @@
- name: Install bundler
shell:
cmd: |
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --no-user-install'
system(cmd)
EOF
gem install bundler --no-document --verbose --no-user-install
environment:
GEM_HOME: "{{ ansible_user_dir }}/workspace/puppet-openstack-integration/.bundled_gems"

View File

@@ -17,10 +17,7 @@
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
if [ -f Gemfile ]; then
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}'
system(cmd)
EOF
gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}
$GEM_BIN_DIR/bundle config set --local without system_tests
$GEM_BIN_DIR/bundle install --retry 3
$GEM_BIN_DIR/bundle exec rake lint 2>&1

View File

@@ -18,10 +18,7 @@
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}'
system(cmd)
EOF
gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}
$GEM_BIN_DIR/bundle config set --local without system_tests
$GEM_BIN_DIR/bundle install --retry 3
export RSPEC_DEBUG=true

View File

@@ -6,10 +6,7 @@
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}'
system(cmd)
EOF
gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}
$GEM_BIN_DIR/bundle install --retry 3
$GEM_BIN_DIR/bundle exec rake syntax
chdir: '{{ ansible_user_dir }}/workspace'

View File

@@ -12,10 +12,7 @@
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
export GEM_BIN_DIR=$GEM_HOME/bin
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}'
system(cmd)
EOF
gem install bundler --no-document --verbose --no-user-install --bindir=${GEM_BIN_DIR}
$GEM_BIN_DIR/bundle install --retry 3
$GEM_BIN_DIR/bundle exec rake spec SPEC_OPTS='--format documentation'
chdir: '{{ ansible_user_dir }}/workspace'