Debian Codegraph @

scripts/test-gem-install

raw symbols SCIP
1 #! /usr/bin/env bash
2 #
3 # run as part of CI, see gem-install.yml
4 #
5 if [[ $# -lt 1 ]] ; then
6 echo "usage: $(basename $0) <gems_dir> [install_flags]"
7 exit 1
8 fi
9
10 GEMS_DIR=$1
11 shift
12 INSTALL_FLAGS=$*
13
14 test -e /etc/os-release && cat /etc/os-release
15
16 set -e -x -u
17
18 pushd $GEMS_DIR
19
20 gemfile=$(ls *.gem | head -n1)
21 ls -l ${gemfile}
22 gem install --no-document ${gemfile} -- ${INSTALL_FLAGS}
23 gem list -d nokogiri
24 nokogiri -v
25 NOKOGIRI_VERSION=$(ruby -e "require 'nokogiri'; puts Nokogiri::VERSION")
26
27 popd
28
29 gem install bundler
30
31 bundle config set --local without rdoc
32 ruby -i.bak -ne 'print unless /^gemspec$/' Gemfile
33 bundle add nokogiri --version "${NOKOGIRI_VERSION}" --skip-install
34
35 rm -rf lib ext # ensure we don't use the local files
36 bundle install --prefer-local
37 bundle exec rake test
38
39 ./scripts/test-gem-installation