From 818052f9d724a4bb8058e1a966617671dc6e5add Mon Sep 17 00:00:00 2001 From: c29m Date: Tue, 23 Feb 2021 10:16:05 +0000 Subject: [PATCH] fixing installing deps for older rubies --- Gemfile | 16 +++++++++------- docker-compose-github.yml | 1 + spec/support/specs.sh | 7 ++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index d842253..c8ee888 100644 --- a/Gemfile +++ b/Gemfile @@ -10,28 +10,30 @@ gem "rspec", "~> 3.5" group :development do gem "pry" -end - -platforms :mri do gem "pry-byebug", require: false - gem "stackprof", require: false - gem "xorcist", require: false end +gem "xorcist", require: false + +gem "parallel", "< 1.19.0", require: false if RUBY_VERSION < "2.4" gem "rubocop", "0.52.1", require: false gem "rbs", require: false if RUBY_VERSION >= "3.0" -if RUBY_VERSION < "2.2" +if RUBY_VERSION < "2.2.0" + gem "celluloid", "~> 0.17.3" gem "celluloid-io", "~> 0.17.3" gem "nio4r", "~> 1.2" gem "simplecov", "< 0.11.0", require: false else gem "celluloid-io", "~> 0.17" - if RUBY_VERSION < "2.3" + if RUBY_VERSION < "2.4" gem "simplecov", "< 0.11.0", require: false + elsif RUBY_VERSION < "2.5.0" + gem "simplecov", "< 0.21.0", require: false else gem "simplecov", require: false end + end diff --git a/docker-compose-github.yml b/docker-compose-github.yml index 5e91de3..fea9e7c 100644 --- a/docker-compose-github.yml +++ b/docker-compose-github.yml @@ -3,5 +3,6 @@ services: netsnmp: environment: - BUNDLE_PATH=/usr/local/bundle + - BUNDLE_WITHOUT=development volumes: - "./vendor/bundle:/usr/local/bundle" diff --git a/spec/support/specs.sh b/spec/support/specs.sh index 8c0b09c..35213c6 100755 --- a/spec/support/specs.sh +++ b/spec/support/specs.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + RUBY_ENGINE=`ruby -e 'puts RUBY_ENGINE'` if [[ "$RUBY_ENGINE" = "truffleruby" ]]; then @@ -11,8 +13,11 @@ else apk --update add g++ make git net-snmp-libs fi +gem install bundler -v="1.17.3" --no-doc --conservative cd /home -bundle install --quiet + +bundle -v +bundle install if [[ ${RUBY_VERSION:0:1} = "3" ]]; then export RUBYOPT='-rbundler/setup -rrbs/test/setup'